Describe the current behavior
The SSH export writes an AsynchronousMachine element containing only RotatingMachine.p and RotatingMachine.q. Two other SSH-profile properties that were present in the imported file,
RegulatingCondEq.controlEnabled and AsynchronousMachine.asynchronousMachineType, are dropped.
As a direct consequence, applying such a file with Network.update(...) has no effect on the machine.
The update query is a single conjunctive pattern requiring all five triples
(cgmes-model/src/main/resources/CIM16-update.sparql:294). Two of the five are never written, so the pattern never matches.
Describe the expected behavior
An SSH file produced by PowSyBl should be usable in place of the SSH file it was derived from. Concretely:
- the exported
AsynchronousMachine element should carry the same SSH-profile properties as the input one, so that the file is a valid standalone SSH instance file;
- after
receiver.update(...), receiver.getLoad("AsynchronousMachine").getP0() and getQ0() should match the sender's values.
Describe the steps
@Test
void asynchronousMachineSetpointsAreLostOnRoundTrip() throws IOException {
Network sender = readCgmesResources("/update/load/", "load_EQ.xml", "load_SSH.xml");
Network receiver = readCgmesResources("/update/load/", "load_EQ.xml", "load_SSH.xml");
sender.getLoad("AsynchronousMachine").setP0(200.5).setQ0(50.5);
sender.getLoad("EnergyConsumer").setP0(10.5).setQ0(5.5); // control, round trips correctly
Path dir = Files.createTempDirectory("async");
Properties exportParameters = new Properties();
exportParameters.put(CgmesExport.PROFILES, List.of("SSH"));
sender.write("CGMES", exportParameters, dir.resolve("rt"));
Properties importParameters = new Properties();
importParameters.put("iidm.import.cgmes.use-previous-values-during-update", "true");
receiver.update(new GenericReadOnlyDataSource(dir, "rt"), importParameters);
assertEquals(10.5, receiver.getLoad("EnergyConsumer").getP0()); // passes
assertEquals(200.5, receiver.getLoad("AsynchronousMachine").getP0()); // fails: actual value is 200.0
}
Environment
- PowSyBl Core version: 7.4.0-SNAPSHOT,
main at commit 7a1ae581a9
- Java: Oracle GraalVM 21.0.11+9 LTS
- OS: Ubuntu 24.04.4 LTS (kernel 6.17.0)
Relevant Log Output
Input file, update/load/load_SSH.xml — five properties:
<cim:AsynchronousMachine rdf:about="#_AsynchronousMachine">
<cim:Equipment.inService>true</cim:Equipment.inService>
<cim:RegulatingCondEq.controlEnabled>false</cim:RegulatingCondEq.controlEnabled>
<cim:RotatingMachine.p>200</cim:RotatingMachine.p>
<cim:RotatingMachine.q>50</cim:RotatingMachine.q>
<cim:AsynchronousMachine.asynchronousMachineType rdf:resource="http://iec.ch/TC57/CIM100#AsynchronousMachineKind.motor" />
</cim:AsynchronousMachine>
Re-exported by PowSyBl — two properties:
<cim:AsynchronousMachine rdf:about="#_AsynchronousMachine">
<cim:RotatingMachine.p>200.5</cim:RotatingMachine.p>
<cim:RotatingMachine.q>50.5</cim:RotatingMachine.q>
</cim:AsynchronousMachine>
Extra Information
No response
Describe the current behavior
The SSH export writes an
AsynchronousMachineelement containing onlyRotatingMachine.pandRotatingMachine.q. Two other SSH-profile properties that were present in the imported file,RegulatingCondEq.controlEnabledandAsynchronousMachine.asynchronousMachineType, are dropped.As a direct consequence, applying such a file with
Network.update(...)has no effect on the machine.The update query is a single conjunctive pattern requiring all five triples
(
cgmes-model/src/main/resources/CIM16-update.sparql:294). Two of the five are never written, so the pattern never matches.Describe the expected behavior
An SSH file produced by PowSyBl should be usable in place of the SSH file it was derived from. Concretely:
AsynchronousMachineelement should carry the same SSH-profile properties as the input one, so that the file is a valid standalone SSH instance file;receiver.update(...),receiver.getLoad("AsynchronousMachine").getP0()andgetQ0()should match the sender's values.Describe the steps
Environment
mainat commit7a1ae581a9Relevant Log Output
Input file,
update/load/load_SSH.xml— five properties:Re-exported by PowSyBl — two properties:
Extra Information
No response