@enervance/insight-cim-model 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/westnetz-neplan/neplan-load.config.js +0 -1
- package/dist/config/westnetz-neplan/neplan-load.config.js.map +1 -1
- package/dist/constants/cim-class-definition.js +6 -0
- package/dist/constants/cim-class-definition.js.map +1 -1
- package/dist/constants/cim-class-names.d.ts +6 -0
- package/dist/constants/cim-class-names.js +6 -0
- package/dist/constants/cim-class-names.js.map +1 -1
- package/dist/converter/integral7/ConverterIntegral7.d.ts +17 -4
- package/dist/converter/integral7/ConverterIntegral7.js +530 -39
- package/dist/converter/integral7/ConverterIntegral7.js.map +1 -1
- package/dist/converter/integral7/config/db-config.d.ts +3 -1
- package/dist/converter/integral7/model/integral/Hgueleitung.d.ts +9 -0
- package/dist/converter/integral7/model/integral/Hgueleitung.js +3 -0
- package/dist/converter/integral7/model/integral/Hgueleitung.js.map +1 -0
- package/dist/converter/integral7/model/integral/Kopfstation.d.ts +31 -0
- package/dist/converter/integral7/model/integral/Kopfstation.js +3 -0
- package/dist/converter/integral7/model/integral/Kopfstation.js.map +1 -0
- package/dist/converter/integral7/model/interfaces.d.ts +8 -0
- package/dist/converter/integral7/sql/integral.sql.d.ts +8 -0
- package/dist/converter/integral7/sql/integral.sql.js +22 -1
- package/dist/converter/integral7/sql/integral.sql.js.map +1 -1
- package/dist/converter/integral7/utils.d.ts +4 -1
- package/dist/converter/integral7/utils.js +26 -8
- package/dist/converter/integral7/utils.js.map +1 -1
- package/dist/etl-neplan/etl-neplan-contingency-analysis.js +22 -7
- package/dist/etl-neplan/etl-neplan-contingency-analysis.js.map +1 -1
- package/dist/etl-neplan/etl-neplan-feederline.d.ts +3 -1
- package/dist/etl-neplan/etl-neplan-feederline.js +73 -15
- package/dist/etl-neplan/etl-neplan-feederline.js.map +1 -1
- package/dist/etl-neplan/etl-neplan.js.map +1 -1
- package/dist/etl-neplan/neplan-contingency-analysis.d.ts +14 -0
- package/dist/etl-neplan/neplan-contingency-analysis.js +337 -0
- package/dist/etl-neplan/neplan-contingency-analysis.js.map +1 -0
- package/dist/graph/Types.d.ts +5 -0
- package/dist/graph/Types.js +10 -0
- package/dist/graph/Types.js.map +1 -0
- package/dist/graph/connections/connection.d.ts +11 -0
- package/dist/graph/connections/connection.js +17 -0
- package/dist/graph/connections/connection.js.map +1 -0
- package/dist/graph/edges/edge.d.ts +8 -0
- package/dist/graph/edges/edge.js +16 -0
- package/dist/graph/edges/edge.js.map +1 -0
- package/dist/graph/graph-interfaces.d.ts +15 -0
- package/dist/graph/graph-interfaces.js +3 -0
- package/dist/graph/graph-interfaces.js.map +1 -0
- package/dist/graph/graph-util.d.ts +13 -0
- package/dist/graph/graph-util.js +114 -0
- package/dist/graph/graph-util.js.map +1 -0
- package/dist/graph/graph.d.ts +15 -0
- package/dist/graph/graph.js +75 -0
- package/dist/graph/graph.js.map +1 -0
- package/dist/graph/nodes/node.d.ts +14 -0
- package/dist/graph/nodes/node.js +28 -0
- package/dist/graph/nodes/node.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/model/core/ACDCTerminal.js +2 -2
- package/dist/model/core/ACDCTerminal.js.map +1 -1
- package/dist/model/core/ConnectivityNode.js +3 -2
- package/dist/model/core/ConnectivityNode.js.map +1 -1
- package/dist/model/core/PSRType.d.ts +0 -1
- package/dist/model/core/PSRType.js +3 -6
- package/dist/model/core/PSRType.js.map +1 -1
- package/dist/model/core/PowerSystemResource.js +3 -8
- package/dist/model/core/PowerSystemResource.js.map +1 -1
- package/dist/model/core/Substation.d.ts +3 -0
- package/dist/model/core/Substation.js +4 -0
- package/dist/model/core/Substation.js.map +1 -1
- package/dist/model/core/Terminal.d.ts +2 -0
- package/dist/model/core/Terminal.js +2 -2
- package/dist/model/core/Terminal.js.map +1 -1
- package/dist/model/core/VoltageLevel.js +0 -1
- package/dist/model/core/VoltageLevel.js.map +1 -1
- package/dist/model/dc/ACDCConverter.d.ts +23 -0
- package/dist/model/dc/ACDCConverter.js +33 -0
- package/dist/model/dc/ACDCConverter.js.map +1 -0
- package/dist/model/dc/ACDCConverterDCTerminal.d.ts +13 -0
- package/dist/model/dc/ACDCConverterDCTerminal.js +54 -0
- package/dist/model/dc/ACDCConverterDCTerminal.js.map +1 -0
- package/dist/model/dc/CsConverter.d.ts +21 -0
- package/dist/model/dc/CsConverter.js +43 -0
- package/dist/model/dc/CsConverter.js.map +1 -0
- package/dist/model/dc/CsOperatingModeKind.d.ts +4 -0
- package/dist/model/dc/CsOperatingModeKind.js +9 -0
- package/dist/model/dc/CsOperatingModeKind.js.map +1 -0
- package/dist/model/dc/CsPpccControlKind.d.ts +5 -0
- package/dist/model/dc/CsPpccControlKind.js +10 -0
- package/dist/model/dc/CsPpccControlKind.js.map +1 -0
- package/dist/model/dc/DCBaseTerminal.d.ts +8 -0
- package/dist/model/dc/DCBaseTerminal.js +30 -0
- package/dist/model/dc/DCBaseTerminal.js.map +1 -0
- package/dist/model/dc/DCConductingEquipment.d.ts +5 -0
- package/dist/model/dc/DCConductingEquipment.js +12 -0
- package/dist/model/dc/DCConductingEquipment.js.map +1 -0
- package/dist/model/dc/DCConverterOperatingModeKind.d.ts +5 -0
- package/dist/model/dc/DCConverterOperatingModeKind.js +10 -0
- package/dist/model/dc/DCConverterOperatingModeKind.js.map +1 -0
- package/dist/model/dc/DCConverterUnit.d.ts +14 -0
- package/dist/model/dc/DCConverterUnit.js +54 -0
- package/dist/model/dc/DCConverterUnit.js.map +1 -0
- package/dist/model/dc/DCEquipmentContainer.d.ts +5 -0
- package/dist/model/dc/DCEquipmentContainer.js +12 -0
- package/dist/model/dc/DCEquipmentContainer.js.map +1 -0
- package/dist/model/dc/DCLine.d.ts +11 -0
- package/dist/model/dc/DCLine.js +48 -0
- package/dist/model/dc/DCLine.js.map +1 -0
- package/dist/model/dc/DCLineSegment.d.ts +13 -0
- package/dist/model/dc/DCLineSegment.js +69 -0
- package/dist/model/dc/DCLineSegment.js.map +1 -0
- package/dist/model/dc/DCNode.d.ts +12 -0
- package/dist/model/dc/DCNode.js +41 -0
- package/dist/model/dc/DCNode.js.map +1 -0
- package/dist/model/dc/DCPolarityKind.d.ts +5 -0
- package/dist/model/dc/DCPolarityKind.js +10 -0
- package/dist/model/dc/DCPolarityKind.js.map +1 -0
- package/dist/model/dc/DCTerminal.d.ts +10 -0
- package/dist/model/dc/DCTerminal.js +38 -0
- package/dist/model/dc/DCTerminal.js.map +1 -0
- package/dist/model/dc/VsConverter.d.ts +18 -0
- package/dist/model/dc/VsConverter.js +33 -0
- package/dist/model/dc/VsConverter.js.map +1 -0
- package/dist/model/dc/VsPpccControlKind.d.ts +7 -0
- package/dist/model/dc/VsPpccControlKind.js +12 -0
- package/dist/model/dc/VsPpccControlKind.js.map +1 -0
- package/dist/model/dc/VsQpccControlKind.d.ts +5 -0
- package/dist/model/dc/VsQpccControlKind.js +10 -0
- package/dist/model/dc/VsQpccControlKind.js.map +1 -0
- package/dist/model/domain/UnitMultiplier.js.map +1 -1
- package/dist/model/extensions/amprion/model/AmprionModell.d.ts +25 -0
- package/dist/model/extensions/amprion/model/AmprionModell.js +64 -0
- package/dist/model/extensions/amprion/model/AmprionModell.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProject.d.ts +34 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProject.js +134 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProject.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.d.ts +17 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.js +77 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.d.ts +14 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.js +57 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProject.d.ts +7 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProject.js +17 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProject.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectPhase.d.ts +19 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectPhase.js +74 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectPhase.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectStructure.d.ts +15 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectStructure.js +26 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectStructure.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONProjectPriorityKind.d.ts +5 -0
- package/dist/model/extensions/amprion/project/AMPRIONProjectPriorityKind.js +10 -0
- package/dist/model/extensions/amprion/project/AMPRIONProjectPriorityKind.js.map +1 -0
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.d.ts +9 -0
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js +46 -0
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js.map +1 -0
- package/dist/model/extensions/enervance/operations/EVTerminalAction.js.map +1 -1
- package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js.map +1 -1
- package/dist/model/generation/WindGeneratingUnit.d.ts +5 -0
- package/dist/model/generation/WindGeneratingUnit.js +66 -0
- package/dist/model/generation/WindGeneratingUnit.js.map +1 -1
- package/dist/model/model/Model.d.ts +39 -1
- package/dist/model/model/Model.js +91 -1
- package/dist/model/model/Model.js.map +1 -1
- package/dist/model/wires/ACLineSegment.d.ts +1 -0
- package/dist/model/wires/ACLineSegment.js +15 -2
- package/dist/model/wires/ACLineSegment.js.map +1 -1
- package/dist/model/wires/AsynchronousMachine.d.ts +1 -0
- package/dist/model/wires/AsynchronousMachine.js +37 -1
- package/dist/model/wires/AsynchronousMachine.js.map +1 -1
- package/dist/model/wires/Disconnector.js +1 -1
- package/dist/model/wires/EnergySource.d.ts +2 -0
- package/dist/model/wires/EnergySource.js +28 -2
- package/dist/model/wires/EnergySource.js.map +1 -1
- package/dist/model/wires/SeriesCompensator.d.ts +18 -2
- package/dist/model/wires/SeriesCompensator.js +108 -5
- package/dist/model/wires/SeriesCompensator.js.map +1 -1
- package/dist/util/util-create.js.map +1 -1
- package/dist/util/util-topology.d.ts +2 -2
- package/dist/util/util-topology.js +14 -6
- package/dist/util/util-topology.js.map +1 -1
- package/package.json +1 -1
- package/src/config/westnetz-neplan/neplan-load.config.ts +1 -1
- package/src/constants/cim-class-definition.ts +20 -1
- package/src/constants/cim-class-names.ts +9 -0
- package/src/converter/integral7/ConverterIntegral7.ts +753 -345
- package/src/converter/integral7/config/db-config.ts +3 -2
- package/src/converter/integral7/model/integral/Hgueleitung.ts +12 -0
- package/src/converter/integral7/model/integral/Kopfstation.ts +46 -0
- package/src/converter/integral7/model/interfaces.ts +23 -16
- package/src/converter/integral7/sql/integral.sql.ts +27 -1
- package/src/converter/integral7/utils.ts +43 -11
- package/src/etl-neplan/etl-neplan-contingency-analysis.ts +30 -12
- package/src/etl-neplan/etl-neplan-feederline.ts +100 -17
- package/src/etl-neplan/etl-neplan.ts +1 -0
- package/src/etl-neplan/neplan-contingency-analysis.ts +572 -0
- package/src/graph/Types.ts +7 -0
- package/src/graph/connections/connection.ts +29 -0
- package/src/graph/edges/edge.ts +27 -0
- package/src/graph/graph-interfaces.ts +21 -0
- package/src/graph/graph-util.ts +158 -0
- package/src/graph/graph.ts +84 -0
- package/src/graph/nodes/node.ts +43 -0
- package/src/index.ts +8 -0
- package/src/model/core/ACDCTerminal.ts +2 -2
- package/src/model/core/ConnectivityNode.ts +2 -2
- package/src/model/core/PSRType.ts +3 -6
- package/src/model/core/PowerSystemResource.ts +3 -7
- package/src/model/core/Substation.ts +6 -0
- package/src/model/core/Terminal.ts +15 -6
- package/src/model/core/VoltageLevel.ts +0 -1
- package/src/model/dc/ACDCConverter.ts +66 -0
- package/src/model/dc/ACDCConverterDCTerminal.ts +64 -0
- package/src/model/dc/CsConverter.ts +68 -0
- package/src/model/dc/CsOperatingModeKind.ts +4 -0
- package/src/model/dc/CsPpccControlKind.ts +5 -0
- package/src/model/dc/DCBaseTerminal.ts +30 -0
- package/src/model/dc/DCConductingEquipment.ts +8 -0
- package/src/model/dc/DCConverterOperatingModeKind.ts +6 -0
- package/src/model/dc/DCConverterUnit.ts +60 -0
- package/src/model/dc/DCEquipmentContainer.ts +8 -0
- package/src/model/dc/DCLine.ts +56 -0
- package/src/model/dc/DCLineSegment.ts +81 -0
- package/src/model/dc/DCNode.ts +49 -0
- package/src/model/dc/DCPolarityKind.ts +5 -0
- package/src/model/dc/DCTerminal.ts +45 -0
- package/src/model/dc/VsConverter.ts +48 -0
- package/src/model/dc/VsPpccControlKind.ts +7 -0
- package/src/model/dc/VsQpccControlKind.ts +5 -0
- package/src/model/domain/UnitMultiplier.ts +12 -12
- package/src/model/equivalents/EquivalentBranch.ts +10 -10
- package/src/model/extensions/amprion/model/AmprionModell.ts +92 -0
- package/src/model/extensions/amprion/project/AMPRIONConstructionProject.ts +174 -0
- package/src/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.ts +89 -0
- package/src/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.ts +64 -0
- package/src/model/extensions/amprion/project/AMPRIONErpProject.ts +21 -0
- package/src/model/extensions/amprion/project/AMPRIONErpProjectPhase.ts +89 -0
- package/src/model/extensions/amprion/project/AMPRIONErpProjectStructure.ts +36 -0
- package/src/model/extensions/amprion/project/AMPRIONProjectPriorityKind.ts +5 -0
- package/src/model/extensions/amprion/wires/AMPRIONSeriesCompensator.ts +53 -0
- package/src/model/extensions/enervance/core/EVTerminal.ts +1 -1
- package/src/model/extensions/enervance/operations/EVTerminalAction.ts +0 -1
- package/src/model/extensions/neplan-westnetz/assets/WNFacility.ts +0 -1
- package/src/model/generation/WindGeneratingUnit.ts +73 -0
- package/src/model/model/Model.ts +131 -7
- package/src/model/wires/ACLineSegment.ts +244 -228
- package/src/model/wires/AsynchronousMachine.ts +38 -1
- package/src/model/wires/Disconnector.ts +1 -1
- package/src/model/wires/EnergySource.ts +256 -222
- package/src/model/wires/SeriesCompensator.ts +145 -19
- package/src/util/util-create.ts +2 -0
- package/src/util/util-topology.ts +18 -7
- package/test/apache-jena-fuseki-interface/{apache-jena-fuseki-neplan.tests.spec.ts → apache-jena-fuseki-neplan-1.tests.sp-ec.ts} +0 -26
- package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-2.tests.spec.ts +255 -0
- package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_EQ_V1.xml +20867 -0
- package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_SSH_V1.xml +3784 -0
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_EQ_V1.xml +42546 -0
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SSH_V1.xml +10101 -0
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SV_V1.xml +6229 -0
- package/test/integral7-converter/integral7-converter.tests.spec.ts +12 -3
- package/test/power-system-data-model-converter/power-system-data-model-converter.tests.spec.ts +1 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/tdb.lock +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ACDCTerminal } from '../core/ACDCTerminal';
|
|
2
|
+
import { DCNode } from './DCNode';
|
|
3
|
+
import { RDF_XML } from '../../constants/rdf-xml';
|
|
4
|
+
import { writeElementAttribute } from '../../util/utils';
|
|
5
|
+
import XMLWriter from 'xml-writer';
|
|
6
|
+
|
|
7
|
+
export class DCBaseTerminal extends ACDCTerminal {
|
|
8
|
+
|
|
9
|
+
dcNode: DCNode;
|
|
10
|
+
dcNodeUUID: string;
|
|
11
|
+
|
|
12
|
+
protected toCIMXMLAssociations(xmlWriter: XMLWriter, profile: string) {
|
|
13
|
+
super.toCIMXMLAssociations(xmlWriter, profile);
|
|
14
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
15
|
+
if (this.dcNode) {
|
|
16
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, 'DCBaseTerminal.DCNode', RDF_XML.CIM_NS_16);
|
|
17
|
+
writeElementAttribute(xmlWriter, RDF_XML.RDF_RESRC, `${RDF_XML.HASH_UNDERSCORE}${this.dcNode.mrid}`);
|
|
18
|
+
xmlWriter.endElement();
|
|
19
|
+
} else if (this.dcNodeUUID) {
|
|
20
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, 'DCBaseTerminal.DCNode', RDF_XML.CIM_NS_16);
|
|
21
|
+
writeElementAttribute(xmlWriter, RDF_XML.RDF_RESRC, `${RDF_XML.HASH_UNDERSCORE}${this.dcNodeUUID}`);
|
|
22
|
+
xmlWriter.endElement();
|
|
23
|
+
} else {
|
|
24
|
+
if (this.constructor.name === 'DCBaseTerminal') {
|
|
25
|
+
xmlWriter.writeComment('DCNode is not defined');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { DCEquipmentContainer } from './DCEquipmentContainer';
|
|
2
|
+
import { DCConverterOperatingModeKind } from './DCConverterOperatingModeKind';
|
|
3
|
+
import { Substation } from '../core/Substation';
|
|
4
|
+
import { RDF_XML } from '../../constants/rdf-xml';
|
|
5
|
+
import { writeElementAttribute } from '../../util/utils';
|
|
6
|
+
import XMLWriter from 'xml-writer';
|
|
7
|
+
|
|
8
|
+
export class DCConverterUnit extends DCEquipmentContainer {
|
|
9
|
+
|
|
10
|
+
operationMode: DCConverterOperatingModeKind; // cgmes mandatory
|
|
11
|
+
substation: Substation;
|
|
12
|
+
substationUUID: string;
|
|
13
|
+
|
|
14
|
+
constructor(uuid?: string, name?: string, shortName?: string, description?: string) {
|
|
15
|
+
super(uuid, name, shortName, description);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
setSubstation(substation: Substation) {
|
|
19
|
+
this.substation = substation;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** CIM RDF/XML Serialisierung */
|
|
23
|
+
public toCIMXML(xmlWriter: XMLWriter, profile: string) {
|
|
24
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
25
|
+
const suffixID = this.getSuffixID(profile);
|
|
26
|
+
const prefixUUID = this.getPrefixUUID(suffixID);
|
|
27
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, this.constructor.name, RDF_XML.CIM_NS_16);
|
|
28
|
+
writeElementAttribute(xmlWriter, suffixID, `${prefixUUID}${this.mrid}`);
|
|
29
|
+
this.toCIMXMLAttributes(xmlWriter, profile);
|
|
30
|
+
this.toCIMXMLAssociations(xmlWriter, profile);
|
|
31
|
+
xmlWriter.endElement();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
protected toCIMXMLAttributes(xmlWriter: XMLWriter, profile: string) {
|
|
36
|
+
super.toCIMXMLAttributes(xmlWriter, profile);
|
|
37
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
38
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, `${this.constructor.name}.operationMode`, RDF_XML.CIM_NS_16);
|
|
39
|
+
writeElementAttribute(xmlWriter, RDF_XML.RDF_RESRC, `${RDF_XML.CIM_NS_16}DCConverterOperatingModeKind.${this.operationMode ? this.operationMode : DCConverterOperatingModeKind.monopolarGroundReturn}`);
|
|
40
|
+
xmlWriter.endElement();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
protected toCIMXMLAssociations(xmlWriter: XMLWriter, profile: string) {
|
|
45
|
+
super.toCIMXMLAssociations(xmlWriter, profile);
|
|
46
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
47
|
+
if (this.substation) {
|
|
48
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, `${this.constructor.name}.Substation`, RDF_XML.CIM_NS_16);
|
|
49
|
+
writeElementAttribute(xmlWriter, RDF_XML.RDF_RESRC, `${RDF_XML.HASH_UNDERSCORE}${this.substation.mrid}`);
|
|
50
|
+
xmlWriter.endElement();
|
|
51
|
+
} else if (this.substationUUID) {
|
|
52
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, `${this.constructor.name}.Substation`, RDF_XML.CIM_NS_16);
|
|
53
|
+
writeElementAttribute(xmlWriter, RDF_XML.RDF_RESRC, `${RDF_XML.HASH_UNDERSCORE}${this.substationUUID}`);
|
|
54
|
+
xmlWriter.endElement();
|
|
55
|
+
} else {
|
|
56
|
+
xmlWriter.writeComment(`${this.constructor.name}.Substation is not defined`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { DCEquipmentContainer } from './DCEquipmentContainer';
|
|
2
|
+
import { SubGeographicalRegion } from '../core/SubGeographicalRegion';
|
|
3
|
+
import { RDF_XML } from '../../constants/rdf-xml';
|
|
4
|
+
import { writeElementAttribute } from '../../util/utils';
|
|
5
|
+
import XMLWriter from 'xml-writer';
|
|
6
|
+
import { DCConverterOperatingModeKind } from './DCConverterOperatingModeKind';
|
|
7
|
+
|
|
8
|
+
export class DCLine extends DCEquipmentContainer {
|
|
9
|
+
|
|
10
|
+
region: SubGeographicalRegion;
|
|
11
|
+
regionUUID: string;
|
|
12
|
+
|
|
13
|
+
constructor(mrid?: string, name?: string, shortName?: string, description?: string) {
|
|
14
|
+
super(mrid, name, shortName, description);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public static sparqlQuery: string = `
|
|
18
|
+
PREFIX cim: <http://iec.ch/TC57/2013/CIM-schema-cim16#>
|
|
19
|
+
PREFIX enervance: <http://enervance.com/CIM/Extensions#>
|
|
20
|
+
PREFIX entsoe: <http://entsoe.eu/CIM/SchemaExtension/3/1#>
|
|
21
|
+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
|
22
|
+
PREFIX apf: <http://jena.hpl.hp.com/ARQ/property#>
|
|
23
|
+
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
|
24
|
+
|
|
25
|
+
SELECT (STRAFTER(str(?hsUUID), '#_') AS ?uuid)
|
|
26
|
+
(CONCAT(STRBEFORE(str(?hsUUID), '#_'), '#_') AS ?baseIRI)
|
|
27
|
+
?name
|
|
28
|
+
WHERE {
|
|
29
|
+
GRAPH <http://default/>{
|
|
30
|
+
?MRID rdf:type cim:DCLine .
|
|
31
|
+
OPTIONAL { ?MRID cim:IdentifiedObject.name ?name .}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
public static getQuerySPARQL(graphURI: string) : string{
|
|
37
|
+
if(graphURI.length > 0){
|
|
38
|
+
return DCLine.sparqlQuery.replace('<http://default/>', graphURI);
|
|
39
|
+
}
|
|
40
|
+
return DCLine.sparqlQuery;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public toCIMXML(xmlWriter: XMLWriter, profile: string) {
|
|
44
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
45
|
+
const suffixID = this.getSuffixID(profile);
|
|
46
|
+
const prefixUUID = this.getPrefixUUID(suffixID);
|
|
47
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, this.constructor.name, RDF_XML.CIM_NS_16);
|
|
48
|
+
writeElementAttribute(xmlWriter, suffixID, `${prefixUUID}${this.mrid}`);
|
|
49
|
+
this.toCIMXMLAttributes(xmlWriter, profile);
|
|
50
|
+
this.toCIMXMLAssociations(xmlWriter, profile);
|
|
51
|
+
xmlWriter.endElement();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { DCConductingEquipment } from './DCConductingEquipment';
|
|
2
|
+
import XMLWriter from 'xml-writer';
|
|
3
|
+
import { RDF_XML } from '../../constants/rdf-xml';
|
|
4
|
+
import { writeElement, writeElementAttribute } from '../../util/utils';
|
|
5
|
+
export class DCLineSegment extends DCConductingEquipment {
|
|
6
|
+
|
|
7
|
+
/** Capacitance of the DC line segment. Significant for cables only. */
|
|
8
|
+
capacitance: number;
|
|
9
|
+
|
|
10
|
+
/** Inductance of the DC line segment. Neglectable compared with DCSeriesDevice used for smoothing.*/
|
|
11
|
+
inductance: number;
|
|
12
|
+
|
|
13
|
+
/** Resistance of the DC line segment. */
|
|
14
|
+
resistance: number;
|
|
15
|
+
|
|
16
|
+
/** Segment length for calculating line section capabilities. */
|
|
17
|
+
length: number;
|
|
18
|
+
|
|
19
|
+
constructor(mrid?: string, name?: string, shortName?: string, description?: string) {
|
|
20
|
+
super(mrid, name, shortName, description);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public static sparqlQuery: string = `
|
|
24
|
+
PREFIX cim: <http://iec.ch/TC57/2013/CIM-schema-cim16#>
|
|
25
|
+
PREFIX enervance: <http://enervance.com/CIM/Extensions#>
|
|
26
|
+
PREFIX entsoe: <http://entsoe.eu/CIM/SchemaExtension/3/1#>
|
|
27
|
+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
|
28
|
+
PREFIX apf: <http://jena.hpl.hp.com/ARQ/property#>
|
|
29
|
+
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
|
30
|
+
|
|
31
|
+
SELECT (STRAFTER(str(?hsUUID), '#_') AS ?uuid)
|
|
32
|
+
(CONCAT(STRBEFORE(str(?hsUUID), '#_'), '#_') AS ?baseIRI)
|
|
33
|
+
?name ?capacitance ?inductance ?length ?resistance
|
|
34
|
+
|
|
35
|
+
(strafter(strafter(str(?ecUUID), '#'), '_') AS ?equipmentContainerUUID)
|
|
36
|
+
WHERE {
|
|
37
|
+
GRAPH <http://default/>{
|
|
38
|
+
?MRID rdf:type cim:DCLine .
|
|
39
|
+
OPTIONAL { ?MRID cim:IdentifiedObject.name ?name .}
|
|
40
|
+
OPTIONAL { ?MRID cim:DCLineSegment.capacitance ?capacitance .}
|
|
41
|
+
OPTIONAL { ?MRID cim:DCLineSegment.inductance ?inductance .}
|
|
42
|
+
OPTIONAL { ?MRID cim:DCLineSegment.length ?length .}
|
|
43
|
+
OPTIONAL { ?MRID cim:DCLineSegment.resistance ?resistance .}
|
|
44
|
+
|
|
45
|
+
OPTIONAL {?acLineSegmentUUID cim:Equipment.EquipmentContainer ?ecUUID .}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
|
|
50
|
+
public static getQuerySPARQL(graphURI: string) : string{
|
|
51
|
+
if(graphURI.length > 0){
|
|
52
|
+
return DCLineSegment.sparqlQuery.replace('<http://default/>', graphURI);
|
|
53
|
+
}
|
|
54
|
+
return DCLineSegment.sparqlQuery;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** CIM RDF/XML Serialisierung */
|
|
58
|
+
public toCIMXML(xmlWriter: XMLWriter, profile: string) {
|
|
59
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
60
|
+
const suffixID = this.getSuffixID(profile);
|
|
61
|
+
const prefixUUID = this.getPrefixUUID(suffixID);
|
|
62
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, this.constructor.name, RDF_XML.CIM_NS_16);
|
|
63
|
+
writeElementAttribute(xmlWriter, suffixID, `${prefixUUID}${this.mrid}`);
|
|
64
|
+
this.toCIMXMLAttributes(xmlWriter, profile);
|
|
65
|
+
this.toCIMXMLAssociations(xmlWriter, profile);
|
|
66
|
+
xmlWriter.endElement();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
protected toCIMXMLAttributes(xmlWriter: XMLWriter, profile: string) {
|
|
71
|
+
super.toCIMXMLAttributes(xmlWriter, profile);
|
|
72
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
73
|
+
if (this.length > 0) writeElement(xmlWriter, `${RDF_XML.CIM_NS_PREFIX}:DCLineSegment.length`, this.length);
|
|
74
|
+
if (this.capacitance > 0) writeElement(xmlWriter, `${RDF_XML.CIM_NS_PREFIX}:DCLineSegment.capacitance`, this.capacitance);
|
|
75
|
+
if (this.inductance > 0) writeElement(xmlWriter, `${RDF_XML.CIM_NS_PREFIX}:DCLineSegment.inductance`, this.inductance);
|
|
76
|
+
if (this.resistance > 0) writeElement(xmlWriter, `${RDF_XML.CIM_NS_PREFIX}:DCLineSegment.resistance`, this.resistance);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { IdentifiedObject } from '../core/IdentifiedObject';
|
|
2
|
+
import { DCEquipmentContainer } from './DCEquipmentContainer';
|
|
3
|
+
import { DCBaseTerminal } from './DCBaseTerminal';
|
|
4
|
+
import { RDF_XML } from '../../constants/rdf-xml';
|
|
5
|
+
import { writeElementAttribute } from '../../util/utils';
|
|
6
|
+
import XMLWriter from 'xml-writer';
|
|
7
|
+
|
|
8
|
+
export class DCNode extends IdentifiedObject {
|
|
9
|
+
|
|
10
|
+
dcEquipmentContainer: DCEquipmentContainer; // mandatory
|
|
11
|
+
dcEquipmentContainerUUID: string;
|
|
12
|
+
|
|
13
|
+
/** ACDCConverterDCTerminal / DCTerminal*/
|
|
14
|
+
dcTerminals: Map<string, DCBaseTerminal> = new Map();
|
|
15
|
+
|
|
16
|
+
constructor(uuid?: string, name?: string, shortName?: string, description?: string) {
|
|
17
|
+
super(uuid, name, shortName, description);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** CIM RDF/XML Serialisierung */
|
|
21
|
+
public toCIMXML(xmlWriter: XMLWriter, profile: string) {
|
|
22
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
23
|
+
const suffixID = this.getSuffixID(profile);
|
|
24
|
+
const prefixUUID = this.getPrefixUUID(suffixID);
|
|
25
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, this.constructor.name, RDF_XML.CIM_NS_16);
|
|
26
|
+
writeElementAttribute(xmlWriter, suffixID, `${prefixUUID}${this.mrid}`);
|
|
27
|
+
this.toCIMXMLAttributes(xmlWriter, profile);
|
|
28
|
+
this.toCIMXMLAssociations(xmlWriter, profile);
|
|
29
|
+
xmlWriter.endElement();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
protected toCIMXMLAssociations(xmlWriter: XMLWriter, profile: string) {
|
|
34
|
+
super.toCIMXMLAssociations(xmlWriter, profile);
|
|
35
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
36
|
+
this.dcEquipmentContainerUUID = this.dcEquipmentContainer ?this.dcEquipmentContainer.mrid : this.dcEquipmentContainerUUID;
|
|
37
|
+
if (this.dcEquipmentContainerUUID) {
|
|
38
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, 'DCNode.DCEquipmentContainer', RDF_XML.CIM_NS_16);
|
|
39
|
+
writeElementAttribute(xmlWriter, RDF_XML.RDF_RESRC, `${RDF_XML.HASH_UNDERSCORE}${this.dcEquipmentContainerUUID}`);
|
|
40
|
+
xmlWriter.endElement();
|
|
41
|
+
} else {
|
|
42
|
+
if (this.constructor.name === 'DCNode') {
|
|
43
|
+
xmlWriter.writeComment('DCEquipmentContainer is not defined');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { DCBaseTerminal } from './DCBaseTerminal';
|
|
2
|
+
import { DCConductingEquipment } from './DCConductingEquipment';
|
|
3
|
+
import { RDF_XML } from '../../constants/rdf-xml';
|
|
4
|
+
import { writeElementAttribute } from '../../util/utils';
|
|
5
|
+
import XMLWriter from 'xml-writer';
|
|
6
|
+
|
|
7
|
+
export class DCTerminal extends DCBaseTerminal {
|
|
8
|
+
|
|
9
|
+
/** */
|
|
10
|
+
dCConductingEquipment: DCConductingEquipment; // mandatory
|
|
11
|
+
dCConductingEquipmentUUID: string;
|
|
12
|
+
|
|
13
|
+
constructor(mrid?: string, name?: string, shortName?: string, description?: string) {
|
|
14
|
+
super(mrid, name, shortName, description);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/** CIM RDF/XML Serialisierung */
|
|
19
|
+
public toCIMXML(xmlWriter: XMLWriter, profile: string) {
|
|
20
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
21
|
+
const suffixID = this.getSuffixID(profile);
|
|
22
|
+
const prefixUUID = this.getPrefixUUID(suffixID);
|
|
23
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, this.constructor.name, RDF_XML.CIM_NS_16);
|
|
24
|
+
writeElementAttribute(xmlWriter, suffixID, `${prefixUUID}${this.mrid}`);
|
|
25
|
+
this.toCIMXMLAttributes(xmlWriter, profile);
|
|
26
|
+
this.toCIMXMLAssociations(xmlWriter, profile);
|
|
27
|
+
xmlWriter.endElement();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
protected toCIMXMLAssociations(xmlWriter: XMLWriter, profile: string) {
|
|
32
|
+
super.toCIMXMLAssociations(xmlWriter, profile);
|
|
33
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
34
|
+
this.dCConductingEquipmentUUID = this.dCConductingEquipment ?this.dCConductingEquipment.mrid : this.dCConductingEquipmentUUID;
|
|
35
|
+
if (this.dCConductingEquipmentUUID) {
|
|
36
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, 'DCTerminal.DCConductingEquipment', RDF_XML.CIM_NS_16);
|
|
37
|
+
writeElementAttribute(xmlWriter, RDF_XML.RDF_RESRC, `${RDF_XML.HASH_UNDERSCORE}${this.dCConductingEquipmentUUID}`);
|
|
38
|
+
xmlWriter.endElement();
|
|
39
|
+
} else {
|
|
40
|
+
xmlWriter.writeComment('DCConductingEquipment is not defined');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ACDCConverter } from './ACDCConverter';
|
|
2
|
+
import { VsPpccControlKind } from './VsPpccControlKind';
|
|
3
|
+
import { VsQpccControlKind } from './VsQpccControlKind';
|
|
4
|
+
import { RDF_XML } from '../../constants/rdf-xml';
|
|
5
|
+
import { writeElement, writeElementAttribute } from '../../util/utils';
|
|
6
|
+
import XMLWriter from 'xml-writer';
|
|
7
|
+
|
|
8
|
+
export class VsConverter extends ACDCConverter {
|
|
9
|
+
|
|
10
|
+
/** The max quotient between the AC converter voltage (Uc) and DC voltage (Ud). A factor typically less than 1. VSC configuration data used in power flow. */
|
|
11
|
+
maxModulationIndex: number;
|
|
12
|
+
/** The maximum current through a valve. This current limit is the basis for calculating the capability diagram. VSC configuration data. */
|
|
13
|
+
maxValveCurrent: number;
|
|
14
|
+
|
|
15
|
+
droop: number; // PU mandatory
|
|
16
|
+
droopCompensation: number; // resistance mandatory
|
|
17
|
+
pPccControl: VsPpccControlKind; // mandatory Kind of control of real power and/or DC voltage.
|
|
18
|
+
qPccControl: VsQpccControlKind; // mandatory
|
|
19
|
+
qShare: number; // Percent mandatory Reactive power sharing factor among parallel converters on Uac control.
|
|
20
|
+
targetQpcc: number; // ReactivePower mandatory
|
|
21
|
+
targetUpcc: number; // Voltage mandatory
|
|
22
|
+
|
|
23
|
+
constructor(uuid?: string, name?: string, shortName?: string, description?: string) {
|
|
24
|
+
super(uuid, name, shortName, description);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** CIM RDF/XML Serialisierung */
|
|
28
|
+
public toCIMXML(xmlWriter: XMLWriter, profile: string) {
|
|
29
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
30
|
+
const suffixID = this.getSuffixID(profile);
|
|
31
|
+
const prefixUUID = this.getPrefixUUID(suffixID);
|
|
32
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, this.constructor.name, RDF_XML.CIM_NS_16);
|
|
33
|
+
writeElementAttribute(xmlWriter, suffixID, `${prefixUUID}${this.mrid}`);
|
|
34
|
+
this.toCIMXMLAttributes(xmlWriter, profile);
|
|
35
|
+
this.toCIMXMLAssociations(xmlWriter, profile);
|
|
36
|
+
xmlWriter.endElement();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
protected toCIMXMLAttributes(xmlWriter: XMLWriter, profile: string) {
|
|
41
|
+
super.toCIMXMLAttributes(xmlWriter, profile);
|
|
42
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
43
|
+
if (this.maxModulationIndex > 0) writeElement(xmlWriter, `${RDF_XML.CIM_NS_PREFIX}:VsConverter.maxModulationIndex`, this.maxModulationIndex);
|
|
44
|
+
if (this.maxValveCurrent > 0) writeElement(xmlWriter, `${RDF_XML.CIM_NS_PREFIX}:VsConverter.maxValveCurrent`, this.maxValveCurrent);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export enum VsPpccControlKind {
|
|
2
|
+
pPcc = 'pPcc', // Control variable (target) is real power at PCC bus.
|
|
3
|
+
udc = 'udc', // Control variable (target) is DC voltage and real power at PCC bus is derived.
|
|
4
|
+
pPccAndUdcDroop = 'pPccAndUdcDroop', // Control variables (targets) are both active power at point of common coupling and local DC voltage, with the droop.
|
|
5
|
+
pPccAndUdcDroopWithCompensation = 'pPccAndUdcDroopWithCompensation', // Control variables (targets) are both active power at point of common coupling and compensated DC voltage, with the droop; compensation factor is the resistance, as an approximation of the DC voltage of a common (real or virtual) node in the DC network.
|
|
6
|
+
pPccAndUdcDroopPilot = 'pPccAndUdcDroopPilot', // Control variables (targets) are both active power at point of common coupling and the pilot DC voltage, with the droop.
|
|
7
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export enum UnitMultiplier{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
export enum UnitMultiplier {
|
|
2
|
+
p = 'p',
|
|
3
|
+
n = 'n',
|
|
4
|
+
micro = 'micro',
|
|
5
|
+
m = 'm',
|
|
6
|
+
c = 'c',
|
|
7
|
+
d = 'd',
|
|
8
|
+
k = 'k',
|
|
9
|
+
M = 'M',
|
|
10
|
+
G = 'G',
|
|
11
|
+
T = 'T',
|
|
12
|
+
none = 'none'
|
|
13
13
|
}
|
|
@@ -5,19 +5,19 @@ import XMLWriter from 'xml-writer';
|
|
|
5
5
|
|
|
6
6
|
export class EquivalentBranch extends EquivalentEquipment {
|
|
7
7
|
|
|
8
|
-
negativeR12: number;
|
|
9
|
-
negativeR21: number;
|
|
10
|
-
negativeX12: number;
|
|
11
|
-
negativeX21: number;
|
|
8
|
+
negativeR12: number; // Mandatory, if not r und x
|
|
9
|
+
negativeR21: number; // Mandatory, if not r und x
|
|
10
|
+
negativeX12: number; // Mandatory, if not r und x
|
|
11
|
+
negativeX21: number; // Mandatory, if not r und x
|
|
12
12
|
|
|
13
|
-
positiveR12: number;
|
|
14
|
-
positiveR21: number;
|
|
15
|
-
positiveX12: number;
|
|
16
|
-
positiveX21: number;
|
|
13
|
+
positiveR12: number; // Mandatory, if not r und x
|
|
14
|
+
positiveR21: number; // Mandatory, if not r und x
|
|
15
|
+
positiveX12: number; // Mandatory, if not r und x
|
|
16
|
+
positiveX21: number; // Mandatory, if not r und x
|
|
17
17
|
|
|
18
|
-
r: number;
|
|
18
|
+
r: number; // Mandatory
|
|
19
19
|
r21: number;
|
|
20
|
-
x: number;
|
|
20
|
+
x: number; // Mandatory
|
|
21
21
|
x21: number;
|
|
22
22
|
zeroR12: number;
|
|
23
23
|
zeroR21: number;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Model } from '../../../model/Model';
|
|
2
|
+
import { AMPRIONErpProjectPhase } from '../project/AMPRIONErpProjectPhase';
|
|
3
|
+
import { Substation } from '../../../core/Substation';
|
|
4
|
+
import { AMPRIONErpProjectStructure } from '../project/AMPRIONErpProjectStructure';
|
|
5
|
+
import { AMPRIONConstructionProject } from '../project/AMPRIONConstructionProject';
|
|
6
|
+
import { AMPRIONConstructionProjectBundle } from '../project/AMPRIONConstructionProjectBundle';
|
|
7
|
+
import { AMPRIONConstructionProjectPlan } from '../project/AMPRIONConstructionProjectPlan';
|
|
8
|
+
import { IdentifiedObject } from '../../../core/IdentifiedObject';
|
|
9
|
+
import { IFault } from '../../../../interfaces/model/faults/IFault';
|
|
10
|
+
import { IOutage } from '../../../../interfaces/model/operations/IOutage';
|
|
11
|
+
import { SwitchingPlan } from '../../../operations/SwitchingPlan';
|
|
12
|
+
import { ISwitchingAction } from '../../../../interfaces/model/operations/ISwitchingAction';
|
|
13
|
+
|
|
14
|
+
export class AmprionModel extends Model {
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
constructionProjectPlan: Map<string, AMPRIONConstructionProjectPlan> = new Map();
|
|
18
|
+
constructionProjectBundle: Map<string, AMPRIONConstructionProjectBundle> = new Map();
|
|
19
|
+
constructionProject: Map<string, AMPRIONConstructionProject> = new Map();
|
|
20
|
+
|
|
21
|
+
projectStructures: Map<string, AMPRIONErpProjectStructure> = new Map();
|
|
22
|
+
|
|
23
|
+
erpProjectPhases: Map<string, AMPRIONErpProjectPhase> = new Map();
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
constructor() {
|
|
28
|
+
super();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
resolveParsedAssociations() {
|
|
32
|
+
super.resolveParsedAssociations();
|
|
33
|
+
|
|
34
|
+
this.constructionProjectPlan.forEach((cimInstance: IdentifiedObject) => {
|
|
35
|
+
cimInstance.resolveParsedAssociations(this);
|
|
36
|
+
});
|
|
37
|
+
this.constructionProjectBundle.forEach((cimInstance: IdentifiedObject) => {
|
|
38
|
+
cimInstance.resolveParsedAssociations(this);
|
|
39
|
+
});
|
|
40
|
+
this.constructionProject.forEach((cimInstance: IdentifiedObject) => {
|
|
41
|
+
cimInstance.resolveParsedAssociations(this);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
this.erpProjectPhases.forEach((cimInstance: IdentifiedObject) => {
|
|
45
|
+
cimInstance.resolveParsedAssociations(this);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public getConstructionProject(uuid: string): AMPRIONConstructionProject | undefined {
|
|
50
|
+
return this.constructionProject.get(uuid);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public addConstructionProject(project: AMPRIONConstructionProject) {
|
|
54
|
+
this.constructionProject.set(project.getUUID(), project);
|
|
55
|
+
this.addErpProjectStructure(project);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public getErpProjectPhase(uuid: string): AMPRIONErpProjectPhase | undefined {
|
|
59
|
+
return this.erpProjectPhases.get(uuid);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public addErpProjectPhase(phase: AMPRIONErpProjectPhase) {
|
|
63
|
+
this.erpProjectPhases.set(phase.getUUID(), phase);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
addErpProjectStructure(structure: AMPRIONErpProjectStructure) {
|
|
67
|
+
this.projectStructures.set(structure.getUUID(), structure);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public getErpProjectStructure(uuid: string): AMPRIONErpProjectStructure | undefined {
|
|
71
|
+
return this.projectStructures.get(uuid);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public getConstructionProjectBundle(uuid: string): AMPRIONConstructionProjectBundle | undefined {
|
|
75
|
+
return this.constructionProjectBundle.get(uuid);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
public addConstructionProjectBundle(projectBundle: AMPRIONConstructionProjectBundle) {
|
|
79
|
+
this.constructionProjectBundle.set(projectBundle.getUUID(), projectBundle);
|
|
80
|
+
this.addErpProjectStructure(projectBundle);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
public getConstructionProjectPlan(uuid: string): AMPRIONConstructionProjectPlan | undefined {
|
|
84
|
+
return this.constructionProjectPlan.get(uuid);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
public addConstructionProjectPlan(projectPlan: AMPRIONConstructionProjectPlan) {
|
|
88
|
+
this.constructionProjectPlan.set(projectPlan.getUUID(), projectPlan);
|
|
89
|
+
this.addErpProjectStructure(projectPlan);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
}
|