2023-12-07 16:28:29 +08:00
|
|
|
|
package component
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"joylink.club/ecs"
|
|
|
|
|
"joylink.club/rtsssimulation/consts"
|
|
|
|
|
)
|
|
|
|
|
|
2023-12-08 17:44:25 +08:00
|
|
|
|
//ISCS 电力系统相关组件定义
|
|
|
|
|
|
|
|
|
|
// IscsWireCabinetState ISCS线柜状态
|
|
|
|
|
//
|
|
|
|
|
// 状态由该设备的其他组件运算得到,该状态组件对外为只读组件,面向用户
|
|
|
|
|
type IscsWireCabinetState struct {
|
|
|
|
|
Normal bool //true-正常
|
|
|
|
|
Fault bool //true-故障
|
|
|
|
|
Alarm bool //true-报警
|
|
|
|
|
Abnormal bool //true-通讯中断/异常
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IscsCircuitBreakerState ISCS断路器状态
|
|
|
|
|
//
|
|
|
|
|
// 状态由该设备的其他组件运算得到,该状态组件对外为只读组件,面向用户
|
|
|
|
|
//
|
|
|
|
|
// 断路器;PT、负极柜隔离开关、轨电位、上网隔离开关、隔离开关
|
|
|
|
|
type IscsCircuitBreakerState struct {
|
|
|
|
|
Closed bool //true-合闸
|
|
|
|
|
Opened bool //true-开闸
|
|
|
|
|
Abnormal bool //true-通讯中断/异常
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IscsRectifierState ISCS整流器状态
|
|
|
|
|
//
|
|
|
|
|
// 状态由该设备的其他组件运算得到,该状态组件对外为只读组件,面向用户
|
|
|
|
|
type IscsRectifierState struct {
|
|
|
|
|
Normal bool //true-正常
|
|
|
|
|
Fault bool //true-故障
|
|
|
|
|
Alarm bool //true-报警
|
|
|
|
|
CommunicationInterrupt bool //true-通讯中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IscsHandcartSwitchState ISCS手车状态
|
|
|
|
|
//
|
|
|
|
|
// 状态由该设备的其他组件运算得到,该状态组件对外为只读组件,面向用户
|
|
|
|
|
type IscsHandcartSwitchState struct {
|
|
|
|
|
WorkPosClosed bool //true-工作位合闸
|
|
|
|
|
WorkPosOpened bool //true-工作位分闸
|
|
|
|
|
TestPos bool //true-实验位
|
|
|
|
|
CommunicationInterrupt bool //true-通讯中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IscsVoltageTransformerState ISCS变压器状态
|
|
|
|
|
//
|
|
|
|
|
// 状态由该设备的其他组件运算得到,该状态组件对外为只读组件,面向用户
|
|
|
|
|
type IscsVoltageTransformerState struct {
|
|
|
|
|
Normal bool //true-正常
|
|
|
|
|
Fault bool //true-故障 (注意-变压器110kV/35kv没有此项)
|
|
|
|
|
Alarm bool //true-报警
|
|
|
|
|
CommunicationInterrupt bool //true-通讯中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IscsThreePositionSwitchState ISCS三工位隔离开关状态
|
|
|
|
|
//
|
|
|
|
|
// 状态由该设备的其他组件运算得到,该状态组件对外为只读组件,面向用户
|
|
|
|
|
type IscsThreePositionSwitchState struct {
|
|
|
|
|
DisconnectSwitchClosed bool //true-隔离开关合闸
|
|
|
|
|
LandingSwitchClosed bool //true-接地开关合闸
|
|
|
|
|
Opened bool //true-开闸
|
|
|
|
|
Abnormal bool //true-异常
|
|
|
|
|
CommunicationInterrupt bool //true-通讯中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IscsTransBackupZiTouState ISCS母联备自投状态
|
|
|
|
|
//
|
|
|
|
|
// 状态由该设备的其他组件运算得到,该状态组件对外为只读组件,面向用户
|
|
|
|
|
type IscsTransBackupZiTouState struct {
|
|
|
|
|
Input bool //true-备自投投入
|
|
|
|
|
Exit bool //true-备自投退出
|
|
|
|
|
CommunicationInterrupt bool //true-通讯中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ISCS 相关设备状态组件
|
|
|
|
|
var (
|
|
|
|
|
IscsWireCabinetStateType = ecs.NewComponentType[IscsWireCabinetState]()
|
|
|
|
|
IscsCircuitBreakerStateType = ecs.NewComponentType[IscsCircuitBreakerState]()
|
|
|
|
|
IscsRectifierStateType = ecs.NewComponentType[IscsRectifierState]()
|
|
|
|
|
IscsHandcartSwitchStateType = ecs.NewComponentType[IscsHandcartSwitchState]()
|
|
|
|
|
IscsVoltageTransformerStateType = ecs.NewComponentType[IscsVoltageTransformerState]()
|
|
|
|
|
IscsIscsThreePositionSwitchStateType = ecs.NewComponentType[IscsThreePositionSwitchState]()
|
|
|
|
|
IscsTransBackupZiTouStateType = ecs.NewComponentType[IscsTransBackupZiTouState]()
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////
|
2023-12-07 16:28:29 +08:00
|
|
|
|
|
|
|
|
|
// TransBusbar 输电母线
|
|
|
|
|
type TransBusbar struct {
|
|
|
|
|
Vl consts.VoltageLevel //电压等级
|
|
|
|
|
Elec consts.ElecYwEnum
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TwoPositionSwitch 对一条路通-断控制的开关状态
|
|
|
|
|
// 如断路器
|
|
|
|
|
// 如PT、负极柜隔离开关、轨电位、上网隔离开关、隔离开关
|
|
|
|
|
type TwoPositionSwitch struct {
|
2023-12-08 17:44:25 +08:00
|
|
|
|
Closed bool //true-合闸,线路导通;false-分闸,线路断开
|
2023-12-07 16:28:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// /////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// ThreePositionSwitch 三工位开关
|
|
|
|
|
// 对于三工位隔离开关,规定:ClosedPosition1-合闸到工作位,ClosedPosition2-合闸到接地位
|
|
|
|
|
type ThreePositionSwitch struct {
|
2023-12-08 17:44:25 +08:00
|
|
|
|
Position consts.SwitchThreePosition //合闸到位置1,与位置1线路导通;合闸到位置2,与位置2线路导通;分闸,线路断开,未与任何位置接通
|
2023-12-07 16:28:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// HandcartSwitch 手车式开关
|
|
|
|
|
type HandcartSwitch struct {
|
|
|
|
|
Position consts.HandcarPosition
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// ElecDevice 一般电力设备
|
|
|
|
|
// 如:变压器、整流器
|
|
|
|
|
// Epu所有状态如:35kV进线柜、35kV出线柜、1500V直流进线柜、配电变馈线柜、整流变馈线柜、35kV母联柜、500V直流馈线柜、1500V直流馈线柜、1500V直流负极柜
|
|
|
|
|
// Epu状态中除去报警,如:400V进线柜、400V母联柜、三级负荷总开关、上网隔离开关柜、接口柜
|
|
|
|
|
type ElecDevice struct {
|
2023-12-08 17:44:25 +08:00
|
|
|
|
Normal bool //true-正常
|
2023-12-07 16:28:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-12-08 17:44:25 +08:00
|
|
|
|
// 电力设备组件
|
2023-12-07 16:28:29 +08:00
|
|
|
|
var (
|
|
|
|
|
ElecDeviceType = ecs.NewComponentType[ElecDevice]()
|
|
|
|
|
HandcartSwitchType = ecs.NewComponentType[HandcartSwitch]()
|
|
|
|
|
ThreePositionSwitchType = ecs.NewComponentType[ThreePositionSwitch]()
|
|
|
|
|
TwoPositionSwitchType = ecs.NewComponentType[TwoPositionSwitch]()
|
|
|
|
|
TransBusbarType = ecs.NewComponentType[TransBusbar]()
|
|
|
|
|
)
|
2023-12-08 17:44:25 +08:00
|
|
|
|
|
|
|
|
|
// 设备例外标签定义
|
|
|
|
|
var (
|
|
|
|
|
DeviceCommunicationInterruptTag = ecs.NewTag() //通信中断
|
|
|
|
|
DeviceAbnormalTag = ecs.NewTag() //异常
|
|
|
|
|
DeviceFaultTag = ecs.NewTag() //故障 有预告信号产生
|
|
|
|
|
DeviceAlarmTag = ecs.NewTag() //报警 有事故信号产生
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// 设备置牌标签定义
|
|
|
|
|
var (
|
|
|
|
|
DevicePlacingOverhaulCardTag = ecs.NewTag() //设备置牌:检修
|
|
|
|
|
DevicePlacingLandingCardTag = ecs.NewTag() //设备置牌:接地
|
|
|
|
|
DevicePlacingOtherCardTag = ecs.NewTag() //设备置牌:其他
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// BackupZiTouInputTag 备自投投入、退出标签
|
|
|
|
|
var BackupZiTouInputTag = ecs.NewTag() //备自投投入标签
|