Class BasicAmplExporter
java.lang.Object
com.powsybl.ampl.converter.version.BasicAmplExporter
- All Implemented Interfaces:
AmplColumnsExporter
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
-
Field Summary
Fields inherited from interface com.powsybl.ampl.converter.version.AmplColumnsExporter
VERSION_HEADER_NAME
-
Constructor Summary
ConstructorDescriptionBasicAmplExporter
(AmplExportConfig config, Network network, StringToIntMapper<AmplSubset> mapper, int variantIndex, int faultNum, int actionNum) -
Method Summary
Modifier and TypeMethodDescriptionstatic AmplExportVersion.Factory
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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.powsybl.ampl.converter.version.AmplColumnsExporter
writeHeaderFile
-
Constructor Details
-
BasicAmplExporter
public BasicAmplExporter(AmplExportConfig config, Network network, StringToIntMapper<AmplSubset> mapper, int variantIndex, int faultNum, int actionNum)
-
-
Method Details
-
getFactory
-
getExporterId
- Specified by:
getExporterId
in interfaceAmplColumnsExporter
-
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
-
writeThreeWindingsTranformersMiddleBusesColumnsToFormatter
public void writeThreeWindingsTranformersMiddleBusesColumnsToFormatter(TableFormatter formatter, ThreeWindingsTransformer twt, int middleCcNum) throws IOException - Specified by:
writeThreeWindingsTranformersMiddleBusesColumnsToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeDanglingLineMiddleBusesToFormatter
public void writeDanglingLineMiddleBusesToFormatter(TableFormatter formatter, DanglingLine dl, int middleCcNum) throws IOException - Specified by:
writeDanglingLineMiddleBusesToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeTieLineMiddleBusesToFormatter
public void writeTieLineMiddleBusesToFormatter(TableFormatter formatter, TieLine tieLine, int xNodeCcNum) throws IOException - Specified by:
writeTieLineMiddleBusesToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
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
-
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
-
writeDanglingLineVoltageLevelToFormatter
public void writeDanglingLineVoltageLevelToFormatter(TableFormatter formatter, DanglingLine dl) throws IOException - Specified by:
writeDanglingLineVoltageLevelToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-
writeThreeWindingsTransformerVoltageLevelToFormatter
public void writeThreeWindingsTransformerVoltageLevelToFormatter(TableFormatter formatter, ThreeWindingsTransformer twt) throws IOException - Specified by:
writeThreeWindingsTransformerVoltageLevelToFormatter
in interfaceAmplColumnsExporter
- Throws:
IOException
-