Skip to content

Commit

Permalink
Small clean
Browse files Browse the repository at this point in the history
Signed-off-by: p-arvy <[email protected]>
  • Loading branch information
p-arvy committed Jul 11, 2024
1 parent 126c74f commit d6cfa8d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
48 changes: 24 additions & 24 deletions open-reac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,30 +81,30 @@ The user can configure the run with the dedicated Java interface
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`:

| Parameter | Description | Java default value | Domain |
|---------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|-----------------------------------------------|
| `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 [7](#7-alternative-current-optimal-power-flow)) | $0$ | {0, 1, 2} |
| `ratio_voltage_target` | Ratio to calculate target V of buses when `objective_choice` is set to $1$ (see [7](#7-alternative-current-optimal-power-flow)) | $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 [6.2](#62-alternative-current-optimal-power-flow)) | $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 [4.2](#)) | $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 [4.1](#41-voltage-level-limits-computation)) | $0.5$ (p.u.) | $\mathbb{R}^{+}$ |
| `max_plausible_high_voltage_limit` | Consistency bound for high voltage limit of voltage levels (see [4.1](#41-voltage-level-limits-computation)) | $1.5$ (p.u.) | [`min_plausible_low_voltage_limit`; $\infty$] |
| `ignore_voltage_bounds` | Threshold to replace voltage limits of voltage levels with nominal voltage lower than it, by [min_plausible_low_voltage_limit; max_plausible_high_voltage_limit] | $0$ (p.u.) | $\mathbb{R}^{+}$ |
| `buses_with_reactive_slacks` | Choice of which buses will have reactive slacks attached in ACOPF solving (see [7](#7-alternative-current-optimal-power-flow)) | ALL | {CONFIGURED, NO_GENERATION, ALL} |
| `PQmax` | Threshold for maximum active and reactive power considered in correction of generator limits (see [4.4](#44-pq-units-domain)) | $9000$ (MW, MVAr) | $\mathbb{R}$ |
| `defaultPmax` | Threshold for correction of high active power limit produced by generators (see [4.4](#44-pq-units-domain)) | $1000$ (MW) | $\mathbb{R}$ |
| `defaultPmin` | Threshold for correction of low active power limit produced by generators (see [4.4](#44-pq-units-domain)) | $0$ (MW) | $\mathbb{R}$ |
| `defaultQmaxPmaxRatio` | Ratio used to calculate threshold for corrections of high/low reactive power limits (see [4.4](#44-pq-units-domain)) | $0.3$ (MVAr/MW) | $\mathbb{R}$ |
| `minimalQPrange` | Threshold to fix active (resp. reactive) power of generators with active (resp. reactive) power limits that are closer than it (see [4.4](#44-pq-units-domain)) | $1$ (MW, MVAr) | $\mathbb{R}$ |
| `default_variable_scaling_factor` | Default scaling factor applied to all the variables (except reactive slacks and transformer ratios) before ACOPF solving | $1$ | $\mathbb{R}^{*,+}$ |
| `default_constraint_scaling_factor` | Default scaling factor applied to all the constraints before ACOPF solving | $1$ | $\mathbb{R}^{+}$ |
| `reactive_slack_variable_scaling_factor` | Scaling factor applied to all reactive slacks variables before ACOPF solving (see [7](#7-alternative-current-optimal-power-flow)) | $0.1$ | $\mathbb{R}^{*,+}$ |
| `transformer_ratio_variable_scaling_factor` | Scaling factor applied to all transformer ratio variables before ACOPF solving (see [7](#7-alternative-current-optimal-power-flow)) | $0.001$ | $\mathbb{R}^{*,+}$ |

| Parameter | Description | Java default value | Domain |
|---------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|-----------------------------------------------|
| `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 [7](#7-alternative-current-optimal-power-flow)) | $0$ | {0, 1, 2} |
| `ratio_voltage_target` | Ratio to calculate target V of buses when `objective_choice` is set to $1$ (see [7](#7-alternative-current-optimal-power-flow)) | $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 [6.2](#62-alternative-current-optimal-power-flow)) | $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 [4.2](#)) | $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 [4.1](#41-voltage-level-limits-computation)) | $0.5$ (p.u.) | $\mathbb{R}^{+}$ |
| `max_plausible_high_voltage_limit` | Consistency bound for high voltage limit of voltage levels (see [4.1](#41-voltage-level-limits-computation)) | $1.5$ (p.u.) | [`min_plausible_low_voltage_limit`; $\infty$] |
| `ignore_voltage_bounds` | Threshold to replace voltage limits of voltage levels with nominal voltage lower than it, by [min_plausible_low_voltage_limit; max_plausible_high_voltage_limit] | $0$ (p.u.) | $\mathbb{R}^{+}$ |
| `buses_with_reactive_slacks` | Choice of which buses will have reactive slacks attached in ACOPF solving (see [7](#7-alternative-current-optimal-power-flow)) | ALL | {CONFIGURED, NO_GENERATION, ALL} |
| `PQmax` | Threshold for maximum active and reactive power considered in correction of generator limits (see [4.4](#44-pq-units-domain)) | $9000$ (MW, MVAr) | $\mathbb{R}$ |
| `defaultPmax` | Threshold for correction of high active power limit produced by generators (see [4.4](#44-pq-units-domain)) | $1000$ (MW) | $\mathbb{R}$ |
| `defaultPmin` | Threshold for correction of low active power limit produced by generators (see [4.4](#44-pq-units-domain)) | $0$ (MW) | $\mathbb{R}$ |
| `defaultQmaxPmaxRatio` | Ratio used to calculate threshold for corrections of high/low reactive power limits (see [4.4](#44-pq-units-domain)) | $0.3$ (MVAr/MW) | $\mathbb{R}$ |
| `minimalQPrange` | Threshold to fix active (resp. reactive) power of generators with active (resp. reactive) power limits that are closer than it (see [4.4](#44-pq-units-domain)) | $1$ (MW, MVAr) | $\mathbb{R}$ |
| `default_variable_scaling_factor` | Default scaling factor applied to all the variables (except reactive slacks and transformer ratios) before ACOPF solving | $1$ | $\mathbb{R}^{*,+}$ |
| `default_constraint_scaling_factor` | Default scaling factor applied to all the constraints before ACOPF solving | $1$ | $\mathbb{R}^{+}$ |
| `reactive_slack_variable_scaling_factor` | Scaling factor applied to all reactive slacks variables before ACOPF solving (see [7](#7-alternative-current-optimal-power-flow)) | $0.1$ | $\mathbb{R}^{*,+}$ |
| `transformer_ratio_variable_scaling_factor` | Scaling factor applied to all transformer ratio variables before ACOPF solving (see [7](#7-alternative-current-optimal-power-flow)) | $0.001$ | $\mathbb{R}^{*,+}$ |
| `shunt_variable_scaling_factor` | Scaling factor applied to all shunt variables before ACOPF solving (see [7](#7-alternative-current-optimal-power-flow)) | $0.1$ | $\mathbb{R}^{*,+}$ |

Please note that for these parameters, the AMPL code defines default values which may be different from those in Java (for example, for the
scaling values). This allows a user to use the AMPL code without going through the Java interface, and without providing the file `param_algo.txt`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ void testRunAsync() throws IOException {
subFolder + "/reactiveopf_results_vsc_converter_stations.csv",
subFolder + "/reactiveopf_results_voltages.csv"));
// To really run open reac, use the commented line below. Be sure that open-reac/src/test/resources/com/powsybl/config/test/config.yml contains your ampl path
// try (ComputationManager computationManager = new LocalComputationManager()) {
// try (ComputationManager computationManager = new LocalComputationManager()) {
try (ComputationManager computationManager = new LocalComputationManager(new LocalComputationConfig(tmpDir),
localCommandExecutor, ForkJoinPool.commonPool())) {
CompletableFuture<OpenReacResult> openReacResults = OpenReacRunner.runAsync(network,
Expand Down

0 comments on commit d6cfa8d

Please sign in to comment.