Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt iidm importer to V2 of extended AMPL exporter #86

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion open-reac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ each serving a specific function:
Files with the prefix `ampl_` contain the
data and the parameters of the network on which the reactive OPF is executed.
These files are obtained by using the
[extended version of PowSyBl AMPL export](https://github.com/powsybl/powsybl-core/blob/main/ampl-converter/src/main/java/com/powsybl/ampl/converter/version/ExtendedAmplExporter.java), which is the default version.
[V2 of the extended version of PowSyBl AMPL export](https://github.com/powsybl/powsybl-core/blob/main/ampl-converter/src/main/java/com/powsybl/ampl/converter/version/ExtendedAmplExporterV2.java), which is the default version.

#### 3.2 Configuration of the run

Expand Down
2 changes: 1 addition & 1 deletion open-reac/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<description>OpenReac optimizer</description>

<properties>
<powsybl-core.version>6.5.0-RC1</powsybl-core.version>
<powsybl-core.version>6.6.0-SNAPSHOT</powsybl-core.version>
<powsybl-open-loadflow.version>1.12.1</powsybl-open-loadflow.version>
</properties>

Expand Down
5 changes: 5 additions & 0 deletions open-reac/src/main/resources/openreac/iidm_importer.mod
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ param unit_Qp {UNIT};
param unit_vregul {UNIT} symbolic; # Does unit do voltage regulation, or PQ bus?
param unit_vregul_bus {UNIT} integer; # Bus regulated by unit, if it does voltage regulation
param unit_Vc {UNIT}; # Voltage set point (in case of voltage regulation)
param unit_condenser {UNIT} symbolic; # Is unit a condenser
param unit_Pc {UNIT}; # Active power set point
param unit_Qc {UNIT}; # Rective power set point (in case no voltage regulation)
param unit_fault {UNIT};
Expand Down Expand Up @@ -418,6 +419,7 @@ check {(t,cs,n) in VSCCONV}: vscconv_qP[t,cs,n] <= vscconv_QP[t,cs,n];
set LCCCONV dimen 3; # [variant, num, bus]
param lccconv_possiblebus {LCCCONV} integer;
param lccconv_substation {LCCCONV} integer;
param lccconv_q0 {LCCCONV}; # Load target q of lcc converter station
param lccconv_loss_factor {LCCCONV};
param lccconv_power_factor{LCCCONV};
param lccconv_fault {LCCCONV};
Expand All @@ -441,7 +443,10 @@ param hvdc_conv2 {HVDC} integer;
param hvdc_r {HVDC};
param hvdc_Vnom {HVDC};
param hvdc_convertersMode {HVDC} symbolic;
param hvdc_ac_emul {HVDC} symbolic; # Is the line emulating in AC
param hvdc_targetP {HVDC};
param hvdc_p0 {HVDC}; # Active power offset of ac emulation
param hvdc_k {HVDC};
param hvdc_Pmax {HVDC};
param hvdc_fault {HVDC};
param hvdc_curative {HVDC};
Expand Down
14 changes: 7 additions & 7 deletions open-reac/src/main/resources/openreac/reactiveopf.dat
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ param: SUBSTATIONS: substation_horizon substation_fodist substation_Vnomi substa
param: BUS: bus_substation bus_CC bus_SC bus_V0 bus_angl0 bus_injA bus_injR bus_slack bus_fault bus_curative bus_id := include ampl_network_buses.txt;

# ampl_network_generators.txt
#"variant" "num" "bus" "con. bus" "substation" "minP (MW)" "maxP (MW)" "minQmaxP (MVar)" "minQ0 (MVar)" "minQminP (MVar)" "maxQmaxP (MVar)" "maxQ0 (MVar)" "maxQminP (MVar)" "v regul." "v regul. bus" "targetV (pu)" "targetP (MW)" "targetQ (MVar)" "fault" "curative" "id" "description" "P (MW)" "Q (MVar)"
param: UNIT: unit_potentialbus unit_substation unit_Pmin unit_Pmax unit_qP unit_qp0 unit_qp unit_QP unit_Qp0 unit_Qp unit_vregul unit_vregul_bus unit_Vc unit_Pc unit_Qc unit_fault unit_curative unit_id unit_name unit_P0 unit_Q0 := include ampl_network_generators.txt;
#"variant" "num" "bus" "con. bus" "substation" "minP (MW)" "maxP (MW)" "minQmaxP (MVar)" "minQ0 (MVar)" "minQminP (MVar)" "maxQmaxP (MVar)" "maxQ0 (MVar)" "maxQminP (MVar)" "v regul." "v regul. bus" "targetV (pu)" "condenser" "targetP (MW)" "targetQ (MVar)" "fault" "curative" "id" "description" "P (MW)" "Q (MVar)"
param: UNIT: unit_potentialbus unit_substation unit_Pmin unit_Pmax unit_qP unit_qp0 unit_qp unit_QP unit_Qp0 unit_Qp unit_vregul unit_vregul_bus unit_Vc unit_condenser unit_Pc unit_Qc unit_fault unit_curative unit_id unit_name unit_P0 unit_Q0 := include ampl_network_generators.txt;

# ampl_network_loads.txt
#"variant" "num" "bus" "substation" "p (MW)" "q (MVar)" "fault" "curative" "id" "description" "p (MW)" "q (MVar)"
Expand All @@ -41,7 +41,7 @@ param: SHUNT: shunt_possiblebus shunt_substation shunt_valmin shunt_valmax shunt
param: SVC: svc_possiblebus svc_substation svc_bmin svc_bmax svc_vregul svc_vregul_bus svc_targetV svc_targetQ svc_fault svc_curative svc_id svc_description svc_P0 svc_Q0 := include ampl_network_static_var_compensators.txt;

# ampl_network_batteries.txt
#"variant" "num" "bus" "con. bus" "substation" "p0 (MW)" "q0 (MW)" "minP (MW)" "maxP (MW)" "minQmaxP (MVar)" "minQ0 (MVar)" "minQminP (MVar)" "maxQmaxP (MVar)" "maxQ0 (MVar)" "maxQminP (MVar)" "fault" "curative" "id" "description" "P (MW)" "Q (MVar)"
#"variant" "num" "bus" "con. bus" "substation" "p0 (MW)" "q0 (MVar)" "minP (MW)" "maxP (MW)" "minQmaxP (MVar)" "minQ0 (MVar)" "minQminP (MVar)" "maxQmaxP (MVar)" "maxQ0 (MVar)" "maxQminP (MVar)" "fault" "curative" "id" "description" "P (MW)" "Q (MVar)"
param: BATTERY: battery_possiblebus battery_substation battery_p0 battery_q0 battery_Pmin battery_Pmax battery_qP battery_qp0 battery_qp battery_QP battery_Qp0 battery_Qp battery_fault battery_curative battery_id battery_name battery_P0 battery_Q0 := include ampl_network_batteries.txt;

# ampl_network_tct.txt
Expand All @@ -62,13 +62,13 @@ param: DEPH: deph_tap0 deph_table deph_fault deph_curative deph_id := include am
param: VSCCONV: vscconv_possiblebus vscconv_substation vscconv_Pmin vscconv_Pmax vscconv_qP vscconv_qp0 vscconv_qp vscconv_QP vscconv_Qp0 vscconv_Qp vscconv_vregul vscconv_targetV vscconv_targetQ vscconv_lossFactor vscconv_fault vscconv_curative vscconv_id vscconv_description vscconv_P0 vscconv_Q0 := include ampl_network_vsc_converter_stations.txt;

# ampl_network_lcc_converter_stations.txt
#"variant" "num" "bus" "con. bus" "substation" "lossFactor (%PDC)" "powerFactor" "fault" "curative" "id" "description" "P (MW)" "Q (MVar)"
param: LCCCONV: lccconv_possiblebus lccconv_substation lccconv_loss_factor lccconv_power_factor lccconv_fault lccconv_curative lccconv_id lccconv_description lccconv_P0 lccconv_Q0 := include ampl_network_lcc_converter_stations.txt;
#"variant" "num" "bus" "con. bus" "substation" "q0 (MVar)" "lossFactor (%PDC)" "powerFactor" "fault" "curative" "id" "description" "P (MW)" "Q (MVar)"
param: LCCCONV: lccconv_possiblebus lccconv_substation lccconv_q0 lccconv_loss_factor lccconv_power_factor lccconv_fault lccconv_curative lccconv_id lccconv_description lccconv_P0 lccconv_Q0 := include ampl_network_lcc_converter_stations.txt;

#ampl_network_hvdc.txt
#"variant" "num" "type" "converterStation1" "converterStation2" "r (ohm)" "nomV (KV)" "convertersMode" "targetP (MW)" "maxP (MW)" "fault" "curative" "id" "description"
#"variant" "num" "type" "converterStation1" "converterStation2" "r (ohm)" "nomV (KV)" "convertersMode" "ac emul." "targetP (MW)" "P offset (MW)" "k (MW/rad)" "maxP (MW)" "fault" "curative" "id" "description"
#ampl_network_hvdc.txt
param: HVDC: hvdc_type hvdc_conv1 hvdc_conv2 hvdc_r hvdc_Vnom hvdc_convertersMode hvdc_targetP hvdc_Pmax hvdc_fault hvdc_curative hvdc_id hvdc_description := include ampl_network_hvdc.txt;
param: HVDC: hvdc_type hvdc_conv1 hvdc_conv2 hvdc_r hvdc_Vnom hvdc_convertersMode hvdc_ac_emul hvdc_targetP hvdc_p0 hvdc_k hvdc_Pmax hvdc_fault hvdc_curative hvdc_id hvdc_description := include ampl_network_hvdc.txt;

# ampl_network_branches.txt
#"variant" "num" "bus1" "bus2" "3wt num" "sub.1" "sub.2" "r (pu)" "x (pu)" "g1 (pu)" "g2 (pu)" "b1 (pu)" "b2 (pu)" "cst ratio (pu)" "ratio tc" "phase tc" "p1 (MW)" "p2 (MW)" "q1 (MVar)" "q2 (MVar)" "patl1 (A)" "patl2 (A)" "merged" "fault" "curative" "id" "description"
Expand Down
Loading