init busbar section model

This commit is contained in:
douxu 2024-11-01 16:06:19 +08:00
parent cbd70885cb
commit e2a414292d
2 changed files with 110 additions and 0 deletions

View File

@ -0,0 +1,19 @@
package constant
const (
// 母线服役属性
// 母线服役运行属性
BusbarServiceRunning = iota
// 母线服役退出属性
BusbarServiceExited
)
const (
// 现役/新建/计划/检修/库存可用/库存报废
BusbarStatusActive = iota
BusbarStatusNewBuild
BusbarStatusPlan
BusbarStatusOverhaul
BusbarStatusInventoryAvailable
BusbarStatusInventoryScrap
)

91
model/busbar_section.go Normal file
View File

@ -0,0 +1,91 @@
package model
type BusbarSection struct {
// 母线基本参数
Name string // 母线端名称,默认值BusX
BusbarNumber int // 母线编号,默认值1
StandardVoltage float32 // 标准电压,单位kV,范围值在000.01~500.00
Desc string // 描述
IsService bool // 是否服役,值为运行/退出
Status string // 状态,值为现役/新建/计划/检修/库存可用/库存报废
PowerGridName string // 当前工程电网的顶层建模时的电网名称
RegionName string // 当前工程电网的顶层建模时的区域电网名称
FactoryStationName string // 当前工程电网的顶层建模时的厂站名称
// 母线模型参数
VoltagePercentValue float32 // 以母线标称电压为基准的百分数,默认值1.00~200.00
VoltageCalculcatedValue float32 // 通过StandardVoltage与VoltagePercentValtage计算得出的电压值,默认值0.01~1000.00
PhaseAngle float32 // 面向三相对称电网的属性值,可按A相电压考虑即可,默认值-180.00~180.00
RatedCurrent float32 // 母线额定电流,范围值0.01~65536
DynamicStableCurrent float32 // 母线动稳定电流,范围值0.01~65536
MinLoadAdjustmentCoefficient int // 最小母线负荷调整系数,范围值0-100
MaxLoadAdjustmentCoefficient int // 最大母线负荷调整系数,范围值0-500
BusbarType int // 母线类型,默认值PQ
ReferenceVoltage float32 // 母线类型,单位kV,默认值37
ReferenceVCurrent float32 // 母线类型,单位MVA,默认值100
MinThreeShortCircuitCapacities float32 // 最小三项短路容量,范围值0.00~65536.00
MaxThreeShortCircuitCapacities float32 // 最大三项短路容量,范围值0.00~65536.00
MinThreeShortCircuitCurrent float32 // 最小三项短路电流,范围值0.00~65536.00
MaxThreeShortCircuitCurrent float32 // 最大三项短路电流,范围值0.00~65536.00
// TODO
MinThreeRelayProtectionValue float32 // 最小三项继电保护定值(待确认),范围值0.0000~100.0000
// TODO
MaxThreeRelayProtectionValue float32 // 最大三项继电保护定值(待确认),范围值0.0000~100.0000
MinSingleShortCircuitCapacity float32 // 最小单项短路容量,范围值0.00~65536.00
MaxSingleShortCircuitCapacity float32 // 最大单项短路容量,范围值0.00~65536.00
MinSingleShortCircuitCurrent float32 // 最小单项短路电流,范围值0.00~65536.00
MaxSingleShortCircuitCurrent float32 // 最大单项短路电流,范围值0.00~65536.00
// TODO
MinSingleRelayProtectionValue float32 // 最小单项继电保护定值(待确认)
// TODO
MaxSingleRelayProtectionValue float32 // 最大单项继电保护定值(待确认)
// 母线稳定参数
UndervoltageWarningThreshold int // 欠压预警阈值
UndervoltageWarningRunningTime int // 欠压预警运行时间
UndervoltageAlarmThreshold int // 欠压告警阈值
UndervoltageAlarmRunningTime int // 欠压告警阈值
OvervoltageWarningThreshold int // 过压预警阈值
OvervoltageWarningRunningTime int // 过压预警运行时间
OvervoltageAlarmThreshold int // 过压告警阈值
OvervoltageAlarmRunningTime int // 过压告警运行时间
// 有功储备裕度最大值
// 无功储备裕度最大值
// 电压储备裕度
// 有功稳定裕度限值,默认值30%,范围 0-100%
// 无功稳定裕度限值,默认值30%,范围 0-100%
// 母线间隔信息
MeasurementLevelCurrent string // 测量级电流
MeasurementLevelVoltage string // 测量级电压
ProtectionLevelCurrent string // 保护级电流
ProtectionLevelVoltaget string // 保护级电压
Trend string // 潮流
Frequency string // 频率
StatusMeasurementPoint string // 状态测点
}
func NewBusbarSection(name string) *BusbarSection {
return &BusbarSection{
Name: name,
}
}
func (b *BusbarSection) BusNameLenCheck() bool {
if len([]rune(b.Name)) > 20 {
return false
}
return true
}
func (b *BusbarSection) BusVoltageCheck() bool {
if b.StandardVoltage > 500.00 || b.StandardVoltage < 000.01 {
return false
}
return true
}
func (b *BusbarSection) BusDescLenCheck() bool {
if len([]rune(b.Desc)) > 100 {
return false
}
return true
}