[ANT-3760] 920 Test NR to cucumber#3134
Draft
JasonMarechal25 wants to merge 73 commits intodevelopfrom
Draft
Conversation
Use a variadic template to generate spatial agregate type list. Code is easier to read and diff to compare.
> 15:59:31][solver][infos] Generating the wind time-series [2025-10-09 15:59:31][solver][infos] Doing hydro validation [2025-10-09 15:59:31][solver][infos] Starting the simulation [2025-10-09 15:59:32][solver-0][infos] Year 1 started [2025-10-09 15:59:32][solver-0][debug] year 1 received numSpace 0 [2025-10-09 15:59:32][solver-0][infos] [2025-10-09 15:59:32][solver-0][infos] Modeler build took 0.063 s [2025-10-09 15:59:32][solver-0][infos] [2025-10-09 15:59:32][solver-0][infos] [2025-10-09 15:59:32][solver-0][infos] Total Problem size : 336 variables, 336 constraints [2025-10-09 15:59:32][solver-0][infos] [2025-10-09 15:59:32][solver-0][infos] WARNING: All log messages before absl::InitializeLog() is called are written to STDERR W0000 00:00:1760018372.656011 1047085 sirius_interface.cc:1120] SetPrimalTolerance not implemented for sirius_interface W0000 00:00:1760018372.671279 1047085 sirius_interface.cc:1127] SetDualTolerance not implemented for sirius_interface [2025-10-09 15:59:32][solver-0][infos] Solved in 0.149 s [2025-10-09 15:59:32][solver-0][infos] [2025-10-09 15:59:32][solver-0][infos] Modeler build took 0.021 s W0000 00:00:1760018372.835302 1047085 sirius_interface.cc:1120] SetPrimalTolerance not implemented for sirius_interface W0000 00:00:1760018372.835381 1047085 sirius_interface.cc:1127] SetDualTolerance not implemented for sirius_interface [2025-10-09 15:59:32][solver-0][infos] Solved in 0.007 s [2025-10-09 15:59:34][solver-1][infos] Year 2 started [2025-10-09 15:59:34][solver-1][debug] year 2 received numSpace 1 --------- Co-authored-by: Jason Maréchal <45510813+JasonMarechal25@users.noreply.github.com>
Co-authored-by: Jason Maréchal <45510813+JasonMarechal25@users.noreply.github.com>
Co-authored-by: Jason Maréchal <45510813+JasonMarechal25@users.noreply.github.com>
Co-authored-by: Florian Omnès <florian.omnes@rte-france.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
### Current behavior Deprecation of keys or values in general data trigger warnings. General-data warning are considered fatal and end the simulation. Unless _--force_ flag is used. ### Problem When going from Antares 8.8 to Antares 9.x with a study containing deprecated values, the simulation end in error due to the behavior previously described. ### Expectation Upgrading executable should not force user to update studies for deprecated keys or values. ### Proposal * Elevate all fatal warning as proper errors * Keep depreciation warning as such * Warning are now non-fatal * It is still possible to by-pass now-errors with _--force_ flag ### Results: #### Launching with error and warning. Errors are fatal > [2025-10-15 14:00:00][solver][debug] Releasing runtime data [2025-10-15 14:00:00][solver][warns] In generaldata.ini, parameter `refreshtimeseries` is no longer supported since version 9.3, consider removing it from the study [2025-10-15 14:00:00][solver][error] Assertion error for unfeasible problem behavior from string conversion : Unexpected N7Antares4Data25UnfeasibleProblemBehaviorE name error-verbos [2025-10-15 14:00:00][solver][error] parameters: invalid unfeasible problem behavior. Got 'error-verbos'. reset to error-verbose [2025-10-15 14:00:00][solver][error] /tmp/test_NR/hybrid/001 One node - passive/settings/generaldata.ini: 'include-unfeasible-problem-behavior': Unknown property [2025-10-15 14:00:00][solver][error] parameters: invalid renewable generation modelling. Got 'aggregate' [2025-10-15 14:00:00][solver][error] /tmp/test_NR/hybrid/001 One node - passive/settings/generaldata.ini: 'renewable-generation-modelling': Unknown property [2025-10-15 14:00:00][solver][error] Generation should be either `clusters` or `aggregated` [2025-10-15 14:00:00][solver][fatal] The simulation must stop. [2025-10-15 14:00:00][solver][error] Aborting now. See logs for more details > > Process finished with exit code 1 #### Launching with error and warning, --force: > [2025-10-15 14:02:46][solver][infos] Found 6 errors and 1 warning: As requested, the warnings can be ignored and the simulation will continue [2025-10-15 14:02:46][solver][infos] However here is the list of errors: [2025-10-15 14:02:46][solver][warns] In generaldata.ini, parameter `refreshtimeseries` is no longer supported since version 9.3, consider removing it from the study [2025-10-15 14:02:46][solver][error] Assertion error for unfeasible problem behavior from string conversion : Unexpected N7Antares4Data25UnfeasibleProblemBehaviorE name error-verbos [2025-10-15 14:02:46][solver][error] parameters: invalid unfeasible problem behavior. Got 'error-verbos'. reset to error-verbose [2025-10-15 14:02:46][solver][error] /tmp/test_NR/hybrid/001 One node - passive/settings/generaldata.ini: 'include-unfeasible-problem-behavior': Unknown property [2025-10-15 14:02:46][solver][error] parameters: invalid renewable generation modelling. Got 'aggregate' [2025-10-15 14:02:46][solver][error] /tmp/test_NR/hybrid/001 One node - passive/settings/generaldata.ini: 'renewable-generation-modelling': Unknown property [2025-10-15 14:02:46][solver][error] Generation should be either `clusters` or `aggregated` [2025-10-15 14:02:46][solver][infos] [2025-10-15 14:02:46][solver][infos] Generating calendar informations We print the list again at the end because users don't read logs : > [2025-10-15 14:11:45][solver][infos] Total simulation time: 00h00m00s [2025-10-15 14:11:45][solver][error] Simulation completed but there were some errors during loading. Here is the list: [2025-10-15 14:11:45][solver][warns] In generaldata.ini, parameter `refreshtimeseries` is no longer supported since version 9.3, consider removing it from the study [2025-10-15 14:11:45][solver][error] parameters: invalid renewable generation modelling. Got 'aggregate' [2025-10-15 14:11:45][solver][error] /tmp/test_NR/hybrid/001 One node - passive/settings/generaldata.ini: 'renewable-generation-modelling': Unknown property [2025-10-15 14:11:45][solver][error] Generation should be either `clusters` or `aggregated` [2025-10-15 14:11:45][solver][infos] [UI] Quitting the solver gracefully #### Launching with warning only. Warnings are **non**-fatal We only print the list at the end > [2025-10-15 14:13:22][solver][infos] Total simulation time: 00h00m00s [2025-10-15 14:13:22][solver][warns] Simulation completed but there were some warnings during loading. Here is the list: [2025-10-15 14:13:22][solver][warns] In generaldata.ini, parameter `refreshtimeseries` is no longer supported since version 9.3, consider removing it from the study [2025-10-15 14:13:22][solver][infos] [UI] Quitting the solver gracefully --------- Co-authored-by: Florian Omnès <florian.omnes@rte-france.com>
Add class `SingleProblemGetter` to allow for single week problem loading
```cpp
Antares::Solver::SingleProblemGetter getter;
getter.load("/path/to/study");
auto constant = getter.getConstantData();
auto weekly = getter.getWeeklyData({/*year*/0, /*week*/1});
```
# TODO
- [X] Load study from a filepath
- [X] Return proper constant data
- [X] Return proper weekly data from user-provided week & year indices
- [x] Check noises
- [x] Check hydro credits, that is RHS for weekly constraint
`HydroPower`
- [x] Check timeseries generation (depends on #3182)
- [x] Cache yearly data (no need to recompute yearly data)
- [X] Check call to `Study::computePThetaInfForThermalClusters`
- [ ] Check simulations not starting on Jan 1st
- [x] Add unit testing
- [x] Clean up code (duplication, TODOs, etc.)
When visiting `expression[t]`, the shifted_expr is optional: if it is absent, ANTLR returns a `nullptr`. This PR handles this case gracefully (no shift).
|
# Conflicts: # src/tests/cucumber/features/steps/common_steps/solver_output_handler.py
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.