1.台账增加默认排序
2.增加场站/用户监测规模接口
This commit is contained in:
@@ -19,14 +19,16 @@ public enum RunFlagEnum {
|
||||
QUIT(4, "退运"),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
POWER_FLAG(0,"电网侧"),
|
||||
NO_POWER_FLAG(1,"非电网侧"),
|
||||
|
||||
|
||||
GW_FLAG(0,"主网"),
|
||||
PW_FLAG(1,"配网"),
|
||||
|
||||
I_SORT(1,"I类测点"),
|
||||
II_SORT(2,"II类测点"),
|
||||
III_SORT(3,"III类测点"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.njcn.device.biz.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.device.biz.utils.COverlimit;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -18,7 +18,8 @@ import java.util.Objects;
|
||||
*/
|
||||
public class COverlimitUtil {
|
||||
|
||||
|
||||
/** 配网占位默认值 */
|
||||
private static final float PLACEHOLDER = -3.14159f;
|
||||
/**
|
||||
* 谐波电流系数
|
||||
*/
|
||||
@@ -34,38 +35,76 @@ public class COverlimitUtil {
|
||||
|
||||
/**
|
||||
* 计算监测点限值
|
||||
* @param voltageLevel 电压等级(10kV = 10 220kV = 220 )
|
||||
* @param protocolCapacity 协议容量
|
||||
* @param devCapacity 设备容量
|
||||
* @param shortCapacity 短路容量
|
||||
* @param powerFlag 0.用户侧 1.电网侧
|
||||
* @param lineType 0.主网 1.配网 需要注意配网目前没有四种容量,谐波电流幅值限值,负序电流限值无法计算默认-3.14159
|
||||
* @param voltageLevel 电压等级(kV)
|
||||
* @param protocolCapacity 协议容量(MVA)
|
||||
* @param devCapacity 供电设备容量(MVA),为空/0自动取对应电压默认值
|
||||
* @param shortCapacity 实际最小短路容量(MVA)
|
||||
* @param powerFlag 0=电网侧(不执行两步计算) 1=非电网侧/用户侧(执行两步计算)
|
||||
* @param pointClass 配网点类型 0=Ⅱ类 1=Ⅲ类光伏;主网该字段传0即可
|
||||
*/
|
||||
public static Overlimit globalAssemble(Float voltageLevel, Float protocolCapacity, Float devCapacity,
|
||||
Float shortCapacity, Integer powerFlag, Integer lineType) {
|
||||
Float shortCapacity, Integer powerFlag,Integer pointClass) {
|
||||
Overlimit overlimit = new Overlimit();
|
||||
voltageDeviation(overlimit,voltageLevel);
|
||||
voltageDeviation(overlimit, voltageLevel);
|
||||
frequency(overlimit);
|
||||
voltageFluctuation(overlimit,voltageLevel);
|
||||
voltageFlicker(overlimit,voltageLevel);
|
||||
totalHarmonicDistortion(overlimit,voltageLevel);
|
||||
uHarm(overlimit,voltageLevel);
|
||||
voltageFluctuation(overlimit, voltageLevel);
|
||||
voltageFlicker(overlimit, voltageLevel);
|
||||
totalHarmonicDistortion(overlimit, voltageLevel);
|
||||
uHarm(overlimit, voltageLevel);
|
||||
threeVoltageUnbalance(overlimit);
|
||||
interharmonicCurrent(overlimit,voltageLevel);
|
||||
interharmonicCurrent(overlimit, voltageLevel);
|
||||
|
||||
if(Objects.equals(lineType, RunFlagEnum.PW_FLAG.getStatus())) {
|
||||
//配网
|
||||
//谐波电流限值
|
||||
int lineType;
|
||||
if (voltageLevel >= DicDataEnum.KV220.getValue()) {
|
||||
lineType = 0; // 主网
|
||||
} else {
|
||||
lineType = 1; // 配网(110、66、35、10kV)
|
||||
}
|
||||
float sc = Objects.isNull(shortCapacity) ? 0f : shortCapacity;
|
||||
float pc = Objects.isNull(protocolCapacity) ? 0f : protocolCapacity;
|
||||
|
||||
float dc;
|
||||
if (Objects.isNull(devCapacity) || devCapacity <= 0) {
|
||||
dc = getDefaultDevCapacity(voltageLevel);
|
||||
} else {
|
||||
dc = devCapacity;
|
||||
}
|
||||
// 1. 配网 lineType = 1
|
||||
if (Objects.equals(lineType, RunFlagEnum.PW_FLAG.getStatus())) {
|
||||
overlimit.setINeg(PLACEHOLDER);
|
||||
Float[] iHarmTem = new Float[49];
|
||||
for (int i = 0; i <= 48; i++) {
|
||||
//目前只处理了配网II类测点,III类测点暂未处理,III类测点参考主网
|
||||
iHarmTem[i] = getHarmTag(i+2,voltageLevel).floatValue();
|
||||
|
||||
// 配网-电网侧(powerFlag=0) / 配网Ⅱ类:直接基准限值,不折算
|
||||
if (Objects.equals(powerFlag,RunFlagEnum.POWER_FLAG.getStatus()) || Objects.equals(pointClass, 0)) {
|
||||
for (int i = 0; i <= 48; i++) {
|
||||
iHarmTem[i] = getHarmTag(i + 2, voltageLevel).floatValue();
|
||||
}
|
||||
}
|
||||
// 配网-非电网侧 且 Ⅲ类光伏:两步计算,折算系数固定为1
|
||||
else {
|
||||
float calCap = 1.0f;
|
||||
for (int i = 0; i <= 48; i++) {
|
||||
float inHarm = iHarmCalculate(i + 2, voltageLevel, pc, dc, calCap);
|
||||
iHarmTem[i] = inHarm;
|
||||
}
|
||||
}
|
||||
overlimit.buildIHarm(iHarmTem);
|
||||
overlimit.setINeg(-3.14159f);
|
||||
}else {
|
||||
//主网
|
||||
iHarm(overlimit, voltageLevel, protocolCapacity, devCapacity, shortCapacity);
|
||||
negativeSequenceCurrent(overlimit, voltageLevel, shortCapacity);
|
||||
} else {
|
||||
// 主网-电网侧(powerFlag=0):直接基准限值
|
||||
if (Objects.equals(powerFlag, RunFlagEnum.POWER_FLAG.getStatus())) {
|
||||
Float[] iHarmTem = new Float[49];
|
||||
for (int i = 0; i <= 48; i++) {
|
||||
iHarmTem[i] = getHarmTag(i + 2, voltageLevel).floatValue();
|
||||
}
|
||||
overlimit.buildIHarm(iHarmTem);
|
||||
}
|
||||
// 主网-非电网侧/用户侧(风光场站):完整两步计算
|
||||
else {
|
||||
iHarm(overlimit, voltageLevel, pc, dc, sc);
|
||||
}
|
||||
// 主网统一计算负序电流
|
||||
negativeSequenceCurrent(overlimit, voltageLevel, sc);
|
||||
}
|
||||
return overlimit;
|
||||
}
|
||||
@@ -304,6 +343,30 @@ public class COverlimitUtil {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据电压等级获取【默认公共连接点供电设备容量】St(MVA)
|
||||
* 无实际台账容量时兜底使用
|
||||
*/
|
||||
public static float getDefaultDevCapacity(Float voltageLevel) {
|
||||
if (voltageLevel < 0.4f) {
|
||||
return 1.0f;
|
||||
} else if (voltageLevel < 6f) {
|
||||
return 100f;
|
||||
} else if (voltageLevel < 20f) {
|
||||
return 200f;
|
||||
} else if (voltageLevel < 35f) {
|
||||
return 500f;
|
||||
} else if (voltageLevel < 66f) {
|
||||
return 800f;
|
||||
} else if (voltageLevel < 110f) {
|
||||
return 1000f;
|
||||
} else if (voltageLevel < 220f) {
|
||||
return 2000f;
|
||||
} else {
|
||||
return 3000f;
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------谐波电流限值end-----------------------------------*/
|
||||
|
||||
|
||||
@@ -376,8 +439,9 @@ public class COverlimitUtil {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("sss");
|
||||
float aa = iHarmCalculate(9,500f,10,10,0.002222222222f);
|
||||
Overlimit overlimit = new Overlimit();
|
||||
iHarm(overlimit, 220f, 100f, 100f, 2000f);
|
||||
|
||||
System.out.println(aa);
|
||||
System.out.println(overlimit);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user