Skip to content

Commit

Permalink
# Conflicts:
Browse files Browse the repository at this point in the history
#	dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/AbstractEquipmentGroovyExtension.groovy
#	dynawaltz/src/main/java/com/powsybl/dynawaltz/models/hvdc/DefaultHvdcModel.java
#	dynawaltz/src/main/java/com/powsybl/dynawaltz/models/hvdc/HvdcPvDangling.java
#	dynawaltz/src/main/java/com/powsybl/dynawaltz/models/hvdc/HvdcVscDangling.java
#	dynawaltz/src/main/java/com/powsybl/dynawaltz/models/lines/DefaultLineModel.java
#	dynawaltz/src/main/java/com/powsybl/dynawaltz/models/transformers/DefaultTransformerModel.java
#	dynawaltz/src/main/java/com/powsybl/dynawaltz/models/utils/SideConverter.java
#	dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/DisconnectHvdcEventXmlTest.java
#	dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/HvdcXmlTest.java
#	dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/WeccGenXmlTest.java
  • Loading branch information
Lisrte committed Jun 22, 2023
1 parent 4aa7936 commit 683f9f8
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ abstract class AbstractEquipmentGroovyExtension<T> {
new EquipmentConfig(
it.key as String,
it.value.get(MODEL_PREFIX) as String,
it.value.get(MODEL_PROPERTIES).collect { it.toUpperCase() } as String[]
it.value.get(MODEL_PROPERTIES).collect{it.toUpperCase()} as String[]
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
import com.powsybl.dynawaltz.models.loads.*;
import com.powsybl.dynawaltz.models.svarcs.StaticVarCompensator;
import com.powsybl.dynawaltz.models.transformers.TransformerFixedRatio;
import com.powsybl.dynawaltz.models.generators.GridFormingConverter;
import com.powsybl.dynawaltz.models.generators.SynchronizedWeccGen;
import com.powsybl.dynawaltz.models.generators.WeccGen;
import com.powsybl.iidm.network.Network;
import com.powsybl.iidm.network.test.EurostagTutorialExample1Factory;
import com.powsybl.iidm.network.test.HvdcTestNetwork;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*/
package com.powsybl.dynawaltz.models.hvdc;

import com.powsybl.dynawaltz.models.Side;
import com.powsybl.dynawaltz.models.defaultmodels.AbstractDefaultModel;
import com.powsybl.dynawaltz.models.Side;

/**
* @author Laurent Issertial <laurent.issertial at rte-france.com>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public HvdcPvDangling(String dynamicModelId, HvdcLine hvdc, String parameterSetI
@Override
public void createMacroConnections(DynaWaltzContext context) {
danglingSide.createMacroConnections(
this::getVarConnectionsWith,
(varCoSupplier, side) -> createMacroConnections(BusUtils.getConnectableBusStaticId(equipment, side), BusModel.class, varCoSupplier, context, side)
this::getVarConnectionsWith,
(varCoSupplier, side) -> createMacroConnections(BusUtils.getConnectableBusStaticId(equipment, side), BusModel.class, varCoSupplier, context, side)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public HvdcVscDangling(String dynamicModelId, HvdcLine hvdc, String parameterSet
@Override
public void createMacroConnections(DynaWaltzContext context) {
danglingSide.createMacroConnections(
this::getVarConnectionsWith,
(varCoSupplier, side) -> createMacroConnections(BusUtils.getConnectableBusStaticId(equipment, side), BusModel.class, varCoSupplier, context, side)
this::getVarConnectionsWith,
(varCoSupplier, side) -> createMacroConnections(BusUtils.getConnectableBusStaticId(equipment, side), BusModel.class, varCoSupplier, context, side)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/
package com.powsybl.dynawaltz.models.lines;

import com.powsybl.dynawaltz.models.Side;
import com.powsybl.dynawaltz.models.defaultmodels.AbstractDefaultModel;
import com.powsybl.dynawaltz.models.Side;

/**
* @author Florian Dupuy <florian.dupuy at rte-france.com>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*/
package com.powsybl.dynawaltz.models.transformers;

import com.powsybl.dynawaltz.models.defaultmodels.AbstractDefaultModel;
import com.powsybl.dynawaltz.models.Side;
import com.powsybl.dynawaltz.models.VarConnection;
import com.powsybl.dynawaltz.models.defaultmodels.AbstractDefaultModel;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public static Side convert(Branch.Side side) {

public static HvdcLine.Side convert(Side side) {
switch (side) {
case ONE:
case ONE :
return HvdcLine.Side.ONE;
case TWO:
case TWO :
return HvdcLine.Side.TWO;
default:
default :
throw new IllegalArgumentException("Unexpected Side value: " + side);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected void addDynamicModels(Function< Network, BlackBoxModel> hvdcConstructo

@ParameterizedTest(name = "{0}")
@MethodSource("provideModels")
void writeModel(String dydName, Function<Network, BlackBoxModel> hvdcConstructor, Function<Network, BlackBoxModel> disconnectConstructor) throws SAXException, IOException, XMLStreamException {
void writeModel(String dydName, Function< Network, BlackBoxModel> hvdcConstructor, Function< Network, BlackBoxModel> disconnectConstructor) throws SAXException, IOException, XMLStreamException {
DydXml.write(tmpDir, context);
ParametersXml.write(tmpDir, context);
validate("dyd.xsd", dydName, tmpDir.resolve(DynaWaltzConstants.DYD_FILENAME));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class HvdcXmlTest extends AbstractParametrizedDynamicModelXmlTest {
private static final String DYN_NAME = "BBM_" + HVDC_NAME;

@BeforeEach
void setup(String dydName, Function<Network, BlackBoxModel> constructor) {
void setup(String dydName, Function< Network, BlackBoxModel> constructor) {
setupNetwork();
addDynamicModels(constructor);
setupDynawaltzContext();
Expand All @@ -47,13 +47,13 @@ protected void setupNetwork() {
network = HvdcTestNetwork.createVsc();
}

protected void addDynamicModels(Function<Network, BlackBoxModel> constructor) {
protected void addDynamicModels(Function< Network, BlackBoxModel> constructor) {
dynamicModels.add(constructor.apply(network));
}

@ParameterizedTest(name = "{0}")
@MethodSource("provideHvdc")
void writeHvdcModel(String dydName, Function<Network, BlackBoxModel> constructor) throws SAXException, IOException, XMLStreamException {
void writeHvdcModel(String dydName, Function< Network, BlackBoxModel> constructor) throws SAXException, IOException, XMLStreamException {
DydXml.write(tmpDir, context);
validate("dyd.xsd", dydName, tmpDir.resolve(DynaWaltzConstants.DYD_FILENAME));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class WeccGenXmlTest extends AbstractParametrizedDynamicModelXmlTest {
private static final String DYN_WT_NAME = "BBM_WT";

@BeforeEach
void setup(String dydName, String parName, Function<Network, BlackBoxModel> loadConstructor) {
void setup(String dydName, String parName, Function< Network, BlackBoxModel> loadConstructor) {
setupNetwork();
addDynamicModels(loadConstructor);
setupDynawaltzContext();
Expand All @@ -45,13 +45,13 @@ protected void setupNetwork() {
network = EurostagTutorialExample1Factory.create();
}

protected void addDynamicModels(Function<Network, BlackBoxModel> constructor) {
protected void addDynamicModels(Function< Network, BlackBoxModel> constructor) {
dynamicModels.add(constructor.apply(network));
}

@ParameterizedTest(name = "{0}")
@MethodSource("provideWecc")
void writeModel(String dydName, String parName, Function<Network, BlackBoxModel> constructor) throws SAXException, IOException, XMLStreamException {
void writeModel(String dydName, String parName, Function< Network, BlackBoxModel> constructor) throws SAXException, IOException, XMLStreamException {
DydXml.write(tmpDir, context);
ParametersXml.write(tmpDir, context);
validate("dyd.xsd", dydName, tmpDir.resolve(DynaWaltzConstants.DYD_FILENAME));
Expand Down

0 comments on commit 683f9f8

Please sign in to comment.