Class BasicAmplExporter
java.lang.Object
com.powsybl.ampl.converter.version.BasicAmplExporter
- All Implemented Interfaces:
AmplColumnsExporter
- Direct Known Subclasses:
ExtendedAmplExporter
Legacy exporter that must be retrocompatible,
and only fixes should be made on this class.
- Author:
- Nicolas Pierre <nicolas.pierre at artelys.com> for the refactor, Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com> for the original code
-
Constructor Summary
ConstructorDescriptionBasicAmplExporter
(AmplExportConfig config, Network network, StringToIntMapper<AmplSubset> mapper, int variantIndex, int faultNum, int actionNum) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdditionalCellsBusesColumns
(TableFormatterHelper formatterHelper, Bus b) void
addAdditionalCellsDanglingLineMiddleBuses
(TableFormatterHelper formatterHelper, DanglingLine dl, int middleCcNum) void
addAdditionalCellsDanglingLineVoltageLevel
(TableFormatterHelper formatterHelper, DanglingLine dl) void
addAdditionalCellsGenerator
(TableFormatterHelper formatterHelper, Generator gen) void
addAdditionalCellsPhaseTapChangerStep
(TableFormatterHelper formatterHelper, String id, double zb2, double reactance, PhaseTapChanger ptc) void
addAdditionalCellsRatioTapChangerStep
(TableFormatterHelper formatterHelper, String id, double zb2, double reactance, RatioTapChanger rtc) void
addAdditionalCellsStaticVarCompensator
(TableFormatterHelper formatterHelper, StaticVarCompensator svc) void
addAdditionalCellsThreeWindingsTranformersMiddleBusesColumns
(TableFormatterHelper formatterHelper, ThreeWindingsTransformer twt, int middleCcNum) void
addAdditionalCellsThreeWindingsTransformerVoltageLevel
(TableFormatterHelper formatterHelper, ThreeWindingsTransformer twt) void
addAdditionalCellsTieLineMiddleBuses
(TableFormatterHelper formatterHelper, TieLine tieLine, int xNodeCcNum) int
int
int
void
writeBatteryToFormatter
(TableFormatter formatter, Battery battery) void
writeBusesColumnsToFormatter
(TableFormatter formatter, Bus b) void
writeCurrentLimits
(TableFormatter formatter) void
writeDanglingLineLoadToFormatter
(TableFormatter formatter, DanglingLine dl) void
writeDanglingLineMiddleBusesToFormatter
(TableFormatter formatter, DanglingLine dl, int middleCcNum) void
writeDanglingLineToFormatter
(TableFormatter formatter, DanglingLine dl) void
writeDanglingLineVoltageLevelToFormatter
(TableFormatter formatter, DanglingLine dl) void
writeGeneratorToFormatter
(TableFormatter formatter, Generator gen) void
writeHvdcToFormatter
(TableFormatter formatter, HvdcLine hvdcLine) void
writeLccConverterStationToFormatter
(TableFormatter formatter, LccConverterStation lccStation) void
writeLinesToFormatter
(TableFormatter formatter, Line l) void
writeLoadtoFormatter
(TableFormatter formatter, Load l) void
writePtcToFormatter
(TableFormatter formatter) void
writeRtcToFormatter
(TableFormatter formatter) void
writeShuntCompensatorToFormatter
(TableFormatter formatter, ShuntCompensator sc) void
writeStaticVarCompensatorToFormatter
(TableFormatter formatter, StaticVarCompensator svc) void
writeThreeWindingsTranformersMiddleBusesColumnsToFormatter
(TableFormatter formatter, ThreeWindingsTransformer twt, int middleCcNum) void
writeThreeWindingsTransformerLegToFormatter
(TableFormatter formatter, ThreeWindingsTransformer twt, int middleBusNum, int middleVlNum, ThreeSides legSide) void
writeThreeWindingsTransformerTapChangerTableToFormatter
(TableFormatter formatter, ThreeWindingsTransformer twt) void
writeThreeWindingsTransformerVoltageLevelToFormatter
(TableFormatter formatter, ThreeWindingsTransformer twt) void
writeTieLineMiddleBusesToFormatter
(TableFormatter formatter, TieLine tieLine, int xNodeCcNum) void
writeTieLineToFormatter
(TableFormatter formatter, TieLine l) void
writeTieLineVoltageLevelToFormatter
(TableFormatter formatter, TieLine tieLine) void
void
writeTwoWindingsTransformerTapChangerTableToFormatter
(TableFormatter formatter, TwoWindingsTransformer twt) void
writeVoltageLevelToFormatter
(TableFormatter formatter, VoltageLevel vl) void
writeVscConverterStationToFormatter
(TableFormatter formatter, VscConverterStation vscStation)
-
Constructor Details
-
BasicAmplExporter
public BasicAmplExporter(AmplExportConfig config, Network network, StringToIntMapper<AmplSubset> mapper, int variantIndex, int faultNum, int actionNum)
-
-
Method Details
-
getRtcColumns
- Specified by:
getRtcColumns
in interfaceAmplColumnsExporter
-
getPtcColumns
- Specified by:
getPtcColumns
in interfaceAmplColumnsExporter
-
getCurrentLimitsColumns
- Specified by:
getCurrentLimitsColumns
in interfaceAmplColumnsExporter
-
getHvdcLinesColumns
- Specified by:
getHvdcLinesColumns
in interfaceAmplColumnsExporter
-
getLccConverterStationsColumns
- Specified by:
getLccConverterStationsColumns
in interfaceAmplColumnsExporter
-
getVscConverterStationsColumns
- Specified by:
getVscConverterStationsColumns
in interfaceAmplColumnsExporter
-
getSubstationsColumns
- Specified by:
getSubstationsColumns
in interfaceAmplColumnsExporter
-
getLoadsColumns
- Specified by:
getLoadsColumns
in interfaceAmplColumnsExporter
-
getShuntsColumns
- Specified by:
getShuntsColumns
in interfaceAmplColumnsExporter
-
getStaticVarCompensatorColumns
- Specified by:
getStaticVarCompensatorColumns
in interfaceAmplColumnsExporter
-
getGeneratorsColumns
- Specified by:
getGeneratorsColumns
in interfaceAmplColumnsExporter
-
getBatteriesColumns
- Specified by:
getBatteriesColumns
in interfaceAmplColumnsExporter
-
getBranchesColumns
- Specified by:
getBranchesColumns
in interfaceAmplColumnsExporter
-
getTapChangerTableColumns
- Specified by:
getTapChangerTableColumns
in interfaceAmplColumnsExporter
-
getBusesColumns
- Specified by:
getBusesColumns
in interfaceAmplColumnsExporter
-
writeTwoWindingsTransformerTapChangerTableToFormatter
public void writeTwoWindingsTransformerTapChangerTableToFormatter(TableFormatter formatter, TwoWindingsTransformer twt) throws IOException - Specified by:
writeTwoWindingsTransformerTapChangerTableToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeThreeWindingsTransformerTapChangerTableToFormatter
public void writeThreeWindingsTransformerTapChangerTableToFormatter(TableFormatter formatter, ThreeWindingsTransformer twt) throws IOException - Specified by:
writeThreeWindingsTransformerTapChangerTableToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeRtcToFormatter
- Specified by:
writeRtcToFormatter
in interfaceAmplColumnsExporter
-
writePtcToFormatter
- Specified by:
writePtcToFormatter
in interfaceAmplColumnsExporter
-
writeCurrentLimits
- Specified by:
writeCurrentLimits
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeHvdcToFormatter
- Specified by:
writeHvdcToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeLccConverterStationToFormatter
public void writeLccConverterStationToFormatter(TableFormatter formatter, LccConverterStation lccStation) throws IOException - Specified by:
writeLccConverterStationToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeVscConverterStationToFormatter
public void writeVscConverterStationToFormatter(TableFormatter formatter, VscConverterStation vscStation) throws IOException - Specified by:
writeVscConverterStationToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeBusesColumnsToFormatter
- Specified by:
writeBusesColumnsToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
addAdditionalCellsBusesColumns
-
writeThreeWindingsTranformersMiddleBusesColumnsToFormatter
public void writeThreeWindingsTranformersMiddleBusesColumnsToFormatter(TableFormatter formatter, ThreeWindingsTransformer twt, int middleCcNum) throws IOException - Specified by:
writeThreeWindingsTranformersMiddleBusesColumnsToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
addAdditionalCellsThreeWindingsTranformersMiddleBusesColumns
public void addAdditionalCellsThreeWindingsTranformersMiddleBusesColumns(TableFormatterHelper formatterHelper, ThreeWindingsTransformer twt, int middleCcNum) -
writeDanglingLineMiddleBusesToFormatter
public void writeDanglingLineMiddleBusesToFormatter(TableFormatter formatter, DanglingLine dl, int middleCcNum) throws IOException - Specified by:
writeDanglingLineMiddleBusesToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
addAdditionalCellsDanglingLineMiddleBuses
public void addAdditionalCellsDanglingLineMiddleBuses(TableFormatterHelper formatterHelper, DanglingLine dl, int middleCcNum) -
writeTieLineMiddleBusesToFormatter
public void writeTieLineMiddleBusesToFormatter(TableFormatter formatter, TieLine tieLine, int xNodeCcNum) throws IOException - Specified by:
writeTieLineMiddleBusesToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
addAdditionalCellsTieLineMiddleBuses
public void addAdditionalCellsTieLineMiddleBuses(TableFormatterHelper formatterHelper, TieLine tieLine, int xNodeCcNum) -
writeLinesToFormatter
- Specified by:
writeLinesToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeTieLineToFormatter
- Specified by:
writeTieLineToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeDanglingLineToFormatter
public void writeDanglingLineToFormatter(TableFormatter formatter, DanglingLine dl) throws IOException - Specified by:
writeDanglingLineToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeTwoWindingsTranformerToFormatter
public void writeTwoWindingsTranformerToFormatter(TableFormatter formatter, TwoWindingsTransformer twt) throws IOException - Specified by:
writeTwoWindingsTranformerToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeThreeWindingsTransformerLegToFormatter
public void writeThreeWindingsTransformerLegToFormatter(TableFormatter formatter, ThreeWindingsTransformer twt, int middleBusNum, int middleVlNum, ThreeSides legSide) throws IOException - Specified by:
writeThreeWindingsTransformerLegToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeTieLineVoltageLevelToFormatter
public void writeTieLineVoltageLevelToFormatter(TableFormatter formatter, TieLine tieLine) throws IOException - Specified by:
writeTieLineVoltageLevelToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeVoltageLevelToFormatter
public void writeVoltageLevelToFormatter(TableFormatter formatter, VoltageLevel vl) throws IOException - Specified by:
writeVoltageLevelToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeDanglingLineLoadToFormatter
public void writeDanglingLineLoadToFormatter(TableFormatter formatter, DanglingLine dl) throws IOException - Specified by:
writeDanglingLineLoadToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeLoadtoFormatter
- Specified by:
writeLoadtoFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeShuntCompensatorToFormatter
public void writeShuntCompensatorToFormatter(TableFormatter formatter, ShuntCompensator sc) throws IOException - Specified by:
writeShuntCompensatorToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeGeneratorToFormatter
- Specified by:
writeGeneratorToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
addAdditionalCellsGenerator
-
writeBatteryToFormatter
- Specified by:
writeBatteryToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeStaticVarCompensatorToFormatter
public void writeStaticVarCompensatorToFormatter(TableFormatter formatter, StaticVarCompensator svc) throws IOException - Specified by:
writeStaticVarCompensatorToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
addAdditionalCellsStaticVarCompensator
public void addAdditionalCellsStaticVarCompensator(TableFormatterHelper formatterHelper, StaticVarCompensator svc) -
writeDanglingLineVoltageLevelToFormatter
public void writeDanglingLineVoltageLevelToFormatter(TableFormatter formatter, DanglingLine dl) throws IOException - Specified by:
writeDanglingLineVoltageLevelToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
addAdditionalCellsDanglingLineVoltageLevel
public void addAdditionalCellsDanglingLineVoltageLevel(TableFormatterHelper formatterHelper, DanglingLine dl) -
writeThreeWindingsTransformerVoltageLevelToFormatter
public void writeThreeWindingsTransformerVoltageLevelToFormatter(TableFormatter formatter, ThreeWindingsTransformer twt) throws IOException - Specified by:
writeThreeWindingsTransformerVoltageLevelToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
addAdditionalCellsThreeWindingsTransformerVoltageLevel
public void addAdditionalCellsThreeWindingsTransformerVoltageLevel(TableFormatterHelper formatterHelper, ThreeWindingsTransformer twt) -
addAdditionalCellsRatioTapChangerStep
public void addAdditionalCellsRatioTapChangerStep(TableFormatterHelper formatterHelper, String id, double zb2, double reactance, RatioTapChanger rtc) -
addAdditionalCellsPhaseTapChangerStep
public void addAdditionalCellsPhaseTapChangerStep(TableFormatterHelper formatterHelper, String id, double zb2, double reactance, PhaseTapChanger ptc) -
getConfig
-
getNetwork
-
getMapper
-
getVariantIndex
public int getVariantIndex() -
getFaultNum
public int getFaultNum() -
getActionNum
public int getActionNum()
-