Skip to content

Commit

Permalink
Fix PDF generation for useguide (#2134)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir authored May 31, 2024
1 parent 88a3aa7 commit 69cf486
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 45 deletions.
4 changes: 2 additions & 2 deletions docs/user-guide/03-getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ These steps most often involve:
2. Defining the simulation contexts (definition of the "Monte-Carlo years" to simulate)
3. *(Optional)* If some time-series are supposed to be [automatically generated](18-parameters.md#generate),
running a simulation to produce actual numeric scenarios, following the directives defined in (2).
*In this step, the [ts-generator](ts-generator/01-overview.md) tool should be used.*
*In this step, the [ts-generator](ts-generator/01-overview-tsgenerator.md) tool should be used.*
4. Running the optimization, to solve all the optimization problems associated with each of the scenarios produced in (3).
*In this step, the main [solver](solver/01-overview.md) tool should be used.*
*In this step, the main [solver](solver/01-overview-solver.md) tool should be used.*
5. Exploiting the detailed [results](solver/03-outputs.md) yielded by (4).
*In this step, we recommend using [Antares Web](https://antares-web.readthedocs.io)
or [Antares Extensions](#using-extensions).*
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/04-migration-guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This is a list of all recent changes that came with new Antares Simulator featur
## v9.1.0
### Input
#### Hydro Maximum Generation/Pumping Power
* For time series ![Migration diagram](migration.png "Migration diagram"), for more details, see [this Python script](migration.py)
* For time series ![Migration diagram](img/migration.png "Migration diagram"), for more details, see [this Python script](img/migration.py)

Regarding Hydro time-series, the scenario builder allows the user to choose, for a given year and area, a different time series whether we consider :
- inflows, ROR and minimum generation, max pumping & generation (prefix "h")
Expand Down
9 changes: 6 additions & 3 deletions docs/user-guide/other-features/analyzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ hide:

# Time-Series Analyzer

---

**Executable**: antares-analyzer (currently released for Windows & Ubuntu only)


> _**WARNING:**_ this feature is deprecated and will be removed in a future release. If you are still using it,
> please [get in touch](https://github.com/AntaresSimulatorTeam/Antares_Simulator/issues) with us.
---
**Executable**: antares-analyzer (currently released for Windows & Ubuntu only)


4 changes: 2 additions & 2 deletions docs/user-guide/other-features/batchrun.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ hide:

# Batch Runner

---

> _**WARNING:**_ this feature is deprecated and will be removed in a future release. If you are still using it,
> please [get in touch](https://github.com/AntaresSimulatorTeam/Antares_Simulator/issues) with us.
---

**Executable**: antares-batchrun (currently released for Windows & Ubuntu only)

Expand Down
2 changes: 0 additions & 2 deletions docs/user-guide/other-features/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ hide:

# Config Checker

---
> _**WARNING:**_ this feature is deprecated and will be removed in a future release. If you are still using it,
> please [get in touch](https://github.com/AntaresSimulatorTeam/Antares_Simulator/issues) with us.
---
**Executable**: antares-config (currently released for Windows & Ubuntu only)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Kirchhoff's constraint generator

---
> _**WARNING:**_ this feature is deprecated and will be removed in a future release. If you are still using it,
> please [get in touch](https://github.com/AntaresSimulatorTeam/Antares_Simulator/issues) with us.
---
**Executable**: antares-kirchhoff-constraints-builder (currently released for Windows & Ubuntu only)

Expand Down
3 changes: 1 addition & 2 deletions docs/user-guide/other-features/study-cleaner.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ hide:

# Study Cleaner

---

> _**WARNING:**_ this feature is deprecated and will be removed in a future release. If you are still using it,
> please [get in touch](https://github.com/AntaresSimulatorTeam/Antares_Simulator/issues) with us.
---
**Executable**: antares-study-cleaner (currently released for Windows & Ubuntu only)

Expand Down
2 changes: 0 additions & 2 deletions docs/user-guide/other-features/study-finder.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ hide:

# Study Finder

---
> _**WARNING:**_ this feature is deprecated and will be removed in a future release. If you are still using it,
> please [get in touch](https://github.com/AntaresSimulatorTeam/Antares_Simulator/issues) with us.
---
**Executable**: antares-study-finder (currently released for Windows & Ubuntu only)

Expand Down
2 changes: 0 additions & 2 deletions docs/user-guide/other-features/study-updater.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ hide:

# Study Updater

---
> _**WARNING:**_ this feature is deprecated and will be removed in a future release. If you are still using it,
> please [get in touch](https://github.com/AntaresSimulatorTeam/Antares_Simulator/issues) with us.
---
**Executable**: antares-study-updater (currently released for Windows & Ubuntu only)

Expand Down
2 changes: 0 additions & 2 deletions docs/user-guide/other-features/ui-simulator.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ hide:

# GUI

---
> _**WARNING:**_ this feature is deprecated and will be removed in a future release. If you are still using it,
> please [get in touch](https://github.com/AntaresSimulatorTeam/Antares_Simulator/issues) with us.
---
**Executable**: antares-study-ui-simulator (currently released for Windows & Ubuntu only)

Expand Down
2 changes: 0 additions & 2 deletions docs/user-guide/other-features/vacuum.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ hide:

# Vacuum

---
> _**WARNING:**_ this feature is deprecated and will be removed in a future release. If you are still using it,
> please [get in touch](https://github.com/AntaresSimulatorTeam/Antares_Simulator/issues) with us.
---
**Executable**: antares-vacuum (currently released for Windows & Ubuntu only)
2 changes: 0 additions & 2 deletions docs/user-guide/other-features/ybyaggregator.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ hide:

# Year-by-Year Aggregator

---
> _**WARNING:**_ this feature is deprecated and will be removed in a future release. If you are still using it,
> please [get in touch](https://github.com/AntaresSimulatorTeam/Antares_Simulator/issues) with us.
---
**Executable**: antares-ybyaggregator (currently released for Windows & Ubuntu only)
2 changes: 1 addition & 1 deletion docs/user-guide/solver/00-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
```{toctree}
:hidden:
01-overview.md
01-overview-solver.md
02-inputs.md
03-outputs.md
04-parameters.md
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/user-guide/solver/02-inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ The user may pick any area appearing in the list and is then given access to dif

- The "local data" tab is used to set the parameters of the stochastic generator.
These parameters are presented in four sub-tabs whose content is presented in
[Time-series analysis and generation](../ts-generator/01-overview.md).
[Time-series analysis and generation](../ts-generator/01-overview-tsgenerator.md).

- The "digest" tab displays for all areas a short account of the local data

Expand Down
10 changes: 5 additions & 5 deletions docs/user-guide/solver/04-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ These parameters are listed under the `[general]` section in the `.ini` file.
---
### Study mode

---

#### mode
[//]: # (TODO: verify if required, remove default value)
[//]: # (TODO: add details 'expansion' behavior)
Expand All @@ -36,7 +36,7 @@ These parameters are listed under the `[general]` section in the `.ini` file.
---
### Study horizon

---

#### horizon
[//]: # (TODO: verify if required, remove default value)
- **Expected value:** year (string)
Expand All @@ -48,7 +48,7 @@ These parameters are listed under the `[general]` section in the `.ini` file.

### Calendar parameters

---

#### nbyears
[//]: # (TODO: verify if required, verify default value)
- **Expected value:** unsigned integer
Expand Down Expand Up @@ -122,7 +122,7 @@ These parameters are listed under the `[general]` section in the `.ini` file.
---
### Additional parameters

---

#### year-by-year
- **Expected value:** `true` or `false`
- **Required:** no
Expand Down Expand Up @@ -219,7 +219,7 @@ These parameters are listed under the `[general]` section in the `.ini` file.
---
### Pre-processor parameters

---

#### readonly
[//]: # (TODO: add usage details)
- **Expected value:** `true` or `false`
Expand Down
24 changes: 12 additions & 12 deletions docs/user-guide/solver/07-thermal-heuristic.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,33 @@ The way steps 1 and 2 are performed depends on a parameter set by the user in th

### Fast mode
#### Step 1: first problem resolution
The general idea of the fast mode is to completely remove the constraints and costs involving integers (the \\(M_\theta\\), \\(M_\theta^+\\) and \\(M_\theta^-\\) variables) in step 1. This means that the first resolution of the weekly problem does not consider constraints (17) to (23) in the [optimisation problem formulation](01-modeling.md). Constraint (16) related to the minimum/maximum output of the thermal cluster is kept. In addition, costs related to integer variables (start-up and hourly fixed costs) are not included in the objective function.
The general idea of the fast mode is to completely remove the constraints and costs involving integers (the $M_\theta$, $M_\theta^+$ and $M_\theta^-$ variables) in step 1. This means that the first resolution of the weekly problem does not consider constraints (17) to (23) in the [optimisation problem formulation](01-modeling.md). Constraint (16) related to the minimum/maximum output of the thermal cluster is kept. In addition, costs related to integer variables (start-up and hourly fixed costs) are not included in the objective function.

The first resolution of the problem is then run, and provides hourly power outputs for each thermal cluster \\(P_{\theta,t}^{optim1}\\). At each hour, an initial value of the NODU of each cluster in then calculated: \\(M_\{\theta, t}^{guide} = ceil(\frac{P_{\theta,t}^{optim1}}{\overline{P_{\theta}}})\\).
The first resolution of the problem is then run, and provides hourly power outputs for each thermal cluster $P_{\theta,t}^{optim1}$. At each hour, an initial value of the NODU of each cluster in then calculated: $M_{\theta,t}^{guide}$ = $ceil(\frac{P_{\theta,t}^{optim1}}{\overline{P_{\theta} } }) $.

#### Step 2: fast mode heuristic
In step 2, for each cluster, a parameter \\(\Delta_{adjust,\theta} = max(\Delta_\theta^+, \Delta_\theta^-)\\) is then calculated, which is the maximum of the minimum on and off durations. Hence, they are approximated to be of the same duration. For each week and each thermal cluster, the week is then divided in intervals of length \\(\Delta_{adjust,\theta}\\). The week is supposed to be cyclic (hour 1 is the timestep followin hour 168), just like in the weekly optimization problem solved by Antares. Within each interval, the NODU of the cluster is increased to the maximum value of \\(M_\{\theta, t}^{guide}\\) during this period. This process is run several time by shifting the intervals timestep by timestep until all the possible week splits have been performed. Finally, the solution which minimizes the number of adjustments of the NODU is used as the solution of step 2 \\(M_{\theta,t}^{heuristic}\\).
In step 2, for each cluster, a parameter $\Delta_{adjust,\theta} = max(\Delta_\theta^+, \Delta_\theta^-)$ is then calculated, which is the maximum of the minimum on and off durations. Hence, they are approximated to be of the same duration. For each week and each thermal cluster, the week is then divided in intervals of length $\Delta_{adjust,\theta}$. The week is supposed to be cyclic (hour 1 is the timestep followin hour 168), just like in the weekly optimization problem solved by Antares. Within each interval, the NODU of the cluster is increased to the maximum value of $M_{\theta, t}^{guide}$ during this period. This process is run several time by shifting the intervals timestep by timestep until all the possible week splits have been performed. Finally, the solution which minimizes the number of adjustments of the NODU is used as the solution of step 2 $M_{\theta,t}^{heuristic}$.

![Step 2 of the "fast" thermal mode](img/thermal_heuristic_fast_step_2.png){ .add-padding-and-white-bg }
<p style="text-align: center;"><em>Illustration of step 2 of the fast mode, with $\Delta_{adjust,\theta}$ equal to 2. Here, both solutions are acceptable as they involve 3 NODU adjustments.</em></p>

#### Step 3: second resolution
Finally, the result of the heuristic \\(M_{\theta,t}^{heuristic}\\) is converted into a lower bound of the power output of each thermal cluster in step 3: \\(P_{\theta,t}^{min}=\underline{P_\theta}*M_{\theta,t}^{heuristic}\\). The second resolution of the problem is then run considering this lower bound, and still excluding integer variables and constraints (17) to (23) of the [optimisation problem formulation](01-modeling.md). In particular, this means that startup and fixed costs are not considered in the formulation of the optimisation problem in any of the two resolutions. However, they are added ex-post and visible in the output variables.
Finally, the result of the heuristic $M_{\theta,t}^{heuristic}$ is converted into a lower bound of the power output of each thermal cluster in step 3: $P_{\theta,t}^{min}=\underline{P_\theta}*M_{\theta,t}^{heuristic}$. The second resolution of the problem is then run considering this lower bound, and still excluding integer variables and constraints (17) to (23) of the [optimisation problem formulation](01-modeling.md). In particular, this means that startup and fixed costs are not considered in the formulation of the optimisation problem in any of the two resolutions. However, they are added ex-post and visible in the output variables.

### Accurate mode

#### Step 1: first problem resolution
The accurate mode aims at taking into account integer variables in both resolutions of the optimisation problem (steps 1 and 3), but considering them as continuous variables in step 1, and fixing them as parameters in step 3. Contrary to the fast mode, constraints (17) to (23) of the [optimisation problem formulation](01-modeling.md) are taken into account in both resolutions, as well as the start-up and fixed costs in the objective function, but the integer variables \\(M_\theta\\) are considered continuous.
The accurate mode aims at taking into account integer variables in both resolutions of the optimisation problem (steps 1 and 3), but considering them as continuous variables in step 1, and fixing them as parameters in step 3. Contrary to the fast mode, constraints (17) to (23) of the [optimisation problem formulation](01-modeling.md) are taken into account in both resolutions, as well as the start-up and fixed costs in the objective function, but the integer variables $M_\theta$ are considered continuous.

The first resolution of the problem is then run. As an output, the integer NODU for each thermal cluster is calculed by rounding up the continuous NODUs which are the output of this resolution: \\(M_{\theta,t}^{guide}=ceil(M_{\theta,t}^{optim1})\\). The variables counting the number of units being started-up or shut-down at any time step \\(M_{\theta,t}^{+}\\) and \\(M_{\theta,t}^{-}\\) are also calculated at that stage.
The first resolution of the problem is then run. As an output, the integer NODU for each thermal cluster is calculed by rounding up the continuous NODUs which are the output of this resolution: $M_{\theta,t}^{guide}=ceil(M_{\theta,t}^{optim1})$. The variables counting the number of units being started-up or shut-down at any time step $M_{\theta,t}^{+}$ and $M_{\theta,t}^{-}$ are also calculated at that stage.

#### Step 2: accurate mode heuristic
Step 2 of the accurate mode starts by checking for each cluster and for each week whether any constraint of minimum time up or down (constraints (22) and (23) of the [weekly optimisation problem](01-modeling.md)) is violated. If no constraint is violated for a given thermal cluster at a given week, no further action is performed and the output variable of this step \\(M_{\theta,t}^{heuristic}=M_{\theta,t}^{guide}\\).
Step 2 of the accurate mode starts by checking for each cluster and for each week whether any constraint of minimum time up or down (constraints (22) and (23) of the [weekly optimisation problem](01-modeling.md)) is violated. If no constraint is violated for a given thermal cluster at a given week, no further action is performed and the output variable of this step $M_{\theta,t}^{heuristic}=M_{\theta,t}^{guide}$.

For a given cluster and a given week, if any of these constraints is violated, a small optimisation problem is run, which aims at minimizing the changes to the NODU of the cluster while respecting constraints (22) and (23). The output of this optimisation problem is then \\(M_{\theta,t}^{heuristic}\\).
For a given cluster and a given week, if any of these constraints is violated, a small optimisation problem is run, which aims at minimizing the changes to the NODU of the cluster while respecting constraints (22) and (23). The output of this optimisation problem is then $M_{\theta,t}^{heuristic}$.

#### Step 3: second resolution
Finally, the output of step 2 \\(M_{\theta,t}^{heuristic}\\) is converted into a lower bound of the NODU of each thermal cluster for the second resolution: \\(M_{\theta,t} \geq M_{\theta,t}^{heuristic}\\). The second resolution of the problem is then run considering this lower bound, and still including integer variables (as continuous variables) and constraints (17) to (23) of the [optimisation problem formulation](01-modeling.md), and start-up and fixed costs in the objective function.
Finally, the output of step 2 $M_{\theta,t}^{heuristic}$ is converted into a lower bound of the NODU of each thermal cluster for the second resolution: $M_{\theta,t} \geq M_{\theta,t}^{heuristic}$. The second resolution of the problem is then run considering this lower bound, and still including integer variables (as continuous variables) and constraints (17) to (23) of the [optimisation problem formulation](01-modeling.md), and start-up and fixed costs in the objective function.

## Annual smoothing heuristic (step 4)

Expand All @@ -71,11 +71,11 @@ As a final step of the resolution of a Monte-Carlo year, an annual smoothing heu

The general principle of this heuristic is that while respecting the production plan determined at the end of the second resolution and the minimum power output of each unit, we calculate a minimum duration below which it is more economically interesting to leave a group on rather than shutting it down and restarting it at a later stage. This duration is defined as follows:

$$𝑑=\frac{\sigma_\theta^+}{\tau_\theta}$$
with \\(\sigma_\theta^+\\) the startup cost of a unit of cluster \\(\theta\\), and \\({\tau_\theta}\\) the fixed cost of a unit of cluster \\(\theta\\) when it is on.
$$d=\frac{\sigma_\theta^+}{\tau_\theta}$$
with $\sigma_\theta^+$ the startup cost of a unit of cluster $\theta$, and ${\tau_\theta}$ the fixed cost of a unit of cluster $\theta$ when it is on.


The smoothing heuristic may then choose to increase the NODU in certain clusters when it identifies that a shut-down/start-up sequence lasted shorter than duration d. The new NODU cannot exceed the maximum accepted NODU to respect the production plan, which is equal to \\(floor(\frac{P_\theta}{\underline{P_\theta}})\\).
The smoothing heuristic may then choose to increase the NODU in certain clusters when it identifies that a shut-down/start-up sequence lasted shorter than duration d. The new NODU cannot exceed the maximum accepted NODU to respect the production plan, which is equal to $floor(\frac{P_\theta}{\underline{P_\theta}})$.

![Step 4: smoothing heuristic](img/thermal_smoothing_heuristic.png).

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/ts-generator/00-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

```{toctree}
:hidden:
01-overview.md
01-overview-tsgenerator.md
02-inputs.md
03-outputs.md
04-parameters.md
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/user-guide/ts-generator/04-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ These parameters are listed under the `[general]` section in the `.ini` file.
---
### Time-series parameters

---

#### generate
- **Expected value:** comma-seperated list of 0 to N elements among the following (case-insensitive):
`load`, `wind`, `hydro`, `thermal`, `solar`, `renewables`, `max-power` (ex: `generate = load, hydro, wind`)
Expand Down

0 comments on commit 69cf486

Please sign in to comment.