diff --git a/docs/index.md b/docs/index.md index 19e0c043..83bbddfa 100644 --- a/docs/index.md +++ b/docs/index.md @@ -11,9 +11,9 @@ OpenReac is a reactive optimal power flow that gives a set of hypotheses for vol --- maxdepth: 2 hidden: true -gettingStarted.md -optimizer/index --- +gettingStarted.md +optimizer/index.md ``` diff --git a/docs/optimizer/acOptimalPowerflow.md b/docs/optimizer/acOptimalPowerflow.md index b27b297e..b3462597 100644 --- a/docs/optimizer/acOptimalPowerflow.md +++ b/docs/optimizer/acOptimalPowerflow.md @@ -9,7 +9,7 @@ Then, the following values will be variable in the optimization: - $\boldsymbol{Q_{i,vsc}}$ the reactive power produced by voltage source converter stations $vsc$ of bus $i$. - $\boldsymbol{b_{i,g}}$ (resp. $\boldsymbol{b_{i,svc}}$) the susceptance of shunt $s$ (resp. of static var compensator $svc$) of bus $i$. - $\boldsymbol{\rho_{ij}}$ the transformer ratio of the ratio tap changer on branch $ij$, -specified as variable by the user (see [3.2](#32-configuration-of-the-run)). +specified as variable by the user (see [Configuration of the run](inputs.md#configuration-of-the-run)). Please note that: - Units with active power specified in `ampl_network_generators.txt` that is less than the configurable parameter `Pnull` **are excluded from the optimization**, diff --git a/docs/optimizer/divisionOfCode.md b/docs/optimizer/divisionOfCode.md index 152f94e6..ba44d16f 100644 --- a/docs/optimizer/divisionOfCode.md +++ b/docs/optimizer/divisionOfCode.md @@ -2,20 +2,20 @@ The code of the reactive OPF is divided into several files, each serving a specific function: -- `reactiveopf.dat` defines the network data files imported (files with *ampl_* prefix), and the files used to configure the run (files with *param_* prefix). +- `reactiveopf.dat` defines the network data files imported (files with *ampl_* prefix), and the files used to configure the run (files with *param_* prefix). See [Inputs](inputs.md). - `iidm_importer.mod`, `or_param_importer.mod` and `commons.mod` define the sets and parameters of the optimization. -- `connected_component.mod`, `dcopf.mod` and `acopf.mod` define the optimization problems solved in `reactiveopf.run`. +- `connected_component.mod`, `dcopf.mod` and `acopf.mod` define the optimization problems solved in `reactiveopf.run`. See [Slack bus and main connex components](slackBusMainConnexComponent.md), [DC optimal power flow](dcOptimalPowerflow.md) and [AC optimal power flow](acOptimalPowerflow.md), respectively. - `connected_component.run`, `dcopf.run`, `acopf_preprocessing.run` and `acopf.run` orchestrate the optimization and its post-process. -- `reactiveopfoutput.mod` exports result files if the execution of `reactiveopf.run` is successful. +- `reactiveopfoutput.mod` exports result files if the execution of `reactiveopf.run` is successful. See [Outputs](outputs.md#in-case-of-convergence). -- `reactiveopfexit.run` contains the code executed when the process fails. +- `reactiveopfexit.run` contains the code executed when the process fails. Refer to section [8.2](outputs.md#in-case-of-inconsistency). - `reactiveopf.run` executes the AMPL process of OpenReac, calling the previous scripts. diff --git a/docs/optimizer/index.md b/docs/optimizer/index.md index fc3b60ad..7874bce9 100644 --- a/docs/optimizer/index.md +++ b/docs/optimizer/index.md @@ -1,4 +1,4 @@ -# Overview +# OpenReac The reactive optimal power flow (OPF) is implemented with AMPL. Its goal is to compute voltage values on each point of the network as well as control values for reactive equipment and controllers of the grid (voltage set point of generating units, shunts, transformer ratios...). @@ -13,6 +13,7 @@ Please notice that this reactive OPF does **not** decide active power of generat --- maxdepth: 2 hidden: true +--- divisionOfCode.md inputs.md preprocessing.md @@ -20,7 +21,6 @@ slackBusMainConnexComponent.md dcOptimalPowerflow.md acOptimalPowerflow.md outputs.md ---- ``` diff --git a/docs/optimizer/inputs.md b/docs/optimizer/inputs.md index f64cb62e..0393e07f 100644 --- a/docs/optimizer/inputs.md +++ b/docs/optimizer/inputs.md @@ -3,12 +3,12 @@ ## Network data 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](inv:powsyblcore:*:*:#the-extendedamplexporter), which is the default version. +These files are obtained by using the [PowSyBl AMPL export](inv:powsyblcore:*:*:#grid_exchange_formats/ampl/export), which is the default version. ## Configuration of the run The user can configure the run with the dedicated Java interface -(see [OpenReacParameters](../open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java)). +(see [OpenReacParameters](https://github.com/powsybl/powsybl-optimizer/blob/main/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java)). Specifically, the user can set various parameters and thresholds used in the preprocessing and modeling of the reactive OPF. These are specified in the file `param_algo.txt`: @@ -17,10 +17,10 @@ These are specified in the file `param_algo.txt`: | `log_level_ampl` | Level of display for AMPL prints | INFO | {DEBUG, INFO, WARNING, ERROR} | | `log_level_knitro` | Level of display for solver prints (see [AMPL documentation](https://dev.ampl.com/ampl/options.html)) | $1$ | {0, 1, 2} | | `objective_choice` | Choice of the objective function for the ACOPF (see [AC optimal powerflow](acOptimalPowerflow.md)) | $0$ | {0, 1, 2} | -| `ratio_voltage_target` | Ratio to calculate target V of buses when `objective_choice` is set to $1$ (see [AC optimal powerflow](acOptimalPowerflow.md)) | $0.5$ | $\[0; 1\]$ | -| `coeff_alpha` | Weight to favor more/less minimization of active power produced by generators or deviation between them and target values (see [AC optimal powerflow](acOptimalPowerflow.md)) | $1$ | $\[0; 1\]$ | -| `Pnull` | Threshold of active and reactive powers considered as null | $0.01$ (MW) | $\[0; 1\]$ | -| `Znull` | Threshold of impedance considered as null (see [Zero impedance threshold](preprocessing.md#zero-impedance-threshold)) | $10^{-5}$ (p.u.) | $\[0; 0.1\]$ | +| `ratio_voltage_target` | Ratio to calculate target V of buses when `objective_choice` is set to $1$ (see [AC optimal powerflow](acOptimalPowerflow.md)) | $0.5$ | $[0; 1]$ | +| `coeff_alpha` | Weight to favor more/less minimization of active power produced by generators or deviation between them and target values (see [AC optimal powerflow](acOptimalPowerflow.md)) | $1$ | $[0; 1]$ | +| `Pnull` | Threshold of active and reactive powers considered as null | $0.01$ (MW) | $[0; 1]$ | +| `Znull` | Threshold of impedance considered as null (see [Zero impedance threshold](preprocessing.md#zero-impedance-threshold)) | $10^{-5}$ (p.u.) | $[0; 0.1]$ | | `epsilon_nominal_voltage` | Threshold to ignore voltage levels with nominal voltage lower than it | $1$ (kV) | $\mathbb{R}^{+}$ | | `min_plausible_low_voltage_limit` | Consistency bound for low voltage limit of voltage levels (see [Voltage level limit consistency](preprocessing.md#voltage-level-limit-consistency)) | $0.5$ (p.u.) | $\mathbb{R}^{+}$ | | `max_plausible_high_voltage_limit` | Consistency bound for high voltage limit of voltage levels (see [Voltage level limit consistency](preprocessing.md#voltage-level-limit-consistency)) | $1.5$ (p.u.) | [`min_plausible_low_voltage_limit`; $\infty$] | @@ -46,7 +46,7 @@ This is done using the following files: |---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------| | `param_transformers.txt` | Ratio tap changers with a variable transformation ratio (real variable) | Transformation ratios are fixed | | `param_shunt.txt` | Shunts with a continuous variable susceptance and which can be modified and/or connected (only if possible bus is defined in `ampl_network_shunts.txt`) | Shunt susceptances are fixed | -| `param_generators_reactive.txt` | Generators with a constant reactive power production. If this value is not consistent (> PQmax), the reactive power production stays variable | Coherent reactive power productions (see [4.5](#45-pq-units-domain)) are variable | +| `param_generators_reactive.txt` | Generators with a constant reactive power production. If this value is not consistent (> PQmax), the reactive power production stays variable | Coherent reactive power productions (see [P/Q unit domain](preprocessing.md#pq-unit-domain)) are variable | | `param_buses_with_reactive_slack.txt` | Buses with attached reactive slacks if configurable parameter buses_with_reactive_slacks = "CONFIGURED" | Only buses with no reactive power production have reactive slacks attached | All of these files share the same format: 2 columns #"num" "id". @@ -58,4 +58,5 @@ If so, empty files will be created during execution. In addition to the elements specified in section [Configuration of the run](#configuration-of-the-run), the user may choose to override the voltage limits of specified voltage levels. These values must be defined in `ampl_network_substations_override.txt` and are employed to establish the new voltage limits as specified in section [Voltage level limit consistency](preprocessing.md#voltage-level-limit-consistency). -Format of `ampl_network_substations_override.txt`: 4 columns #"num" "minV (pu)" "maxV (pu)" "id" +Format of `ampl_network_substations_override.txt`: 4 columns +\#"num" "minV (pu)" "maxV (pu)" "id" diff --git a/docs/optimizer/preprocessing.md b/docs/optimizer/preprocessing.md index 59b49c5a..171775ca 100644 --- a/docs/optimizer/preprocessing.md +++ b/docs/optimizer/preprocessing.md @@ -2,7 +2,7 @@ Before solving the reactive ACOPF described in [AC optimal powerflow](acOptimalPowerflow.md), the following pre-processing blocks are executed to ensure the consistency of the values used in the optimization. -##Voltage level limit consistency +## Voltage level limit consistency To ensure consistent voltage level limits for the buses, the configurable domain [`min_plausible_low_voltage_limit`; `max_plausible_high_voltage_limit`] is used (see [Configuration of the run](inputs.md#configuration-of-the-run)). @@ -10,14 +10,14 @@ Let $V_{s}^{min}$ (resp. $V_{s}^{max}$) be the low (resp. high) voltage limit of - $V_{s}^{min,c} = \max(V_{s}^{min},$ min_plausible_low_voltage_limit) - $V_{s}^{max,c} = \min(V_{s}^{max},$ max_plausible_low_voltage_limit) -## Zero-impedance branches +## Zero-impedance threshold Branches with an impedance magnitude, **calculated in per unit**, lower than the configurable threshold `Znull` (see section [Configuration of the run](inputs.md#configuration-of-the-run)) are considered as non-impedant. These branches will have their reactance replaced by the threshold `Znull` (in p.u.), **even if the reactance specified in `ampl_network_branches.txt` is negative**. ## Impedance of transformers -In the calculations of the ACOPF (see [AC optimal powerflow](acOptimalPowerflow.md)), the transformers with an impedance (specified in `ampl_network_branches.txt`) considered as null (see [Zero-impedance branches](preprocessing.md#zero-impedance-branches)) **are treated as lines**. Then, the transformation ratios/phase shifts are ignored, as well as the impedance specified in the tap changer table `ampl_network_tct.txt`. +In the calculations of the ACOPF (see [AC optimal powerflow](acOptimalPowerflow.md)), the transformers with an impedance (specified in `ampl_network_branches.txt`) considered as null (see [Zero-impedance threshold](#zero-impedance-threshold)) **are treated as lines**. Then, the transformation ratios/phase shifts are ignored, as well as the impedance specified in the tap changer table `ampl_network_tct.txt`. For phase shifters transformers considered as impedant, the reactance values from the tap changer table (in `ampl_network_tct.txt`) replace the reactance specified in `ampl_network_branches.txt`. The resistance is then calculated proportionally. For the ratio tap changers, the impedance stays as specified in `ampl_network_branches.txt`. **Please notice there is no specified handling for cases where resistance and/or reactance is negative or if there is both a ratio tap changer and a phase shift transformer on the same branch.**