Skip to content

Commit

Permalink
Remove modifications on load export
Browse files Browse the repository at this point in the history
Signed-off-by: Coline PILOQUET <[email protected]>
  • Loading branch information
colinepiloquet committed Jan 27, 2025
1 parent 4ed3fe2 commit 261a8cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ private static UcteNetwork createUcteNetwork(Network network, NamingStrategy nam
private static void convertBus(UcteNetwork ucteNetwork, Bus bus, UcteExporterContext context) {
LOGGER.trace("Converting bus {}", bus.getId());

if (bus.getLoadStream().count() > 1) {
throw new UcteException("Too many loads connected to this bus");
}

UcteNodeCode ucteNodeCode = context.getNamingStrategy().getUcteNodeCode(bus);
String geographicalName = bus.getProperty(GEOGRAPHICAL_NAME_PROPERTY_KEY, null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ void roundTripOfCombineRtcAndPtc() throws IOException {
@Test
void testMultipleGeneratorsAndLoads() throws IOException {
Network network = EurostagTutorialExample1Factory.create();

// Splits generation on two generators
network.getVoltageLevel("VLGEN").newGenerator()
.setId("GEN2")
.setBus("NGEN")
Expand All @@ -276,13 +278,6 @@ void testMultipleGeneratorsAndLoads() throws IOException {
.setTargetP(607.0)
.setTargetQ(301.0)
.add();
network.getVoltageLevel("VLLOAD").newLoad()
.setId("LOAD2")
.setBus("NLOAD")
.setConnectableBus("NLOAD")
.setP0(600.0)
.setQ0(200.0)
.add();
Properties p = new Properties();
p.put(UcteExporter.NAMING_STRATEGY, "Counter");
testExporter(network, "/eurostagMultipleGeneratorAndLoad.uct", p);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Case date: 2025-01-22T13:55:04.794803389Z
F0000070 0 2 24.500 0.00000 0.00000 -1214.0 -602.00 9999.99 -9999.9 9999.99 -9999.9 F
F0000110 0 0 0.00000 0.00000 0.00000 0.00000
F0000210 0 0 0.00000 0.00000 0.00000 0.00000
F0000330 0 0 1200.00 400.000 0.00000 0.00000
F0000330 0 0 600.000 200.000 0.00000 0.00000
##L
F0000110 F0000210 0 0 3.0000 33.000 386.0000
F0000110 F0000210 1 0 3.0000 33.000 386.0000
Expand Down

0 comments on commit 261a8cb

Please sign in to comment.