-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move model GeneratorPVFixed from synchronized generator to base gener…
…ator Rename GeneratorFictitiousBuilder to BaseGeneratorBuilder Update documentation Signed-off-by: lisrte <[email protected]>
- Loading branch information
Showing
11 changed files
with
83 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
dynawo-simulation/src/test/java/com/powsybl/dynawo/xml/BaseGeneratorModelXmlTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com/) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.dynawo.xml; | ||
|
||
import com.powsybl.dynawo.models.generators.BaseGeneratorBuilder; | ||
import com.powsybl.iidm.network.test.EurostagTutorialExample1Factory; | ||
import org.junit.jupiter.api.Test; | ||
import org.xml.sax.SAXException; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* @author Laurent Issertial {@literal <laurent.issertial at rte-france.com>} | ||
*/ | ||
class BaseGeneratorModelXmlTest extends AbstractDynamicModelXmlTest { | ||
|
||
@Override | ||
protected void setupNetwork() { | ||
network = EurostagTutorialExample1Factory.create(); | ||
} | ||
|
||
@Override | ||
protected void addDynamicModels() { | ||
dynamicModels.add(BaseGeneratorBuilder.of(network, "GeneratorPVFixed") | ||
.dynamicModelId("BBM_GEN") | ||
.staticId("GEN") | ||
.parameterSetId("g") | ||
.build()); | ||
} | ||
|
||
@Test | ||
void writeModel() throws SAXException, IOException { | ||
DydXml.write(tmpDir, context); | ||
validate("dyd.xsd", "generator_dyd.xml", tmpDir.resolve(DynawoSimulationConstants.DYD_FILENAME)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<dyn:dynamicModelsArchitecture xmlns:dyn="http://www.rte-france.com/dynawo"> | ||
<dyn:blackBoxModel id="BBM_GEN" lib="GeneratorPVFixed" parFile="models.par" parId="g" staticId="GEN"> | ||
<dyn:macroStaticRef id="MSR_GeneratorPVFixed"/> | ||
</dyn:blackBoxModel> | ||
<dyn:macroConnector id="MC_GeneratorPVFixed-DefaultEquipmentConnectionPoint"> | ||
<dyn:connect var1="generator_terminal" var2="@STATIC_ID@@NODE@_ACPIN"/> | ||
<dyn:connect var1="generator_switchOffSignal1" var2="@STATIC_ID@@NODE@_switchOff"/> | ||
</dyn:macroConnector> | ||
<dyn:macroStaticReference id="MSR_GeneratorPVFixed"> | ||
<dyn:staticRef var="generator_PGenPu" staticVar="p"/> | ||
<dyn:staticRef var="generator_QGenPu" staticVar="q"/> | ||
<dyn:staticRef var="generator_state" staticVar="state"/> | ||
</dyn:macroStaticReference> | ||
<dyn:macroConnect connector="MC_GeneratorPVFixed-DefaultEquipmentConnectionPoint" id1="BBM_GEN" id2="NETWORK"/> | ||
</dyn:dynamicModelsArchitecture> |