Skip to content

Commit

Permalink
Merge branch 'develop' into fix/bc-save-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
pet-mit authored Feb 17, 2025
2 parents 1e3ba29 + aff8942 commit a319777
Show file tree
Hide file tree
Showing 91 changed files with 1,575 additions and 348 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/oracle8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ jobs:
unzip ortools.zip
rm ortools.zip
- name: Init submodule
run: git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests

- name: Install dependencies
run: |
pip3 install -r src/tests/examples/requirements.txt
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Init submodule
run: |
git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests
git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests_NR
- name: Configure
run: |
Expand Down Expand Up @@ -140,6 +140,14 @@ jobs:
batch-name: short-tests
os: ${{ matrix.os }}

- name: Run tests on adequacy patch (CSR)
continue-on-error: true
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{ env.SIMTEST }}
batch-name: adequacy-patch-CSR
os: ${{ matrix.os }}

- name: Collect coverage into one XML report
run: |
gcovr --sonarqube --output coverage.xml
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,6 @@ jobs:
run: |
echo "SIMTEST=${{ fromJson(env.SIMTEST_JSON).version }}" >> $GITHUB_ENV
- name: Init submodule Antares_Simulator_Tests
run: |
git submodule update --init --remote --recursive src/tests/resources/Antares_Simulator_Tests
- name: Init submodule Antares_Simulator_Tests_NR
run: |
git submodule update --init --remote --recursive src/tests/resources/Antares_Simulator_Tests_NR
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/windows-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,6 @@ jobs:
run: |
echo "SIMTEST=${{ fromJson(env.SIMTEST_JSON).version }}" >> $GITHUB_ENV
- name: Init submodule Antares_Simulator_Tests
run: |
git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests
- name: Init submodule Antares_Simulator_Tests_NR
run: |
git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests_NR
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "src/tests/resources/Antares_Simulator_Tests"]
path = src/tests/resources/Antares_Simulator_Tests
url = https://github.com/AntaresSimulatorTeam/Antares_Simulator_Tests.git
branch = master
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/microsoft/vcpkg.git
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ root of the project and running:
cd docs/pdf-doc-generation-with-sphinx
bash create_pdf_doc.sh user-guide.pdf
```
(You'll have to install these dependencies first: latexmk texlive-latex-recommended texlive-formats-extra).
Sphinx will create a `user-guide.pdf` file in `docs/pdf-doc-generation-with-sphinx`.

### Doxygen
Expand Down
4 changes: 2 additions & 2 deletions docs/developer-guide/3-Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ Here is a list of mandatory or optional CMake configuration options:
| `CMAKE_TOOLCHAIN_FILE` | no | Path to VCPKG toolchain file, allows to integrate VCPKG with cmake build | `../vcpkg/scripts/buildsystems/vcpkg.cmake` | |
| `VCPKG_TARGET_TRIPLET` | no | Define VCPKG triplet (build type for dependencies etc.) | `x64-windows-antares` / `x64-linux-antares` | |

> 💡 **Disable the UI build to make builds faster**
> 💡 **Disable the UI build to make builds faster**
> The UI takes up a good chunk of compilation time. It is enabled by default, but you can disable it by turning off `BUILD_UI`
> 💡 **Use Ninja to speed up target generation by CMake**
> 💡 **Use Ninja to speed up target generation by CMake**
> At configure time, you may specify Ninja for generation instead of traditional Make. This will speed up the update
> step after you make small changes to the code.
> ```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dynamic modeler architecture

## Models
(for details about these concepts, see [this page](../../user-guide/solver/dynamic-modeler/05-model.md))
(for details about these concepts, see [this page](../../user-guide/modeler/05-model.md))

```plantuml
@startuml
Expand Down Expand Up @@ -85,7 +85,7 @@ ModelLibraryRepository "1" *-- "0:N" ModelLibrary
```

## Components
(for details about these concepts, see [this page](../../user-guide/solver/dynamic-modeler/05-model.md))
(for details about these concepts, see [this page](../../user-guide/modeler/05-model.md))

```plantuml
@startuml
Expand Down
3 changes: 2 additions & 1 deletion docs/user-guide/00-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
02-install.md
03-getting_started.md
solver/00-index.md
ts-analyzer-generator/00-index.md
modeler/00-index.md
ts-generator/00-index.md
other-features/00-index.md
04-migration-guides.md
05-attribution-notices.md
Expand Down
8 changes: 4 additions & 4 deletions docs/user-guide/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ the random factors that may affect the balance between load and generation. Econ
as much a critical role as they do in the other kinds of studies since the stakes are mainly to know if and
when supply security is likely to be jeopardized (detailed costs incurred in more ordinary conditions are of
comparatively lower importance). In these studies, the default *Antares* option to use is the
[`adequacy`](solver/static-modeler/04-parameters.md#mode) simulation mode.
[`adequacy`](solver/04-parameters.md#mode) simulation mode.

### Transmission project profitability
[//]: # (TODO: explain what "fair and perfect market" means)
Expand All @@ -45,7 +45,7 @@ and/or improvement of the security of supply (reduction of the loss-of-load expe
In these studies, economic parameters and the physical modeling of the dynamic constraints bearing on
the generating units are of paramount importance. Though a thorough survey of many "Monte-Carlo years"
is still required, the number of scenarios to simulate is not as large as in generation adequacy studies.
In these studies, the default *Antares* option to use is the [`economy`](solver/static-modeler/04-parameters.md#mode) simulation mode.
In these studies, the default *Antares* option to use is the [`economy`](solver/04-parameters.md#mode) simulation mode.

## Performance considerations
Typically, *Antares* has to solve a least-cost hydro-thermal power schedule and unit commitment problem, with an hourly
Expand All @@ -54,7 +54,7 @@ The large number and the size of the individual problems to solve often make opt

Depending on user-defined results accuracy requirements, various practical options[^2] allow to simplify either
the formulation of the problems, or their resolution.
[^2]: See [hydro-pricing-mode](solver/static-modeler/04-parameters.md#hydro-pricing-mode), [unit-commitment-mode](solver/static-modeler/04-parameters.md#unit-commitment-mode)
[^2]: See [hydro-pricing-mode](solver/04-parameters.md#hydro-pricing-mode), [unit-commitment-mode](solver/04-parameters.md#unit-commitment-mode)

[//]: # (TODO: list in [^2] the other parameters that have impact on performance)

Expand All @@ -73,4 +73,4 @@ operation problems (one for each week of each Monte-Carlo year), assumed to be i
Note that, however, dependency issues such as the management of hydro stock (or any other kind of energy storage
facility) may bring a significant coupling between the successive problems, which needs to be addressed properly[^3].

[^3]: See how *Antares* addresses stock dependency between successive problems [here](solver/static-modeler/06-hydro-heuristics.md#seasonal-hydro-pre-allocation).
[^3]: See how *Antares* addresses stock dependency between successive problems [here](solver/06-hydro-heuristics.md#seasonal-hydro-pre-allocation).
10 changes: 5 additions & 5 deletions docs/user-guide/02-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Installed alone, the Antares simulator does not require a lot of HDD space (less
- The number of ready-made Time-Series and the number of Time-Series to be generated at runtime and stored afterward
(see [these parameters](ts-generator/04-parameters.md#time-series-parameters)).
- The activation of output filters
(see [thematic-trimming](solver/static-modeler/04-parameters.md#thematic-trimming) and [geographic-trimming](solver/static-modeler/04-parameters.md#geographic-trimming) parameters).
(see [thematic-trimming](solver/04-parameters.md#thematic-trimming) and [geographic-trimming](solver/04-parameters.md#geographic-trimming) parameters).
- The number of Monte-Carlo years involved in the simulation session, if the storage of detailed
[year-by-year results](solver/static-modeler/04-parameters.md#year-by-year) is activated
- Whether [MPS export](solver/static-modeler/04-parameters.md#include-exportmps) is activated
[year-by-year results](solver/04-parameters.md#year-by-year) is activated
- Whether [MPS export](solver/04-parameters.md#include-exportmps) is activated

If you encounter space issues, consider tweaking the aforementioned parameters or reducing your study size.

Expand All @@ -35,8 +35,8 @@ The amount of RAM required for a simulation depends on:

- The size of the power system model (number of Areas, Links, Thermal clusters, etc.)
- The number of ready-made Time-Series and that of Time-Series to be generated at runtime
- The simulation [mode](solver/static-modeler/04-parameters.md#mode)
- The [unit commitment resolution mode](solver/static-modeler/04-parameters.md#unit-commitment-mode)
- The simulation [mode](solver/04-parameters.md#mode)
- The [unit commitment resolution mode](solver/04-parameters.md#unit-commitment-mode)
- If the [multi-threading](solver/optional-features/multi-threading.md) option is used

If you encounter memory issues, consider tweaking the aforementioned parameters or reducing your study size.
Expand Down
6 changes: 3 additions & 3 deletions docs/user-guide/03-getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ These steps most often involve:

1. Initializing or updating the input data (time-series, grid topology, fleet description, etc.).
*In this step, the user is expected to provide all the input data they have, except the time-series that are
supposed to be [automatically generated](solver/static-modeler/04-parameters.md#generate) by *Antares* (see step (3)).*
supposed to be [automatically generated](solver/04-parameters.md#generate) by *Antares* (see step (3)).*
*As stated above, it is highly recommended to use robust tools to produce input data, such as [Antares Web](https://antares-web.readthedocs.io)
or [Antares Extensions](#using-extensions).*
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](solver/static-modeler/04-parameters.md#generate),
3. *(Optional)* If some time-series are supposed to be [automatically generated](solver/04-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-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-solver.md) tool should be used.*
5. Exploiting the detailed [results](solver/static-modeler/03-outputs.md) yielded by (4).
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
60 changes: 22 additions & 38 deletions docs/user-guide/04-migration-guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ The following properties were removed from **settings/generaldata.ini**.
- `adequacy patch/set-to-null-ntc-between-physical-out-for-first-step`
- `other preferences/initial-reservoir-levels`

If the user provides any of the key/values below
- `adequacy patch/enable-first-step = true`
- `adequacy patch/set-to-null-ntc-between-physical-out-for-first-step = false`
- `other preferences/initial-reservoir-levels = hot start`
the simulation will fail with a warning. We recommend removing these properties from `settings/generaldata.ini`. Other values (e.g `adequacy patch/enable-first-step = false`) will be ignored.

#### Short-term storages

- Added properties:
Expand All @@ -25,12 +31,18 @@ The following properties were removed from **settings/generaldata.ini**.
- `penalize-variation-withdrawal` boolean, default false (file
input/st-storage/series/<area id>/list.ini)

- Added timeseries cost-injection.txt, cost-withdrawal.txt, cost-level.txt, cost-variation-injection.txt and
cost-variation-withdrawal.txt. These files are optional. If present, they must contain either no value (same behavior
as no file), or HOURS_PER_YEAR = 8760 coefficients in one column. Each of these timeseries is located in directory
input/st-storage/series/<area id>/<ST id>/, along existing series (rule-curves.txt, etc.).
- Added 5 optional timeseries for each STS in existing directory `input/st-storage/series/<area id>/<ST id>/`
- `cost-injection.txt`
- `cost-withdrawal.txt`
- `cost-level.txt`
- `cost-variation-injection.txt`
- `cost-variation-withdrawal.txt`

It is possible to provide only k of these time-series, for k=0..5. However, if present each file must contain either no value (same behavior as no file), or HOURS_PER_YEAR = 8760 coefficients in one column. These timeseries are located along existing series (rule-curves.txt, etc.).

Note that in order for time-series `cost-variation-injection.txt` and `cost-variation-withdrawal.txt` to be taken into account, the user needs to set `penalize-variation-injection = true` (resp. `penalize-variation-withdrawal = true`). If not, these files will be ignored.

#### Final levels / scenario-builder
#### Hydro final levels / scenario-builder

- Added optional key type "hfl" (hydro final level) in the scenario builder. The syntax is equivalent to existing
prefix "hl" (hydro initial level), that is
Expand All @@ -41,41 +53,13 @@ hl,area,<year> = <value>

By convention, `year` start at 0 and `value` must be in interval [0, 1].

#### Compatibility flag for hydro pmax coefficients

In file settings/generaldata.ini, in section `other preferences`, add property `hydro-pmax-format` with possible values
`daily` (default, legacy) and `hourly` (new).

Note: This flag allows to bypass the breaking change that took place in version 9.1 for hydro max powers. It is possible
to support only the `legacy` file format.

### (TS-generator only) TS generation for link capacities

In files input/links/<link1>/properties.ini, add the following properties

- unitcount (unsigned int, default 1)
- nominalcapacity (float, default 0)
- law.planned (string "uniform"/"geometric", default "uniform")
- law.forced (same)
- volatility.planned (double in [0,1], default 0)
- volatility.forced (same)
- force-no-generation (true/false, default true)

- "prepro" timeseries => input/links/<link 1>/prepro/<link 2>_{direct, indirect}.txt, 365x6 values, respectively "forced
outage duration", "planned outage duration", "forced outage rate", "planned outage rate", "minimum of groups in
maintenance", "maximum of groups in maintenance".
- "modulation" timeseries => input/links/<link 1>/prepro/<link 2>_mod_{direct, indirect}.txt, 8760x1 values each
in [0, 1]
- number of TS to generate => generaldata.ini/General/nbtimeserieslinks (unsigned int, default value 1)

### Input

#### Hydro Final Reservoir Level
#### Compatibility flag for hydro maximal power

In the existing file **settings/scenariobuilder.dat**, under **&lt;ruleset&gt;** section following properties added (if
final reservoir level specified, different from `init`):
In file settings/generaldata.ini, in new section `other preferences`, add new property `hydro-pmax` with possible values
- `daily` (default, legacy)
- `hourly` (new).

* **hfl,&lt;area&gt;,&lt;year&gt; = &lt;hfl-value&gt;**
Note: This flag allows to bypass the breaking change that was introduced in version 9.1 the representation of max hydro power (daily -> hourly, see below). If flag is not specified or given value `daily`, the 8.8 format will be used for hydro pmax time-series. For reference, this format consists of a single file with 4 columns and 365 rows located in `input/hydro/common/capacity/maxpower_<area id>.txt`.

### Output

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
[//]: # (Index used by Sphinx to generate correct PDF tree)

# Dynamic Modeler
# Modeler

```{toctree}
:hidden:
01-overview-new-solver.md
01-overview-modeler.md
02-inputs.md
03-outputs.md
04-parameters.md
05-model.md
06-heuristics.md
07-standard-library.md
08-hybrid-studies.md
09-command-line.md
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Overview

_**Disclaimer: please note that the new Antares dynamic modeler is still under development, and that some of the
_**Disclaimer: please note that the new Antares modeler is still under development, and that some of the
features described in this section may still be unavailable**_

The new Antares dynamic modeler allows more flexibility in the definition of physical models used in the simulation.
Expand Down
Loading

0 comments on commit a319777

Please sign in to comment.