Compare commits
3 Commits
93529c716e
...
375655017e
| Author | SHA1 | Date |
|---|---|---|
|
|
375655017e | |
|
|
d9cc5f3738 | |
|
|
829279b22b |
|
|
@ -6,6 +6,6 @@ const (
|
||||||
NullableType = iota
|
NullableType = iota
|
||||||
// BusbarType 母线类型
|
// BusbarType 母线类型
|
||||||
BusbarType
|
BusbarType
|
||||||
// AsynchronousMotorType 异步电动机类型
|
// AsyncMotorType 异步电动机类型
|
||||||
AsynchronousMotorType
|
AsyncMotorType
|
||||||
)
|
)
|
||||||
|
|
|
||||||
13
main.go
13
main.go
|
|
@ -91,11 +91,24 @@ func main() {
|
||||||
|
|
||||||
engine := gin.Default()
|
engine := gin.Default()
|
||||||
engine.Use(limiter.Middleware)
|
engine.Use(limiter.Middleware)
|
||||||
|
|
||||||
|
// diagram api
|
||||||
engine.GET("/model/diagram_load", handler.CircuitDiagramLoadHandler)
|
engine.GET("/model/diagram_load", handler.CircuitDiagramLoadHandler)
|
||||||
engine.POST("/model/diagram_create", handler.CircuitDiagramCreateHandler)
|
engine.POST("/model/diagram_create", handler.CircuitDiagramCreateHandler)
|
||||||
engine.POST("/model/diagram_update", handler.CircuitDiagramUpdateHandler)
|
engine.POST("/model/diagram_update", handler.CircuitDiagramUpdateHandler)
|
||||||
engine.POST("/model/diagram_delete", handler.CircuitDiagramDeleteHandler)
|
engine.POST("/model/diagram_delete", handler.CircuitDiagramDeleteHandler)
|
||||||
|
|
||||||
|
// dashborad api
|
||||||
|
dashboard := engine.Group("/dashboard", limiter.Middleware)
|
||||||
|
{
|
||||||
|
dashboard.GET("/load", nil)
|
||||||
|
dashboard.GET("/query", nil)
|
||||||
|
dashboard.POST("/create", nil)
|
||||||
|
dashboard.POST("/update", nil)
|
||||||
|
dashboard.POST("/delete", nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
// engine.Group()
|
||||||
// Swagger UI
|
// Swagger UI
|
||||||
engine.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
engine.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,13 @@ import (
|
||||||
func SelectModelByType(modelType int) BasicModelInterface {
|
func SelectModelByType(modelType int) BasicModelInterface {
|
||||||
if modelType == constant.BusbarType {
|
if modelType == constant.BusbarType {
|
||||||
return &orm.BusbarSection{}
|
return &orm.BusbarSection{}
|
||||||
|
} else if modelType == constant.AsyncMotorType {
|
||||||
|
return &orm.AsyncMotor{}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SelectModelNameByType define select the data structure name for parsing based on the input model type
|
// SelectModelNameByType define select the data structure name for parsing based on the input model type
|
||||||
func SelectModelNameByType(modelType int) string {
|
func SelectModelNameByType(modelType int) string {
|
||||||
if modelType == constant.BusbarType {
|
return SelectModelByType(modelType).ReturnTableName()
|
||||||
return "BusBarSection"
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
// Package orm define database data struct
|
||||||
|
package orm
|
||||||
|
|
||||||
|
import "github.com/gofrs/uuid"
|
||||||
|
|
||||||
|
// AsyncMotor define asynchronous motor model
|
||||||
|
type AsyncMotor struct {
|
||||||
|
UUID uuid.UUID `gorm:"column:global_uuid;primaryKey"`
|
||||||
|
NoLoadVoltage float64 // 空载电压
|
||||||
|
NoLoadElectricCurrent float64 // 空载电流
|
||||||
|
NoLoadPower float64 // 空载电功率
|
||||||
|
BlockageF1Frequency float64 // 堵转 f1 频率
|
||||||
|
BlockageF1Voltage float64 // 堵转 f1 频率电压
|
||||||
|
BlockageF1ElectricCurrent float64 // 堵转 f1 频率电流
|
||||||
|
BlockageF1Power float64 // 堵转 f1 频率电功率
|
||||||
|
BlockageF2Frequency float64 // 堵转 f2 频率
|
||||||
|
BlockageF2Voltage float64 // 堵转 f2 频率电压
|
||||||
|
BlockageF2ElectricCurrent float64 // 堵转 f2 频率电流
|
||||||
|
BlockageF2Power float64 // 堵转 f2 频率电功率
|
||||||
|
APhaseDCResistance float64 // A相直流电阻
|
||||||
|
BPhaseDCResistance float64 // B相直流电阻
|
||||||
|
CPhaseDCResistance float64 // C相直流电阻
|
||||||
|
RunningStatorResistance float64 // 运行定子电阻r1
|
||||||
|
StartUpStatorResistance float64 // 启动定子电阻r1
|
||||||
|
ColdStateStatorResistance float64 // 冷态定子电阻r1
|
||||||
|
RunningStatorReactance float64 // 运行定子电抗x1
|
||||||
|
StartUpStatorReactance float64 // 启动定子电抗x1
|
||||||
|
ColdStateStatorReactance float64 // 冷态定子电抗x1
|
||||||
|
RunningEquivalentResistanceOfRotor float64 // 运行转子等值电阻r2
|
||||||
|
StartUpEquivalentResistanceOfRotor float64 // 启动转子等值电阻r2
|
||||||
|
ColdStateEquivalentResistanceOfRotor float64 // 冷态转子等值电阻r2
|
||||||
|
RunningEquivalentReactanceOfRotor float64 // 运行转子等值电抗x2
|
||||||
|
StartUpEquivalentReactanceOfRotor float64 // 启动转子等值电抗x2
|
||||||
|
ColdStateEquivalentReactanceOfRotor float64 // 冷态转子等值电抗x2
|
||||||
|
RunningExcitationResistance float64 // 运行励磁电阻Rfe
|
||||||
|
StartUpExcitationResistance float64 // 启动励磁电阻Rfe
|
||||||
|
ColdStateExcitationResistance float64 // 冷态励磁电阻Rfe
|
||||||
|
RunningExcitationReactance float64 // 运行励磁电抗Xm
|
||||||
|
StartUpExcitationReactance float64 // 启动励磁电抗Xm
|
||||||
|
ColdStateExcitationReactance float64 // 冷态励磁电抗Xm
|
||||||
|
RunningTemperature int // 运行温度
|
||||||
|
StartUpTemperature int // 启动温度
|
||||||
|
ColdStateTemperature int // 冷态温度
|
||||||
|
|
||||||
|
// 热限制曲线参数
|
||||||
|
EIS string // 电动机定子绕组绝缘结构热分级,枚举值类型105(A)/120(E)/130(B)/155(F)/180(H),默认值155(F)
|
||||||
|
TemperatureLimit int // 温度限值,范围值0-1000
|
||||||
|
TemperatureRiseLimit int // 温升限值,范围值0-1000
|
||||||
|
ColdStateAllowsContinuousStartingTimes int // 冷态允许连续起动次数
|
||||||
|
HotStateAllowsContinuousStartingtimes int // 热态允许连续起动次数
|
||||||
|
ProhibitionOfRestartForShortestTime float64 // 禁止重起动最短时间
|
||||||
|
HotStateAllowsBlockageTime float64 // 热态允许堵转时间Ta
|
||||||
|
ColdStateAllowsBlockageTime float64 // 冷态允许堵转时间To
|
||||||
|
ElectricMotorHeatingTimeConstant float64 // 电动机发热时间常数Twu
|
||||||
|
ElectricMotorHeatDissipationTimeConstant float64 // 电动机散热时间常数Tcd
|
||||||
|
ThermalLoadCurve []float64 // 热载曲线坐标点
|
||||||
|
CompensationForEnvConditions int // 环境条件补偿环境温度
|
||||||
|
MinLimitOfTerminalVoltage int // 机端电压下限
|
||||||
|
MaxLimitOfStarts int // 起动次数上限
|
||||||
|
StartingStrategy string // 起动策略
|
||||||
|
NormalStartUpTime int // 起动转正常时间
|
||||||
|
RestartBatch int // 再起动批次
|
||||||
|
ElectricCurrentMeasurementLevel string // 电流测量级
|
||||||
|
VoltageMeasurementLevel string // 电压测量级
|
||||||
|
ElectricCurrentProtectionLevel1 string // 电流保护级1
|
||||||
|
ElectricCurrentProtectionLevel2 string // 电流保护级1
|
||||||
|
VoltageProtectionLevel string // 电压保护级
|
||||||
|
Trend string // 潮流
|
||||||
|
Frequency string // 频率
|
||||||
|
StatusMeasurementPoint string // 状态测点
|
||||||
|
Machinery string // 机械
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
(1)温度的格式为正整数,0~500
|
||||||
|
(2)电阻和电抗的参数为正实数,三位整数五位小数的格式,XXX.XXXXX
|
||||||
|
*/
|
||||||
|
|
||||||
|
// TableName func respresent return table name of asynchronous motor
|
||||||
|
func (a *AsyncMotor) TableName() string {
|
||||||
|
return "AsyncMotor"
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUUID func implement BasicModelInterface interface
|
||||||
|
func (a *AsyncMotor) SetUUID(uuid uuid.UUID) {
|
||||||
|
a.UUID = uuid
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReturnTableName func implement BasicModelInterface interface
|
||||||
|
func (a *AsyncMotor) ReturnTableName() string {
|
||||||
|
return "AsyncMotor"
|
||||||
|
}
|
||||||
|
|
@ -3,13 +3,14 @@ package orm
|
||||||
|
|
||||||
import "github.com/gofrs/uuid"
|
import "github.com/gofrs/uuid"
|
||||||
|
|
||||||
|
// BusbarSection define busbar section model
|
||||||
type BusbarSection struct {
|
type BusbarSection struct {
|
||||||
// 母线基本参数
|
// 母线基本参数
|
||||||
Name string // 母线端名称,默认值BusX
|
BusbarName string // 母线端名称,默认值BusX
|
||||||
BusbarNumber int // 母线编号,默认值1
|
BusbarNumber int // 母线编号,默认值1
|
||||||
UUID uuid.UUID `gorm:"column:uuid;primaryKey"`
|
UUID uuid.UUID `gorm:"column:global_uuid;primaryKey"`
|
||||||
StandardVoltage float32 // 标准电压,单位kV,范围值在000.01~500.00
|
StandardVoltage float32 // 标准电压,单位kV,范围值在000.01~500.00
|
||||||
Desc string // 描述
|
BusbarDesc string // 描述
|
||||||
IsService bool // 是否服役,值为运行/退出
|
IsService bool // 是否服役,值为运行/退出
|
||||||
Status string // 状态,值为现役/新建/计划/检修/库存可用/库存报废
|
Status string // 状态,值为现役/新建/计划/检修/库存可用/库存报废
|
||||||
PowerGridName string // 当前工程电网的顶层建模时的电网名称
|
PowerGridName string // 当前工程电网的顶层建模时的电网名称
|
||||||
|
|
@ -23,9 +24,9 @@ type BusbarSection struct {
|
||||||
DynamicStableCurrent float32 // 母线动稳定电流,范围值0.01~65536
|
DynamicStableCurrent float32 // 母线动稳定电流,范围值0.01~65536
|
||||||
MinLoadAdjustmentCoefficient int // 最小母线负荷调整系数,范围值0-100
|
MinLoadAdjustmentCoefficient int // 最小母线负荷调整系数,范围值0-100
|
||||||
MaxLoadAdjustmentCoefficient int // 最大母线负荷调整系数,范围值0-500
|
MaxLoadAdjustmentCoefficient int // 最大母线负荷调整系数,范围值0-500
|
||||||
BusbarType int // 母线类型,默认值PQ
|
BusbarType string // 母线类型,默认值PQ
|
||||||
ReferenceVoltage float32 // 母线类型,单位kV,默认值37
|
ReferenceVoltage float32 // 基准电压,单位kV,默认值37
|
||||||
ReferenceVCurrent float32 // 母线类型,单位MVA,默认值100
|
ReferenceCurrent float32 // 基准电流,单位MVA,默认值100
|
||||||
MinS3Capacities float32 // 最小三项短路容量,范围值0.00~65536.00
|
MinS3Capacities float32 // 最小三项短路容量,范围值0.00~65536.00
|
||||||
MaxS3Capacities float32 // 最大三项短路容量,范围值0.00~65536.00
|
MaxS3Capacities float32 // 最大三项短路容量,范围值0.00~65536.00
|
||||||
MinS3Current float32 // 最小三项短路电流,范围值0.00~65536.00
|
MinS3Current float32 // 最小三项短路电流,范围值0.00~65536.00
|
||||||
|
|
@ -36,17 +37,17 @@ type BusbarSection struct {
|
||||||
MaxS1Capacity float32 // 最大单项短路容量,范围值0.00~65536.00
|
MaxS1Capacity float32 // 最大单项短路容量,范围值0.00~65536.00
|
||||||
MinS1Current float32 // 最小单项短路电流,范围值0.00~65536.00
|
MinS1Current float32 // 最小单项短路电流,范围值0.00~65536.00
|
||||||
MaxS1Current float32 // 最大单项短路电流,范围值0.00~65536.00
|
MaxS1Current float32 // 最大单项短路电流,范围值0.00~65536.00
|
||||||
MinS1Impedance float32 // 最小单项短路阻抗,默认值 0.1,范围值0.0000~100.0000
|
MinZ1Impedance float32 // 最小单项短路阻抗,默认值 0.1,范围值0.0000~100.0000
|
||||||
MaxS1Impedance float32 // 最大单项短路阻抗,默认值 0.05,范围值0.0000~100.0000
|
MaxZ1Impedance float32 // 最大单项短路阻抗,默认值 0.05,范围值0.0000~100.0000
|
||||||
// 母线稳定参数
|
// 母线稳定参数
|
||||||
UnderVoltageWarningThreshold int // 欠压预警阈值
|
UnderVoltageWarningThreshold int // 欠压预警阈值
|
||||||
UnderVoltageWarningRunningTime float32 // 欠压预警运行时间,默认值 10s,默认单位秒,默认范围值0s-100s
|
UnderVoltageWarningRunningTime int // 欠压预警运行时间,默认值 10s,默认单位秒,默认范围值0s-100s
|
||||||
UnderVoltageAlarmThreshold int // 欠压告警阈值
|
UnderVoltageAlarmThreshold int // 欠压告警阈值
|
||||||
UnderVoltageAlarmRunningTime float32 // 欠压告警运行时间,默认值 10s,默认单位秒,默认范围值0s-100s
|
UnderVoltageAlarmRunningTime int // 欠压告警运行时间,默认值 10s,默认单位秒,默认范围值0s-100s
|
||||||
OverVoltageWarningThreshold int // 过压预警阈值
|
OverVoltageWarningThreshold int // 过压预警阈值
|
||||||
OverVoltageWarningRunningTime float32 // 过压预警运行时间,默认值 10s,默认单位秒,默认范围值0s-100s
|
OverVoltageWarningRunningTime int // 过压预警运行时间,默认值 10s,默认单位秒,默认范围值0s-100s
|
||||||
OverVoltageAlarmThreshold int // 过压告警阈值
|
OverVoltageAlarmThreshold int // 过压告警阈值
|
||||||
OverVoltageAlarmRunningTime float32 // 过压告警运行时间,默认值 10s,默认单位秒,默认范围值0s-100s
|
OverVoltageAlarmRunningTime int // 过压告警运行时间,默认值 10s,默认单位秒,默认范围值0s-100s
|
||||||
PMax float32 // 有功储备裕度最大值
|
PMax float32 // 有功储备裕度最大值
|
||||||
QMax float32 // 无功储备裕度最大值
|
QMax float32 // 无功储备裕度最大值
|
||||||
Ulim float32 // 电压裕度
|
Ulim float32 // 电压裕度
|
||||||
|
|
@ -62,7 +63,7 @@ type BusbarSection struct {
|
||||||
StatusMeasurementPoint []string // 状态测点测点
|
StatusMeasurementPoint []string // 状态测点测点
|
||||||
}
|
}
|
||||||
|
|
||||||
// TableName func respresent return table name of BusbarSection
|
// TableName func respresent return table name of busbar section
|
||||||
func (b *BusbarSection) TableName() string {
|
func (b *BusbarSection) TableName() string {
|
||||||
return "BusbarSection"
|
return "BusbarSection"
|
||||||
}
|
}
|
||||||
|
|
@ -84,13 +85,13 @@ func NewBusbarSection(name string) (*BusbarSection, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return &BusbarSection{
|
return &BusbarSection{
|
||||||
Name: name,
|
BusbarName: name,
|
||||||
UUID: uuid,
|
UUID: uuid,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *BusbarSection) BusNameLenCheck() bool {
|
func (b *BusbarSection) BusNameLenCheck() bool {
|
||||||
if len([]rune(b.Name)) > 20 {
|
if len([]rune(b.BusbarName)) > 20 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|
@ -104,7 +105,7 @@ func (b *BusbarSection) BusVoltageCheck() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *BusbarSection) BusDescLenCheck() bool {
|
func (b *BusbarSection) BusDescLenCheck() bool {
|
||||||
if len([]rune(b.Desc)) > 100 {
|
if len([]rune(b.BusbarDesc)) > 100 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import (
|
||||||
"modelRT/diagram"
|
"modelRT/diagram"
|
||||||
"modelRT/model"
|
"modelRT/model"
|
||||||
|
|
||||||
|
cmap "github.com/orcaman/concurrent-map/v2"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -26,12 +27,8 @@ var ParseFunc = func(parseConfig interface{}) {
|
||||||
cancelCtx, cancel := context.WithTimeout(modelParseConfig.Context, 5*time.Second)
|
cancelCtx, cancel := context.WithTimeout(modelParseConfig.Context, 5*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
pgClient := database.GetPostgresDBClient()
|
pgClient := database.GetPostgresDBClient()
|
||||||
componentKey := modelParseConfig.ComponentInfo.GlobalUUID.String()
|
uuid := modelParseConfig.ComponentInfo.GlobalUUID.String()
|
||||||
unmarshalMap, err := diagram.GetComponentMap(componentKey)
|
unmarshalMap := cmap.New[any]()
|
||||||
if err != nil {
|
|
||||||
logger.Error("get component map from overviewMap failed", zap.String("component_key", componentKey), zap.Error(err))
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
tableName := model.SelectModelNameByType(modelParseConfig.ComponentInfo.ComponentType)
|
tableName := model.SelectModelNameByType(modelParseConfig.ComponentInfo.ComponentType)
|
||||||
result := pgClient.Table(tableName).WithContext(cancelCtx).Find(&unmarshalMap)
|
result := pgClient.Table(tableName).WithContext(cancelCtx).Find(&unmarshalMap)
|
||||||
|
|
@ -41,6 +38,7 @@ var ParseFunc = func(parseConfig interface{}) {
|
||||||
logger.Error("query component detail info from table is empty", zap.String("table_name", tableName))
|
logger.Error("query component detail info from table is empty", zap.String("table_name", tableName))
|
||||||
}
|
}
|
||||||
unmarshalMap.Set("id", modelParseConfig.ComponentInfo.ID)
|
unmarshalMap.Set("id", modelParseConfig.ComponentInfo.ID)
|
||||||
|
unmarshalMap.Set("uuid", modelParseConfig.ComponentInfo.GlobalUUID.String())
|
||||||
unmarshalMap.Set("created_time", modelParseConfig.ComponentInfo.VisibleID)
|
unmarshalMap.Set("created_time", modelParseConfig.ComponentInfo.VisibleID)
|
||||||
unmarshalMap.Set("parent_id", modelParseConfig.ComponentInfo.GridID)
|
unmarshalMap.Set("parent_id", modelParseConfig.ComponentInfo.GridID)
|
||||||
unmarshalMap.Set("type", modelParseConfig.ComponentInfo.ZoneID)
|
unmarshalMap.Set("type", modelParseConfig.ComponentInfo.ZoneID)
|
||||||
|
|
@ -53,5 +51,7 @@ var ParseFunc = func(parseConfig interface{}) {
|
||||||
unmarshalMap.Set("id", modelParseConfig.ComponentInfo.Context)
|
unmarshalMap.Set("id", modelParseConfig.ComponentInfo.Context)
|
||||||
unmarshalMap.Set("parent_id", modelParseConfig.ComponentInfo.Comment)
|
unmarshalMap.Set("parent_id", modelParseConfig.ComponentInfo.Comment)
|
||||||
unmarshalMap.Set("type", modelParseConfig.ComponentInfo.InService)
|
unmarshalMap.Set("type", modelParseConfig.ComponentInfo.InService)
|
||||||
|
|
||||||
|
diagram.StoreComponentMap(uuid, &unmarshalMap)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
CREATE TABLE public."AsyncMotor" (
|
||||||
|
id serial NOT NULL,
|
||||||
|
global_uuid uuid NOT NULL,
|
||||||
|
noload_voltage decimal(7, 2) NOT NULL,
|
||||||
|
noload_electric_current decimal(7, 2) NOT NULL,
|
||||||
|
noload_power decimal(7, 2) NOT NULL,
|
||||||
|
blockage_f1_frequency decimal(5, 2) NOT NULL,
|
||||||
|
blockage_f1_voltage decimal(7, 2) NOT NULL,
|
||||||
|
blockage_f1_electric_current decimal(7, 2) NOT NULL,
|
||||||
|
blockage_f1_power decimal(7, 2) NOT NULL,
|
||||||
|
blockage_f2_frequency decimal(5, 2) NOT NULL,
|
||||||
|
blockage_f2_voltage decimal(7, 2) NOT NULL,
|
||||||
|
blockage_f2_electric_current decimal(7, 2) NOT NULL,
|
||||||
|
blockage_f2_power decimal(7, 2) NOT NULL,
|
||||||
|
a_phase_dc_resistance decimal(7, 2) NOT NULL,
|
||||||
|
b_phase_dc_resistance decimal(7, 2) NOT NULL,
|
||||||
|
c_phase_dc_resistance decimal(7, 2) NOT NULL,
|
||||||
|
running_stator_resistance decimal(8, 5) NOT NULL,
|
||||||
|
startup_stator_resistance decimal(8, 5) NOT NULL,
|
||||||
|
coldstate_stator_resistance decimal(8, 5) NOT NULL,
|
||||||
|
running_stator_reactance decimal(8, 5) NOT NULL,
|
||||||
|
startup_stator_reactance decimal(8, 5) NOT NULL,
|
||||||
|
coldstate_stator_reactance decimal(8, 5) NOT NULL,
|
||||||
|
running_equivalent_resistance_of_rotor decimal(8, 5) NOT NULL,
|
||||||
|
startup_equivalent_resistance_of_rotor decimal(8, 5) NOT NULL,
|
||||||
|
coldstate_equivalent_resistance_of_rotor decimal(8, 5) NOT NULL,
|
||||||
|
running_equivalent_reactance_of_rotor decimal(8, 5) NOT NULL,
|
||||||
|
startup_equivalent_reactance_of_rotor decimal(8, 5) NOT NULL,
|
||||||
|
coldtsate_equivalent_reactance_of_rotor decimal(8, 5) NOT NULL,
|
||||||
|
running_excitation_resistance decimal(8, 5) NOT NULL,
|
||||||
|
startup_excitation_resistance decimal(8, 5) NOT NULL,
|
||||||
|
coldstate_excitation_resistance decimal(8, 5) NOT NULL,
|
||||||
|
running_excitation_reactance decimal(8, 5) NOT NULL,
|
||||||
|
startup_excitation_reactance decimal(8, 5) NOT NULL,
|
||||||
|
coldstate_excitation_reactance decimal(8, 5) NOT NULL,
|
||||||
|
running_temperature integer NOT NULL,
|
||||||
|
startup_temperature integer NOT NULL,
|
||||||
|
coldstate_temperature integer NOT NULL,
|
||||||
|
eis character varying(10) default 'f' NOT NULL,
|
||||||
|
temperature_limit integer NOT NULL,
|
||||||
|
temperature_rise_limit integer NOT NULL,
|
||||||
|
coldstate_allows_continuous_starting_times integer default 2 NOT NULL,
|
||||||
|
hotstate_allows_continuous_starting_times integer default 1 NOT NULL,
|
||||||
|
prohibition_of_restart_for_shortest_time decimal(4, 1) default 30 NOT NULL,
|
||||||
|
hotstate_allows_blockage_time decimal(5, 2) default 10 NOT NULL,
|
||||||
|
coldstate_allows_blockage_time decimal(5, 2) default 6 NOT NULL,
|
||||||
|
electric_motor_heating_time_constant decimal(5, 2) default 100 NOT NULL,
|
||||||
|
electric_motor_heat_dissipation_time_constant decimal(5, 2) default 300 NOT NULL,
|
||||||
|
thermal_load_curve decimal(5, 2) [] NOT NULL,
|
||||||
|
compensation_for_env_conditions decimal(5, 2) NOT NULL,
|
||||||
|
min_limit_of_terminal_voltage integer default 80 NOT NULL,
|
||||||
|
max_limit_of_tarts integer NOT NULL,
|
||||||
|
starting_strategy character varying(10) NOT NULL,
|
||||||
|
normal_startup_time integer NOT NULL,
|
||||||
|
restart_batch integer NOT NULL,
|
||||||
|
electric_current_measurement_level character varying(10) NOT NULL,
|
||||||
|
voltage_measurement_level character varying(10) NOT NULL,
|
||||||
|
electric_current_protection_level1 character varying(10) NOT NULL,
|
||||||
|
electric_current_protection_level2 character varying(10) NOT NULL,
|
||||||
|
voltage_protection_level character varying(10) NOT NULL,
|
||||||
|
trend character varying(10) NOT NULL,
|
||||||
|
frequency character varying(10) NOT NULL,
|
||||||
|
status_measurement_point character varying(10) NOT NULL,
|
||||||
|
machinery character varying(10) NOT NULL,
|
||||||
|
context jsonb NULL,
|
||||||
|
comment character varying(4096) NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE
|
||||||
|
public."AsyncMotor"
|
||||||
|
ADD
|
||||||
|
CONSTRAINT "AsyncMotor_pkey" PRIMARY KEY (global_uuid)
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
CREATE TABLE public."BusbarSection" (
|
||||||
|
id serial NOT NULL,
|
||||||
|
global_uuid uuid NOT NULL,
|
||||||
|
busbar_number integer NOT NULL,
|
||||||
|
busbar_name character varying(20) default 'Busx' NOT NULL,
|
||||||
|
standard_voltage decimal(5, 2) NOT NULL,
|
||||||
|
busbar_desc character varying(100) NOT NULL,
|
||||||
|
is_service boolean NULL default false,
|
||||||
|
status character varying(10) NOT NULL,
|
||||||
|
power_grid_name character varying(10) NOT NULL,
|
||||||
|
region_name character varying(10) NOT NULL,
|
||||||
|
factory_station_name character varying(10) NOT NULL,
|
||||||
|
voltage_percent_value decimal(5, 2) default 100 NOT NULL,
|
||||||
|
voltage_calculcated_value decimal(5, 2) default 35 NOT NULL,
|
||||||
|
phase_angle decimal(5, 2) default 0 NOT NULL,
|
||||||
|
rated_current decimal(7, 2) default 1000 NOT NULL,
|
||||||
|
dynamic_stable_current decimal(7, 2) default 40 NOT NULL,
|
||||||
|
min_load_adjustment_coefficient integer default 100 NOT NULL,
|
||||||
|
max_load_adjustment_coefficient integer default 100 NOT NULL,
|
||||||
|
busbar_type character varying(10) NOT NULL,
|
||||||
|
min_s3_capacities decimal(7, 2) default 0 NOT NULL,
|
||||||
|
max_s3_capacities decimal(7, 2) default 0 NOT NULL,
|
||||||
|
min_s3_current decimal(7, 2) default 0 NOT NULL,
|
||||||
|
max_s3_current decimal(7, 2) default 0 NOT NULL,
|
||||||
|
max_z3_impedance decimal(6, 3) default 0.05 NOT NULL,
|
||||||
|
min_z3_impedance decimal(6, 3) default 0.1 NOT NULL,
|
||||||
|
min_s1_capacity decimal(7, 2) default 0 NOT NULL,
|
||||||
|
max_s1_capacity decimal(7, 2) default 0 NOT NULL,
|
||||||
|
min_s1_current decimal(7, 2) default 0 NOT NULL,
|
||||||
|
max_s1_current decimal(7, 2) default 0 NOT NULL,
|
||||||
|
min_z1_impedance decimal(7, 4) default 0 NOT NULL,
|
||||||
|
max_z1_impedance decimal(7, 4) default 0 NOT NULL,
|
||||||
|
reference_voltage decimal(5, 2) default 37 NOT NULL,
|
||||||
|
reference_current decimal(7, 2) default 100 NOT NULL,
|
||||||
|
under_voltage_warning_threshold integer default 95 NOT NULL,
|
||||||
|
under_voltage_warning_running_time integer default 10 NOT NULL,
|
||||||
|
under_voltage_alarm_threshold integer default 90 NOT NULL,
|
||||||
|
under_voltage_alarm_running_time integer default 10 NOT NULL,
|
||||||
|
over_voltage_warning_threshold integer default 105 NOT NULL,
|
||||||
|
over_voltage_warning_running_time integer default 60 NOT NULL,
|
||||||
|
over_voltage_alarm_threshold integer default 110 NOT NULL,
|
||||||
|
over_voltage_alarm_running_time integer default 10 NOT NULL,
|
||||||
|
p_max decimal(7, 2) default 0 NOT NULL,
|
||||||
|
q_max decimal(7, 2) default 0 NOT NULL,
|
||||||
|
ulim decimal(5, 2) default 90 NOT NULL,
|
||||||
|
plim decimal(5, 2) default 30 NOT NULL,
|
||||||
|
qlim decimal(5, 2) default 30 NOT NULL,
|
||||||
|
measurement_level_current character varying(10) NOT NULL,
|
||||||
|
measurement_level_voltage character varying(10) NOT NULL,
|
||||||
|
protection_level_current character varying(10) NOT NULL,
|
||||||
|
protection_level_voltage_t character varying(10) NOT NULL,
|
||||||
|
trend character varying(10) NOT NULL,
|
||||||
|
frequency character varying(10) NOT NULL,
|
||||||
|
status_measurement_point character varying(10) NOT NULL,
|
||||||
|
context jsonb NULL,
|
||||||
|
comment character varying(4096) NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE
|
||||||
|
public."BusbarSection"
|
||||||
|
ADD
|
||||||
|
CONSTRAINT "BusbarSection_pkey" PRIMARY KEY (global_uuid)
|
||||||
Loading…
Reference in New Issue