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 电力系统相关组件定义
|
|
|
|
|
|
2023-12-18 18:04:37 +08:00
|
|
|
|
// CircuitBreaker 电路断路器
|
|
|
|
|
type CircuitBreaker struct {
|
|
|
|
|
Closed bool //true-合闸;false-分闸
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-通信中断
|
2023-12-08 17:44:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-12-07 16:28:29 +08:00
|
|
|
|
// ThreePositionSwitch 三工位开关
|
|
|
|
|
// 对于三工位隔离开关,规定:ClosedPosition1-合闸到工作位,ClosedPosition2-合闸到接地位
|
|
|
|
|
type ThreePositionSwitch struct {
|
2023-12-18 18:04:37 +08:00
|
|
|
|
Position SwitchThreePosition //合闸到位置1,与位置1线路导通;合闸到位置2,与位置2线路导通;分闸,线路断开,未与任何位置接通
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-异常、通信中断
|
2023-12-07 16:28:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-12-11 11:09:07 +08:00
|
|
|
|
// SwitchThreePosition 三工位开关位置定义
|
|
|
|
|
type SwitchThreePosition = uint8
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
StpOpened SwitchThreePosition = iota //开关分闸,线路断开,未与任何位置接通
|
|
|
|
|
StpClosedPosition1 //开关合闸到位置1,与位置1线路导通
|
|
|
|
|
StpClosedPosition2 //开关合闸到位置2,与位置2线路导通
|
|
|
|
|
)
|
|
|
|
|
|
2023-12-18 18:04:37 +08:00
|
|
|
|
/////////////////////////
|
2023-12-07 16:28:29 +08:00
|
|
|
|
|
|
|
|
|
// HandcartSwitch 手车式开关
|
|
|
|
|
type HandcartSwitch struct {
|
2023-12-18 18:04:37 +08:00
|
|
|
|
Position HandcarPosition
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-通信中断
|
2023-12-07 16:28:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-12-11 11:09:07 +08:00
|
|
|
|
// HandcarPosition 手车式开关位置定义
|
|
|
|
|
type HandcarPosition = uint8
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
HpOpened HandcarPosition = iota //工作位分闸
|
|
|
|
|
HpClosed //工作位合闸
|
|
|
|
|
HpTest //实验位
|
|
|
|
|
)
|
|
|
|
|
|
2023-12-18 18:04:37 +08:00
|
|
|
|
////////////////////
|
|
|
|
|
|
|
|
|
|
// Rectifier 整流器
|
|
|
|
|
type Rectifier struct {
|
|
|
|
|
Normal bool //true-正常
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、报警、通信中断
|
|
|
|
|
InputAcV uint32 //输入交流电压
|
|
|
|
|
OutputDcV uint32 //输出直流电压
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Disconnector 隔离开关
|
|
|
|
|
type Disconnector struct {
|
|
|
|
|
Closed bool //true-合闸;false-分闸
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-异常、通信中断
|
|
|
|
|
}
|
2023-12-07 16:28:29 +08:00
|
|
|
|
|
2023-12-18 18:04:37 +08:00
|
|
|
|
// WireCabinet 线柜
|
|
|
|
|
type WireCabinet struct {
|
|
|
|
|
Normal bool //true-正常
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、报警、异常、通信中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// LightningArrester 避雷器
|
|
|
|
|
type LightningArrester struct {
|
2023-12-08 17:44:25 +08:00
|
|
|
|
Normal bool //true-正常
|
2023-12-07 16:28:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-12-18 18:04:37 +08:00
|
|
|
|
// AbcVoltageSource 三相电压源
|
|
|
|
|
//
|
|
|
|
|
// 35KV 1#和2#进线连接的国家电网可以视作电压源,为整个一次图中最终电的来源
|
|
|
|
|
type AbcVoltageSource struct {
|
|
|
|
|
Ua uint32 //A相电压,单位V
|
|
|
|
|
Ub uint32 //B相电压,单位V
|
|
|
|
|
Uc uint32 //C相电压,单位V
|
|
|
|
|
}
|
2023-12-08 17:44:25 +08:00
|
|
|
|
|
2023-12-18 18:04:37 +08:00
|
|
|
|
// VoltageTransformer 变压器
|
|
|
|
|
type VoltageTransformer struct {
|
|
|
|
|
Normal bool //true-正常
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、报警、通信中断
|
|
|
|
|
InputV uint32 //输入电压值,单位V
|
|
|
|
|
OutputV uint32 //输出电压值,单位V
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// VoltageABTransmission 电压传递,从A传递到B,如断路器闭合时,电压会从断路器一端传递到另一端
|
|
|
|
|
type VoltageABTransmission struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// VoltageANTransmission 电压传递,电源从A点传递到N个点
|
|
|
|
|
type VoltageANTransmission struct {
|
|
|
|
|
}
|
2023-12-08 17:44:25 +08:00
|
|
|
|
|
|
|
|
|
var (
|
2023-12-18 18:04:37 +08:00
|
|
|
|
CircuitBreakerType = ecs.NewComponentType[CircuitBreaker]() //断路器
|
|
|
|
|
ThreePositionSwitchType = ecs.NewComponentType[ThreePositionSwitch]() //三工位隔离开关
|
|
|
|
|
HandcartSwitchType = ecs.NewComponentType[HandcartSwitch]() //手车
|
|
|
|
|
DisconnectorType = ecs.NewComponentType[Disconnector]() //隔离开关
|
|
|
|
|
WireCabinetType = ecs.NewComponentType[WireCabinet]() //线柜
|
|
|
|
|
LightningArresterType = ecs.NewComponentType[LightningArrester]() //避雷器
|
|
|
|
|
AbcVoltageSourceType = ecs.NewComponentType[AbcVoltageSource]() //三相电压源
|
2023-12-08 17:44:25 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// BackupZiTouInputTag 备自投投入、退出标签
|
|
|
|
|
var BackupZiTouInputTag = ecs.NewTag() //备自投投入标签
|