From ee18191ab91f34285259b0e7981b2ab7b8857e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Thu, 30 May 2024 13:33:26 +0200 Subject: [PATCH 01/18] Create changelog sections according to branches, add missing minor versions (#2125) * Create sections according to branches * Add missing minor versions (8.6.[1-7], 8.7.1, 8.7.2, 8.7.3, etc) * Distinguish LTS branches and other branches, display end of support date for LTS branches --- docs/developer-guide/CHANGELOG.md | 132 +++++++++++++++++++++++------- 1 file changed, 101 insertions(+), 31 deletions(-) diff --git a/docs/developer-guide/CHANGELOG.md b/docs/developer-guide/CHANGELOG.md index 5c70a71e30..c5bcda7fff 100644 --- a/docs/developer-guide/CHANGELOG.md +++ b/docs/developer-guide/CHANGELOG.md @@ -4,15 +4,70 @@ toc_depth: 2 # Antares Changelog +## Index by branch +- [Branch 9.1.x](#910-062024) +- [Branch 9.0.x](#branch-90x) +- [Branch 8.8.x](#branch-88x-end-of-support-122025) (LTS) +- [Branch 8.7.x](#branch-87x) +- [Branch 8.6.x](#branch-86x-end-of-support-062025) (LTS) +- [Branch 8.5.x](#branch-85x) +- [Branch 8.4.x](#branch-84x) -9.1.0 --------------------- -## New features +LTS = long-term support, 2 years of support starting from the initial release date. + +## Older branches (1.x to 8.3.x) +[Older branches](#older-branches) + +# Branch 9.1.x + +## 9.1.0 (06/2024) +### New features * Scenarized & hourly values for hydro pumping and hydro generation. Previously this data was not scenarized and daily. * STS groups are now "dynamic" : group names are no longer fixed by code, user is free to define these groups. * Add optimization options from command line in OR-Tools / XPRESS (#1837) +### TODO +# Branch 9.0.x + +## 9.0.0 +### License +* Use licence MPL 2.0 instead of GPL3_WITH_RTE-Exceptions (#1812) + +### Improvements +* Include overflow variable in HydroPower constraint (#1903) +* Add total time logging at the end of the simulation (#1908) +* Add STS level constraint to suspect list for infeasible problem analysis (#1891) + +### For developers +* Use precompiled OR-Tools for Oracle Linux 8 CI (#1893) +* Change version behavior to allow more flexibility (#1898) -## Improvements +### Code quality +* Use std::shared_ptr instead of indices for active binding constraints in results (#1887) +* Fix a few compilation warnings (#1880) +* Scratchpad numspace (#1749) + +### Tests +* Fix invalid index causing segfault in `test-study` test (#1902) + +# Branch 8.8.x (end of support 12/2025) + +## 8.8.5 (05/2024) +### Bugfix +- [UI] Fix opening a study from the file browser +- Fix crash occurring when duplicate thermal clusters are present in a study (same name) +- Fix formula for "PROFIT BY PLANT" + +## 8.8.4 (03/2024) +### Bugfix +* Adequacy patch CSR - fix DTG MRG (#1982) +* Fix ts numbers for no gen clusters (#1969) +* Remove unitcount limit for time series generation (#1960) + +## 8.8.3 (02/2024) +### Bugfix +* Fix an issue where depending on the platform the output archive could contain several entries of the same area and inrco files + +### Improvements * Remove sc-builder prefix "hgp", use "h" instead for max hydro pumping & generation timeseries. * Rationalize consistency checks on the number of columns (#2073) * Documentation reorganization and improvement (#2024) (#2023) (#2022) @@ -61,37 +116,12 @@ toc_depth: 2 * Remove deps-build Actions (#2043) * Remove unused logs.hxx (#2026) -9.0.0 --------------------- -### License -* Use licence MPL 2.0 instead of GPL3_WITH_RTE-Exceptions (#1812) - -### Improvements -* Include overflow variable in HydroPower constraint (#1903) -* Add total time logging at the end of the simulation (#1908) -* Add STS level constraint to suspect list for infeasible problem analysis (#1891) - -### For developers -* Use precompiled OR-Tools for Oracle Linux 8 CI (#1893) -* Change version behavior to allow more flexibility (#1898) - -### Code quality -* Use std::shared_ptr instead of indices for active binding constraints in results (#1887) -* Fix a few compilation warnings (#1880) -* Scratchpad numspace (#1749) - -### Tests -* Fix invalid index causing segfault in `test-study` test (#1902) - ## 8.8.2 --------------------- - ### Bugfix * Fix segfault caused by uninitialized `cluster.series.timeseriesNumbers` (#1876). This bug was introduced in v8.8.1 by #1752 * Bump OR-Tools from 9.5 to 9.8 (fix crash with XPRESS) (#1873) ## 8.8.1 (01/2024) --------------------- /!\ This version has known bugs, please use 8.8.2 instead. ### Bugfix @@ -228,8 +258,21 @@ toc_depth: 2 ### Misc * Schedule deps compile instead of develop merge (#1530) +# Branch 8.7.x + +## 8.7.3 (02/2024) +### Bugfix +* Use OR-Tools v9.8-rte1.0 (performance improvements with OR-Tools + XPRESS) + +## 8.7.2 (11/2023) +### Bugfix +* Named MPS - fix duplicated "ranged" binding constraints (#1569) + +## 8.7.1 (11/2023) +### Bugfix +* Fix output variable PROFIT for thermal clusters (#1767) + ## 8.7.0 (08/2023) --------------------- ### New Features * Binding constraint RHS scenarization (#1219) * Implement --mps-export command-line option (#1404) @@ -289,8 +332,31 @@ toc_depth: 2 * Fix critical code smells (#1412) * Named MPS: factorize variable & constraint namers (#1409) * Array, logs jit and correlation in makefile (#1410) +# Branch 8.6.x (end of support 06/2025) + +## v8.6.7 (05/2024) +### Bugfixes +* Fix formula use in output var Profit by plant [ANT-1719] (https://github.com/AntaresSimulatorTeam/Antares_Simulator/pull/2097) + +## v8.6.6 (03/2024) +### Bugfixes +* Adequacy patch CSR - fix DTG MRG (#1982) +* Fix ts numbers for no gen clusters (#1969) +* Remove unitcount limit for time series generation (#1960) + +## 8.6.5 (02/2024) +### Bugfix +* Use OR-Tools v9.8-rte1.0 (performance improvements with OR-Tools + XPRESS) + +# v8.6.4 (11/2023) +## Bugfixes +* Fix Oracle Linux minizip build + actually run zip unit tests (#1744) +* Fix output variable PROFIT for thermal clusters (#1767) + +# v8.6.3 (10/2023) +## Bugfixes +* Increase file size limit from 80Mo to 80Go when reading file. Fix issue on Windows --------------------- ## v8.6.2 (08/2023) ### Bugfixes * Backport [v8.4.3](#v843-082023) changes @@ -335,6 +401,7 @@ toc_depth: 2 ### For developers * Bumped OR-Tools 9.2 -> 9.5. CMake 3.18+ is required for build if building OR-Tools, and XPRESS 9.0 for execution (previously 8.13). +# Branch 8.5.x ## v8.5.1 (08/2023) -------------------- @@ -357,6 +424,7 @@ toc_depth: 2 ### Examples & documentation * Update docs to include CSR #1156 * Fix examples studies (invalid v8.3.0 -> v8.5.0) #1136 +# Branch 8.4.x ## v8.4.3 (08/2023) -------------------- @@ -468,6 +536,8 @@ toc_depth: 2 **Full Changelog**: https://github.com/AntaresSimulatorTeam/Antares_Simulator/compare/v8.3.2..v8.4.0 +# Older branches + ## v8.3.3 (12/2022) -------------------- ### Bugfix From 910c3ff6a3bab2a9b54a6a2ab67a4657eec6f58b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Thu, 30 May 2024 14:55:54 +0200 Subject: [PATCH 02/18] Minor fixes for changelog (#2129) - Improve table of contents - Remove prefix "v" --- docs/developer-guide/CHANGELOG.md | 579 +++++++++++++++--------------- 1 file changed, 282 insertions(+), 297 deletions(-) diff --git a/docs/developer-guide/CHANGELOG.md b/docs/developer-guide/CHANGELOG.md index c5bcda7fff..67aa64da57 100644 --- a/docs/developer-guide/CHANGELOG.md +++ b/docs/developer-guide/CHANGELOG.md @@ -3,82 +3,68 @@ toc_depth: 2 --- # Antares Changelog +## Branch 9.1.x -## Index by branch -- [Branch 9.1.x](#910-062024) -- [Branch 9.0.x](#branch-90x) -- [Branch 8.8.x](#branch-88x-end-of-support-122025) (LTS) -- [Branch 8.7.x](#branch-87x) -- [Branch 8.6.x](#branch-86x-end-of-support-062025) (LTS) -- [Branch 8.5.x](#branch-85x) -- [Branch 8.4.x](#branch-84x) - -LTS = long-term support, 2 years of support starting from the initial release date. - -## Older branches (1.x to 8.3.x) -[Older branches](#older-branches) - -# Branch 9.1.x - -## 9.1.0 (06/2024) -### New features +### 9.1.0 (06/2024) +#### New features * Scenarized & hourly values for hydro pumping and hydro generation. Previously this data was not scenarized and daily. * STS groups are now "dynamic" : group names are no longer fixed by code, user is free to define these groups. * Add optimization options from command line in OR-Tools / XPRESS (#1837) -### TODO -# Branch 9.0.x +#### TODO + +## Branch 9.0.x -## 9.0.0 -### License +### 9.0.0 +#### License * Use licence MPL 2.0 instead of GPL3_WITH_RTE-Exceptions (#1812) -### Improvements +#### Improvements * Include overflow variable in HydroPower constraint (#1903) * Add total time logging at the end of the simulation (#1908) * Add STS level constraint to suspect list for infeasible problem analysis (#1891) -### For developers +#### For developers * Use precompiled OR-Tools for Oracle Linux 8 CI (#1893) * Change version behavior to allow more flexibility (#1898) -### Code quality +#### Code quality * Use std::shared_ptr instead of indices for active binding constraints in results (#1887) * Fix a few compilation warnings (#1880) * Scratchpad numspace (#1749) -### Tests +#### Tests * Fix invalid index causing segfault in `test-study` test (#1902) -# Branch 8.8.x (end of support 12/2025) +## Branch 8.8.x (end of support 12/2025) -## 8.8.5 (05/2024) -### Bugfix +### 8.8.5 (05/2024) +#### Bugfix - [UI] Fix opening a study from the file browser - Fix crash occurring when duplicate thermal clusters are present in a study (same name) - Fix formula for "PROFIT BY PLANT" -## 8.8.4 (03/2024) -### Bugfix +### 8.8.4 (03/2024) +#### Bugfix * Adequacy patch CSR - fix DTG MRG (#1982) * Fix ts numbers for no gen clusters (#1969) * Remove unitcount limit for time series generation (#1960) -## 8.8.3 (02/2024) -### Bugfix +### 8.8.3 (02/2024) +#### Bugfix * Fix an issue where depending on the platform the output archive could contain several entries of the same area and inrco files -### Improvements +#### Improvements * Remove sc-builder prefix "hgp", use "h" instead for max hydro pumping & generation timeseries. * Rationalize consistency checks on the number of columns (#2073) * Documentation reorganization and improvement (#2024) (#2023) (#2022) * Add doc for thermal heuristic (#2048) -### Bugfixes +#### Bugfixes * Change the formula used in thermal clusters profits (#2097) [ANT-1719] * Bug on GUI: double-click on study.antares doesn't work anymore (#2047) [ANT-1634] * Fix build error related to Boost Test < 1.67 on OL8 (#2094) -### For developers +#### For developers * Update format-code.sh (#2027) * Update clang-format options and apply them (#2067) * FileTreeStudyLoader [ANT-1213] (#2058) @@ -95,7 +81,7 @@ LTS = long-term support, 2 years of support starting from the initial release da * Time Series generation refactor (#2045) * Create & forward declare BasisStatus struct, reduce build time (#2044) -### Code quality +#### Code quality * Simplify code for timer (#2032) * Refactor Application (#2056) * Remove some Yuni Strings in solver (#2061) @@ -107,7 +93,7 @@ LTS = long-term support, 2 years of support starting from the initial release da * Use std::atomic instead of std::mutex (#2082) * Use std::clamp for sc-builder's hydro levels (#2074) -### Removed +#### Removed * Remove study cleaner tool (#2059) * Remove export target (#2053) * Remove unique_ptr passed by ref (#2086) @@ -116,24 +102,24 @@ LTS = long-term support, 2 years of support starting from the initial release da * Remove deps-build Actions (#2043) * Remove unused logs.hxx (#2026) -## 8.8.2 -### Bugfix +### 8.8.2 +#### Bugfix * Fix segfault caused by uninitialized `cluster.series.timeseriesNumbers` (#1876). This bug was introduced in v8.8.1 by #1752 * Bump OR-Tools from 9.5 to 9.8 (fix crash with XPRESS) (#1873) -## 8.8.1 (01/2024) +### 8.8.1 (01/2024) /!\ This version has known bugs, please use 8.8.2 instead. -### Bugfix +#### Bugfix * Simplify TS numbers drawings, fix bug related to refresh & local thermal generation (#1752) -### Improvements +#### Improvements * Take into account breaking change in OR-Tools's API, enable SCIP & GLPK solvers, bump OR-Tools (#1825). This should improve performances with FICO XPRESS * Fail if OR-Tools solver is not found (#1851) * Normalize simulation mode Expansion, fix logs (#1771) * Add possibility to release without running any tests (#1852) -### Code quality +#### Code quality * Use `std::unordered_map` for tmpDataByArea_ (hydro ventilation) (#1855) * Remove `mutable` keyword from `PROBLEME_HEBDO` (#1846) * Remove `Study::gotFatalError`, throw exceptions instead (#1806) @@ -141,25 +127,25 @@ LTS = long-term support, 2 years of support starting from the initial release da * Use modern style `for` loops, avoid int cast (#1847) * Remove `YUNI_STATIC_ASSERT` (#1863) -### Testing +#### Testing * Add tests on short-term storage/thermal cluster/renewable cluster removal (#1841) -### Doc +#### Doc * Add precision about `enabled` field in ST storage (#1850) * Use dedicated URL path for Doxygen, instead of root (#1865) * Fix HTML generation for readthedocs (#1867) * Add dark mode switch for Doxygen online documentation (#1792) -## 8.8.0 (12/2023) +### 8.8.0 (12/2023) -------------------- -### New features +#### New features * New "cash-flow" variable for ST storage (#1633) * Experimental optimization with discrete variables (MILP unit-commitment mode #670) * Add `enabled` property for ST storage objects, fix bug related to saving ST objects (#1807) * Solver logs can be enabled either by the command-line option (--solver-logs) or in the generaldata.ini -### Improvements +#### Improvements * Add shortcut -s for names MPS problems in CLI options (#1613) * Use 50% as a default value for ST-storage property initiallevel (#1632) * Add warning logs for non-existent output variable (#1638) @@ -168,14 +154,14 @@ LTS = long-term support, 2 years of support starting from the initial release da * Always check mingen against maxPower, regardless of reservoirManagement (#1656) * New log msg when solver not found in or-tools (#1687) -### For developers +#### For developers * Fix annoying error log about correlation matrices in tests (#1573) -### Bugfixes (reported by users) +#### Bugfixes (reported by users) * Fix output variable PROFIT for thermal clusters (#1767) * Bug on renewable cluster (wrong group) (#1631) -### Bugfixes (reported internally) +#### Bugfixes (reported internally) * Fix oracle-linux8 binaries missing compression feature (#1741) * Named MPS - fix duplicated "ranged" binding constraints (#1569) * Fix save for short term storage objects (#1807) @@ -187,22 +173,22 @@ LTS = long-term support, 2 years of support starting from the initial release da * Fixes swallowed exceptions in computation thread (#1685) * Fix writer causing a segfault with OR-Tools (#1584) -### Documentation +#### Documentation * Create Doxygen documentation (#1650) * Update README.md (#1654) * Add advice for developers (#1639) * Document the usage of XPRESS (#1596) -### GUI +#### GUI * Fix regression on cluster renaming, add unit tests (#1699) -### Dependencies +#### Dependencies * Use minizip-ng 4.0.1 (from 3.0.7) (#1696) * Bump vcpkg to latest tag (2023.07.21) (#1532) * Remove dead code yuni-docmake (#1544) * Remove fixed-size ints from Yuni (#1622, #1629) -### Code cleaning / quality +#### Code cleaning / quality * Architecture Decision Record for Study breakdown (#1600) * Remove dependency to UI, use RAII to handle resources (#1678) * De-templatize `HydroManagement::prepareNetDemand` (#1679) @@ -243,7 +229,7 @@ LTS = long-term support, 2 years of support starting from the initial release da * Remove unused function `getFilenameWithExtension` (#1537) * Remove tmpnam from tests (#1506) -### Build +#### Build * ACR CMake (#1551) * Add "Antares::action" CMake library, build only if BUILD_UI=ON (#1637) * Fix conflicting library name (#1590) @@ -255,56 +241,56 @@ LTS = long-term support, 2 years of support starting from the initial release da * CMake usage improvements (#1548) * Fix build for Oracle Linux 8 (#1542) -### Misc +#### Misc * Schedule deps compile instead of develop merge (#1530) -# Branch 8.7.x +## Branch 8.7.x -## 8.7.3 (02/2024) -### Bugfix +### 8.7.3 (02/2024) +#### Bugfix * Use OR-Tools v9.8-rte1.0 (performance improvements with OR-Tools + XPRESS) -## 8.7.2 (11/2023) -### Bugfix +### 8.7.2 (11/2023) +#### Bugfix * Named MPS - fix duplicated "ranged" binding constraints (#1569) -## 8.7.1 (11/2023) -### Bugfix +### 8.7.1 (11/2023) +#### Bugfix * Fix output variable PROFIT for thermal clusters (#1767) -## 8.7.0 (08/2023) -### New Features +### 8.7.0 (08/2023) +#### New Features * Binding constraint RHS scenarization (#1219) * Implement --mps-export command-line option (#1404) * Name constraints & variables in MPS files using --named-mps-problems command-lin e option (#1294) * Thermal price definition (contributed by RTE-i, #1272) -### Improvements +#### Improvements * Write full command-line instead of solver location in logs (#1518) -### Packages +#### Packages * Give Oracle Linux 8 assets a proper name instead of "unknown" (#1438) * Don't build tools (study-updater, etc.) by default (#1442) -### Bugfixes +#### Bugfixes * Fix error when writing files over 80Mb into a zip (#1488) * Fix memory leaks (#1468) * Fix segfault, add !skipped to enabled constraints (#1441) * Backport [v8.4.3](#v843-082023) changes -### GUI +#### GUI * Thermal price definition (RTEi's -> CR20) - UI (#1485) -### Docs +#### Docs * Fix possible values for ST storage (#1455) -### Tests +#### Tests * Add named MPS tests (#1408) * Enforce better unit test isolation (#1486) * Add tests for Windows CI when job is scheduled (#1483) * Tests for CR20: thermal price definition (#1364), improvements (#1422) -### For developers +#### For developers * Remove platform-specific headers (#1523) * Remove one `goto` instruction in OPT (#1522) * Remove study singleton in application signal handlers (#1513) @@ -332,61 +318,61 @@ LTS = long-term support, 2 years of support starting from the initial release da * Fix critical code smells (#1412) * Named MPS: factorize variable & constraint namers (#1409) * Array, logs jit and correlation in makefile (#1410) -# Branch 8.6.x (end of support 06/2025) -## v8.6.7 (05/2024) -### Bugfixes +## Branch 8.6.x (end of support 06/2025) +### 8.6.7 (05/2024) +#### Bugfixes * Fix formula use in output var Profit by plant [ANT-1719] (https://github.com/AntaresSimulatorTeam/Antares_Simulator/pull/2097) -## v8.6.6 (03/2024) -### Bugfixes +### 8.6.6 (03/2024) +#### Bugfixes * Adequacy patch CSR - fix DTG MRG (#1982) * Fix ts numbers for no gen clusters (#1969) * Remove unitcount limit for time series generation (#1960) -## 8.6.5 (02/2024) -### Bugfix +### 8.6.5 (02/2024) +#### Bugfix * Use OR-Tools v9.8-rte1.0 (performance improvements with OR-Tools + XPRESS) -# v8.6.4 (11/2023) -## Bugfixes +### 8.6.4 (11/2023) +#### Bugfixes * Fix Oracle Linux minizip build + actually run zip unit tests (#1744) * Fix output variable PROFIT for thermal clusters (#1767) -# v8.6.3 (10/2023) -## Bugfixes +### 8.6.3 (10/2023) +#### Bugfixes * Increase file size limit from 80Mo to 80Go when reading file. Fix issue on Windows -## v8.6.2 (08/2023) -### Bugfixes +### 8.6.2 (08/2023) +#### Bugfixes * Backport [v8.4.3](#v843-082023) changes -## 8.6.1 (06/2023) +### 8.6.1 (06/2023) -------------------- -### Bugfixes +#### Bugfixes * Fix major bug related to short-term storage & MRG. PRICE (#1377) -## 8.6.0 (06/2023) +### 8.6.0 (06/2023) -------------------- -### New features +#### New features * Short-term storage (#1163). * Add pollutant emissions (#1184, #1222) * Minimal generation for hydraulic (#1273, RTE/RTE-i/Redstork) * Make LMR optional for adequacy patch (#1247) -### Improvements +#### Improvements * Use ISO8601 for date format in the logs (#1303) * Publish installers for Oracle Linux 8 (#1341) * Remove doc from UI/package, publish it as a separate PDF (#1233) * Tune XPRESS resolution (#1158), this should improve performance for OR-Tools+XPRESS * Performance metrics (produce a JSON file) (#1306) -### Bugfixes +#### Bugfixes * Fix a bug in adequacy study mode (#1314) * Fix memory errors detected by valgrind (#1302) * Fix empty ROR & STORAGE in output using the TS-Generator (#1293) -### Code quality +#### Code quality * Simplify if/else (#1309) * Max number of columns in an output file (#1159) * Fix a few compilation warnings (int -> uint) (#1301) @@ -399,70 +385,70 @@ LTS = long-term support, 2 years of support starting from the initial release da * INI files load encapsulation (#1057) * Remove group{Min,Max}Count, annuityInvestment in thermal clusters (#1350) -### For developers +#### For developers * Bumped OR-Tools 9.2 -> 9.5. CMake 3.18+ is required for build if building OR-Tools, and XPRESS 9.0 for execution (previously 8.13). -# Branch 8.5.x +## Branch 8.5.x -## v8.5.1 (08/2023) +### 8.5.1 (08/2023) -------------------- -### Changes +#### Changes * Backport [v8.4.3](#v843-082023) changes -## v8.5.0 (02/2022) +### 8.5.0 (02/2022) -------------------- -### New features +#### New features * Curtailment Sharing Rule for Adequacy Patch #1062, including a scaling coefficient in hurdle costs #1155. This feature was contributed by RTE-i with support from RTE, ELIA and APG. -### Bugfix +#### Bugfix * Hydraulic patch #697 * Fix link path error in Kirchhoff constraint builder #1157 -### For developers +#### For developers * Fix build on Ubuntu 22.04 #1160 * Cleaning #1142, 1146, #1149 -### Examples & documentation +#### Examples & documentation * Update docs to include CSR #1156 * Fix examples studies (invalid v8.3.0 -> v8.5.0) #1136 -# Branch 8.4.x +## Branch 8.4.x -## v8.4.3 (08/2023) +### 8.4.3 (08/2023) -------------------- -### Features +#### Features * Increase file size limit from 80Mo to 80Go when reading file. -### Bugfix +#### Bugfix * Fix "unhandled error" with big studies in zip mode. MPS files were too big and hit file size hard limit -## v8.4.2 (01/2022) +### 8.4.2 (01/2022) -------------------- -### Improvements +#### Improvements * Generate a solver-only asset for every release #976, #1080 * Use MPS writer from solvers, instead of copy-pasted functions #1023 -### GUI +#### GUI * Allow more than 100 thermal clusters #1011 * Remove status bar count. The sum was sometimes wrong #1029 * Remove unused "District marginal prices" button from Advanced Parameters #1067 -### Bugfix +#### Bugfix * Fix overwritten MPS files when optimization/simplex-range=day #1041 * Restore warm start for OR-Tools+XPRESS #1079 * Fix output overwrite when using zip output by adding a -2, -3, etc. suffix #1044 * Fix crash when generaldata.ini is empty, using default values #892 -### Testing +#### Testing * Introduce missing MPS comparison tests #1035 -### For developers +#### For developers * Fix empty CMAKE_BUILD_TYPE #1028 * Fix memory leaks #669 -### Code cleaning +#### Code cleaning * Clean up Yuni #1055 * Remove default implementation for hourEnd (see variable.hxx) #1020 * Remove free functions for areas' mem allocation #922 @@ -475,21 +461,21 @@ LTS = long-term support, 2 years of support starting from the initial release da * Pass optimization number as an argument #1040 -### New Contributors +#### New Contributors * @JasonMarechal25 made their first contribution in #1055 **Full Changelog**: https://github.com/AntaresSimulatorTeam/Antares_Simulator/compare/v8.4.1...v8.4.2 -## v8.4.1 (12/2022) +### 8.4.1 (12/2022) -------------------- -### Bugfix +#### Bugfix * Fix formula for profit calculation #1022 -## v8.4.0 (12/2022) +### 8.4.0 (12/2022) -------------------- -### Features +#### Features * Add option & command-line argument to write results into a single zip archive #794 * Add option to set link capacity to null/infinity for physical links only #792 * Speed up simulations by extracting simplex basis in XPRESS/OR-Tools #957 @@ -497,10 +483,10 @@ LTS = long-term support, 2 years of support starting from the initial release da * Do not export BC MARG PRICE variable by default by #928 * Enable MPS write with OR-Tools+Sirius -### GUI +#### GUI * Make sure that RC/beta are displayed in version numbers #739 -### Bugfix +#### Bugfix * Remove error message printed on -h/--help in antares-solver #895 * Use average for BC MARG PRICE (daily & weekly) #940 * Fix crash when exporting MPS with OR-Tools #923 @@ -512,7 +498,7 @@ LTS = long-term support, 2 years of support starting from the initial release da * Make logs more expressive when checking link values by @flomnes in #1005 * Add condition to avoid null pointer by @payetvin in #989 -### For developers +#### For developers * Case insensitive option for build type by @payetvin in #986 * [DEV] Refactored ortools_utils by @payetvin in #978 * [CI] Integrate ortools v9.2-rte2.0 by @payetvin in #1007 @@ -526,37 +512,36 @@ LTS = long-term support, 2 years of support starting from the initial release da * Remove antares-solver swap variant & librairies, reduce build duration #906 -### Documentation +#### Documentation * [DOC] OR-Tools build #880 * Document how to run JSON tests #902 * Document option --list-solvers #770 -### New Contributors +#### New Contributors * @kathvargasr made their first contribution in #967 **Full Changelog**: https://github.com/AntaresSimulatorTeam/Antares_Simulator/compare/v8.3.2..v8.4.0 -# Older branches - -## v8.3.3 (12/2022) +## Older branches +### 8.3.3 (12/2022) -------------------- -### Bugfix +#### Bugfix - Round renewable production (#985) -## v8.3.2 (09/2022) +### 8.3.2 (09/2022) -------------------- -### Output aggregation change +#### Output aggregation change - Daily, weekly, monthtly & annual values for link variable "MARG. COST" (EUR/MWh) was previously obtained by a sum. It now computed by average (#881). -### New features +#### New features - Add new BC marginal price output variable (#801) - Add Antares logo in solver logs (#861) - Add XPRESS-compatible assets for Ubuntu. Windows coming soon. -### GUI +#### GUI - In the "Links" panel, replace "Flat" view by "By area" view (#755) -### Bug fixes +#### Bug fixes - Fix segfault when more than 9 renewable clusters are present in an area (#869) - Fix segfault related to the digest occurring when many thermal clusters are present (#852) - Statistics: use std::mutex / std::atomic<> to prevent concurrent writes (#838) @@ -564,7 +549,7 @@ LTS = long-term support, 2 years of support starting from the initial release da - Fix warning in hydro.ini loading function (#883) - MPS for the 1st optimization were erased by the one related to the 2nd optimization. Fixed (#863). -### For developers +#### For developers - Simplify day ahead reserve condition (#777) - Remove unused "shedding strategy" (#788) - Refactor Layers by adding a LayerData class (#866) @@ -575,28 +560,28 @@ LTS = long-term support, 2 years of support starting from the initial release da - Simplify Parameters::fixRefreshIntervals, clean headers (#832) - Simplify tuneSolverSpecificOptions (#829) -### Documentation +#### Documentation - Input and output format due to addition of BC marginal prices (#836) - Fix e-mail address and website (#834) -## v8.3.1 (08/2022) +### 8.3.1 (08/2022) -------------------- -### New features +#### New features - Add execution-info.ini output file, containing execution durations and study info #740 #803 #816 - OR-Tools: set solver-specific options for XPRESS #796 -### Bug fixes +#### Bug fixes - Fix missing renewable columns in districts (sets of areas) #802 -### GUI +#### GUI - Fix wrong number of cores in the "Run a simulation" window #793 -### For developers +#### For developers - Bump C++11 to C++17 -## v8.3.0 (07/2022) +### 8.3.0 (07/2022) -------------------- -### New features +#### New features - Adequacy patch - share the unsupplied energy according to the "local matching rule". This feature was contributed by RTE-i with support from RTE, ELIA and APG #657 - Add output variable "profit by cluster". This variable represents the difference between proportional costs and marginal costs in the area. It provides a partial answer to the question "what is the economic profit associated to a thermal cluster ?", excluding non-proportional (€/h) and startup costs (€/startup). #686 - Allow +/- infinity in binding constraint RHS, allowing the user to enable BCs only for some timesteps #631(*) @@ -606,7 +591,7 @@ LTS = long-term support, 2 years of support starting from the initial release da (*) May not work with the Sirius solver. Consider using other solvers through OR-Tools -### Bug fixes +#### Bug fixes - Fix segfault occuring when inter/intramodal correlation is enabled and TS width are inconsistent #694 - Fix logging of performed MC years when running jobs in parallel #680 - Fix a crash occuring in studies where an area contains 100+ thermal clusters (#753) @@ -615,38 +600,38 @@ LTS = long-term support, 2 years of support starting from the initial release da - UI For property update for adq-patch mode, allow batch edit (#747) - UI - Fix GUI freeze when using multiple map layers (#721) -### For developers +#### For developers - Display the git commit-id in the logs for debugging & diagnosis purposes #698 - Code cleaning in hydro heuristic #671 - Use antares-deps 2.0.2, which now excludes OR-Tools #684 - Fetch OR-Tools directly, allowing more flexibility on the flavor (XPRESS/Sirius/etc.) #684 - Code cleaning #663 #665 #666 #687 #725 #667 #668 #730 -### Misc. improvements +#### Misc. improvements - Generate 2 assets in CentOS 7 : one that includes XPRESS, one that does not #689 - Upgrade examples 8.1 -> 8.3 (#733) -## v8.2.3 (11/2022) +### 8.2.3 (11/2022) -------------------- -### Bug fixes +#### Bug fixes - Round renewable production (#985) -## v8.2.2 (04/2022) +### 8.2.2 (04/2022) -------------------- -### Bug fixes +#### Bug fixes - Fix solver crash on parsing command-line parameters #624 -### GUI +#### GUI - Fix crash occuring when switching to the links panel #658 -## v8.2.1 (03/2022) +### 8.2.1 (03/2022) -------------------- -### Bug fixes +#### Bug fixes - Fix scenario builder data loss when renaming area #610 - Write 1 in the ts-numbers when series.width == 1 #609 - Add noise to the cost vector in the allocation problems to enforce uniqueness #622 - Linux only : fix segfault occurring when an INI file does not exist #606 -### GUI +#### GUI - Place "Dataset > Resize columns to..." in first position #607 - Allow that all NTC be 0 in one direction #595 - Fix occasional crash when opening the links panel #594 @@ -654,115 +639,115 @@ LTS = long-term support, 2 years of support starting from the initial release da - Linux only : fix impossibility to save a study #600 - Developer version only : fix assertion errors in the GUI #584 -## v8.2.0 (03/2022) +### 8.2.0 (03/2022) -------------------- -### New features +#### New features - Multiple timeseries for link capacities (NTC). It is now possible to establish different scenarios for the capacity of a link. Users can now take partial or total outages for links into account #520 - Infeasible problem analyzer. When the underlying problem has no solution, list the most suspicious constraints in a report. This should help users identify faulty binding constraints #431 - Add a hydro-debug switch that allows the printing of some useful debug data in heuristic mode #254 -### GUI +#### GUI - Add a "view results" button in the dialog that appears when a simulation has been completed #511 - Help menu : add an "online documentation" item #509 - Improve UI for new thermal parameter "tsGenBehavior" #534 - Improve cell styles when loop-flow is enabled for a link #571 -### Bug fixes +#### Bug fixes - Prevent an area from having a link to itself #531 - Fix crash when the study folder does not exist #521 - Fix crash when failing to load a study #502 -### For developers +#### For developers - Remove calls to exit() #505. Provide consistent return values for antares-solver by fixing a segfault related to the log object #522 - Remove calls to setjmp, goto's big brother #527 - Large refactor of antares-solver's main function, hoping to make error management easier to understand #521 - Use std::shared_ptr instead of Yuni::SmartPtr in most cases #529 - Simplify and clean some parts of the code #537, #538, #540 -## v8.1.1 (01/2022) +### 8.1.1 (01/2022) -------------------- -### Bug fixes +#### Bug fixes - Fix segfault occurring randomly when thermal clusters are disabled (#472) - Fix hydro level discontinuities (#491). Very rarely, hydro reservoirs would inexplicably be filled from 0% to 100% in 1h, this violating the modelling constraints. - Execution times when the Sirius solver is used in conjunction with OR-Tools are now similar as with Sirius alone. This is a result of [this fix](https://github.com/AntaresSimulatorTeam/or-tools/pull/1), related to "hot-start". -### GUI +#### GUI - Speed up scrolling (#395) - Warn the user about disabled renewable clusters only when relevant (#386) -### Packages +#### Packages Include antares-analyzer into .zip and .tar.gz archives (#470). This is especially useful if you use the portable version of Antares. -### For developers +#### For developers In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in particular gcc 9. This allows for C++17 features to be used without hassle. -## v8.1.0 (09/2021) +### 8.1.0 (09/2021) -------------------- -### New features +#### New features - Allow up to 9 RES groups (off-shore wind, on-shore wind, rooftop solar, PV solar, etc.) as opposed to wind and solar previously. This allows the user to distinguish between more renewable energy sources. When creating a new study, renewable generation modelling is set to "clusters" by default. This change does not affect opening an existing study. Note that TS generation is not available for these new RES groups. - Add 3 thermal groups, named other, other 2, other 3 and other 4. -### Bug fixes +#### Bug fixes - When a binding constraint is marked as skipped in the GUI, disable it in the solver #366 -### GUI +#### GUI - Keep selection on thermal/renewable cluster when its group changes #360 - Dialogs "Thematic trimming" and "User playlist" are now resizable -### For developers +#### For developers - Add non-regression tests on each release - Fix vcpkg on Github Actions - Add build cache for Github Actions to speed up the build (Linux only) -## v8.0.3 (05/2021) +### 8.0.3 (05/2021) -------------------- -### Bug fixes +#### Bug fixes - Fix calculation of average for variable "congestion probability" - Fix NODU when unit number is not an integer i.e has decimals - GUI: allow decimal nominal capacity for thermal clusters - GUI: Linux: use xdg-open to open pdf files instead of gnome-open -### For developers +#### For developers - Remove code related to licence management - Remove openssl and libcurl dependencies - Remove dead code -## v8.0.2 (04/2021) +### 8.0.2 (04/2021) -------------------- -### Bug fixes +#### Bug fixes - Fix GUI freeze when area color is changed but user don't validate new color - Correction of MC year weight use for PSP and MISC NDG -## v8.0.1 (03/2021) +### 8.0.1 (03/2021) -------------------- -### Features +#### Features - Add "Continue Offline" button at startup if antares metric server is unreachable -### Bug fixes +#### Bug fixes - Error with hydro start when using scenario playlist and stochastic TS refresh span - Files needed for antares-xpansion not exported when using scenario playlist with first year disabled - Correction of crash if user define a stochastic TS refresh span of 0 : minimum value is now 0 - Correction of MC years playlist weight write when sum of weight was equal to number oy years (no MC years playlist export in .ini) -### For developers +#### For developers - Add a GitHub action to check if branch name will launch CI - Add shared dll in windows .zip archive -## v8.0.0 (03/2021) +### 8.0.0 (03/2021) -------------------- -### Features +#### Features - OR-Tools integration : - add command line option in antares-solver to define OR-Tools use and OR-Tools solver (option --use-ortools and --ortools-solver='solver') @@ -796,7 +781,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti After simulation, the MC year have a contribution to averages or standard deviations in synthesis results depending on the weight it was given. -### Bug fixes +#### Bug fixes - Selecting an area and then, from the inspector, trying to select a thermal cluster or a link of this area in the dependencies section causes a crash. The inspector's cluster/link selection was removed. @@ -807,7 +792,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti triggered. If the disabled cluster is given a number for many MC years in the active rule, a single summary warning should be raised, not a warning per year. -### For developers +#### For developers - External dependencies : - use of new repository [antares-deps](https://github.com/AntaresSimulatorTeam/antares-deps) for external dependencies compilation @@ -834,10 +819,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Adding pytest scripts to check reference output values - Add pytest scripts related to unfeasible problems -## v7.2.0 (06/2020) +### 7.2.0 (06/2020) -------------------- -### Features +#### Features - Simulation dashboard: A new "Geographic Trimming" option is now available in the "Configure" menu. This option makes @@ -881,7 +866,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Usage metrics: added reference key for this version -### Bug fixes +#### Bug fixes - GUI of the "Thematic trimming" option: Window size is naturally readjusted to improve readability by upgrading wxwidgets (3.1.3 and above). @@ -890,10 +875,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti command line syntax have been introduced and now make it possible to launch a sequence of simulations to run in parallel -## v7.1.0 (12/2019) +### 7.1.0 (12/2019) -------------------- -### Features +#### Features - Simulation Dashboard: A new option "Thematic Trimming" is available in the "Output Profile" Section. This option @@ -923,7 +908,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Usage metrics: added reference key for this version -### Bug fixes +#### Bug fixes - Output file "mc-all/grid/digest.txt": replaced "NaN" values by zeroes, where appropriate @@ -949,10 +934,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti any data for given Areas or Links, avoid creation of empty folders named after said Areas or Links -## v7.0.1 (04/2019) +### 7.0.1 (04/2019) -------------------- -### Features +#### Features - Time-series analysis: in "detrended mode", extended perimeter to raw data including periods with no meaningful signal @@ -960,10 +945,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Hydro-storage modelling: added ability to optimize pumping along with generation in mode "use heuristic target without leeway" -## v7.0.0 (12/2018) +### 7.0.0 (12/2018) -------------------- -### Features +#### Features - GPL release: updated companion files (README,...) - GPL release: updated project Icons @@ -977,24 +962,24 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Documentation: updated optimization problem formulation - Documentation: updated examples library -## v7.0.0-rc (12/2018) +### 7.0.0-rc (12/2018) -------------------- -### Features +#### Features - Improved code for linux compilation with gcc 7 -### Bugs +#### Bugs - Fixed various issues in GUI - Fixed RHS of constraints generated by the KCG when min and max values of PST settings are strictly equal and constraints are generated for the whole year -## v6.5.1 (11/2018) +### 6.5.1 (11/2018) ---------------- -### Bugs +#### Bugs - Fixed index in hydro heuristic engine - Hydro GUI: added scrollbars for correct display on laptops @@ -1002,10 +987,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Kirchhoff's constraint generator: fixed several GUI issues - Districts GUI: improved syntax control -## v6.5.0 (11/2018) +### 6.5.0 (11/2018) ---------------- -### Features +#### Features - Implementation of Kirchhoff's laws (DC approximation), modeling of phase-shifters and representation of passive @@ -1083,7 +1068,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Example library: upgraded to 6.5 (without extension) -### Bug fixes +#### Bug fixes - Time-series generation: the storage (Input folder) of time-series generated for thermal clusters either in the @@ -1100,10 +1085,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti value (changed to 2 decimal accuracy) -## v6.1.3 (06/2018) +### 6.1.3 (06/2018) ---------------- -### Features +#### Features - Output: added a new file at the root of simulation results, displaying a short summary of the overall system economic @@ -1117,7 +1102,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Expansion mode: presolve stage replaced by hot start -### Bug fixes +#### Bug fixes - Simulation: In the "accurate" Unit Commitment mode, the optimization preference "thermal Clusters Min Up/Down Time" @@ -1131,27 +1116,27 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Example library : upgraded to 6.1 and extended -## v6.1.2 (11/2017) +### 6.1.2 (11/2017) ---------------- -### Features +#### Features - Solver, Simplexe package: Improvement of the Scaling stage (Matrix, right hand side, costs) -## v6.1.1 (11/2017) +### 6.1.1 (11/2017) ---------------- -### Features +#### Features - Solver: Light changes in Presolve stage -## v6.1.0 (09/2017) +### 6.1.0 (09/2017) ---------------- -### Features +#### Features - GUI and simulation: "binding constraints" objects may now involve not only flows on interconnections but also power generated from @@ -1160,10 +1145,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti associated with arbitrary offsets (time-lags expressed in hours). -## v6.0.6 (07/2017) +### 6.0.6 (07/2017) ---------------- -### Features +#### Features - GUI: Binding constraint parameters tables (weights and offsets) are trimmed line-wise so as to fit exactly with the content of the selected working map @@ -1173,10 +1158,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## v6.0.5 (07/2017) +### 6.0.5 (07/2017) ---------------- -### Bug fixes +#### Bug fixes - Solver: Pruning of redundant messages in simulations launched from command line @@ -1188,10 +1173,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti cleaning datasets (detected as of 6.0.0) -## v6.0.4 (06/2017) +### 6.0.4 (06/2017) ---------------- -### Bug fixes +#### Bug fixes - GUI: The "variable per variable" view of the output files allows to display the power generated by each thermal cluster @@ -1200,15 +1185,15 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti unsupplied energy allowances -## v6.0.3 (06/2017) +### 6.0.3 (06/2017) ---------------- -### Features +#### Features - GUI: The number of system maps that could be stored in a given study was limited to 19. This number is now unbounded. -### Bug fixes +#### Bug fixes - GUI: The list of thermal clusters displayed for a given Area in the current map was sometimes wrongly initialized (Area considered @@ -1221,16 +1206,16 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti circumstances -## v6.0.2 (06/2017) +### 6.0.2 (06/2017) ---------------- -### Features +#### Features - Optimization : To help discriminate between equivalent economic solutions, random noises on hydro hourly prices are more regularly spread out (absolute values) in the interval (5 e-4 ,1 e-3)Euros/MWh -### Bug fixes +#### Bug fixes - Simulation : The identification of the Monte-Carlo year numbers in which the smallest/greatest values of random variables are @@ -1238,10 +1223,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti two years ore more. -## v6.0.1 (05/2017) +### 6.0.1 (05/2017) ---------------- -### Features +#### Features - Thermal Time-series generation: Data regarding all thermal clusters are generated and stored in the same way, regardless of their activity @@ -1266,10 +1251,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti listed above -## v6.0.0 (04/2017) +### 6.0.0 (04/2017) ---------------- -### Features +#### Features - GUI: A new interface makes it possible to define several views (maps) of the Power System modelled in an Antares study. These maps are meant to give @@ -1303,10 +1288,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti copy to backup folders, registering of studies and archives in catalogues. -## v5.0.9-SE (04/2017) +### 5.0.9-SE (04/2017) ---------------- -### Bug fixes +#### Bug fixes - Random noises on thermal clusters costs now include the zero-cost "must-run" clusters (as a consequence, noises assumptions do not vary @@ -1316,26 +1301,26 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti minimum number of committed thermal units (+1 or -1 deviation, "accurate" mode only) -## v5.0.7-SE (04/2017) +### 5.0.7-SE (04/2017) ---------------- -### Features +#### Features - License control : management of SSL certificates encrypted through SHA-256 algorithm -## v5.0.7 (12/2016) +### 5.0.7 (12/2016) ---------------- -### Bug fixes +#### Bug fixes - Fixing a packaging error -## v5.0.6 (12/2016) +### 5.0.6 (12/2016) ---------------- -### Bug fixes +#### Bug fixes - Results processing: For full "must-run" thermal clusters, the NODU variable could be wrongly assessed in the "accurate" unit commitment simulation mode @@ -1345,7 +1330,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti the deleted object were kept alive in the scenario builder context) -### Features +#### Features - Unsupplied energy control: if the actual economic optimization requires it, load shedding is now allowed to occur in areas where the available thermal generation @@ -1363,10 +1348,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## v5.0.5 (08/2016) +### 5.0.5 (08/2016) ---------------- -### Bug fixes +#### Bug fixes - No-Load Heat costs and Start-up costs: in the "fast" unit commitment options, the result was slightly below the actual optimal possible cost for some @@ -1378,7 +1363,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti can work properly again (feature inhibited in previous 5.0.x versions) -### Features +#### Features - License control throughout the internet: all combinations of UTF8 characters can now be used within proxy ids and passwords @@ -1388,14 +1373,14 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti is locally expressed as a constraint of the optimization problem (LOLE=0) -## v5.0.4 (05/2016) +### 5.0.4 (05/2016) ---------------- -### Bug fixes +#### Bug fixes - Errors occured on loading the "min gen modulation" time-series of thermal clusters -### Features +#### Features - Better estimate of the number of thermal units dispatched in "fast" unit commitment mode - Nodal Marginal Prices and Marginal yield on interconnections are now available in @@ -1404,33 +1389,33 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti negative values can be used for all classes of constraints (hourly, daily, weekly) -## v5.0.3 (05/2016) +### 5.0.3 (05/2016) ---------------- -### Bug fixes +#### Bug fixes - Crashes occured when the "full must-run status" parameter was set on "true" for thermal clusters -## v5.0.2 (04/2016) +### 5.0.2 (04/2016) ---------------- -### Bug fixes +#### Bug fixes - Removed debug information that should not be displayed in release mode -### Features +#### Features - The optimization criterion used to assess the hydro energies to generate throughout each month incorporates heavier penalization terms for the 12 deviations from the theoretical monthly targets (formerly, only the largest deviation was penalized). -## v5.0.1 (04/2016) +### 5.0.1 (04/2016) ---------------- -### Bug fixes +#### Bug fixes - Adequacy mode: fixed a memory allocation bug that forced the post-simulation output files processing to be interrupted @@ -1439,10 +1424,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti performances in some cases. This problem is now solved. -## v5.0.0 (03/2016) +### 5.0.0 (03/2016) ---------------- -### Bug fixes +#### Bug fixes - GUI, system map: copy /paste of binding constraints could alter the activity status or the names of the duplicated binding constraints in some instances @@ -1471,7 +1456,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Output, File comparison functions: "Max" operator has been added -### Features +#### Features - Optimization: introduction of a new unit-commitment mode based on a MILP approach slower but more accurate than the former one. An option lets the user choose which mode should be used (fast/accurate) @@ -1506,10 +1491,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## v4.5.4 (03/2015) +### 4.5.4 (03/2015) ---------------- -### Bug fixes +#### Bug fixes - License checking: internet proxys for which no login and/or password have been defined can now be used @@ -1517,10 +1502,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Upgrade to 4.5 format of datasets edited in 4.4 format or lower, in which the "scenario builder" feature was activated: the conversion to 4.5 format could fail sometimes. -## v4.5.3 (02/2015) +### 4.5.3 (02/2015) ---------------- -### Features +#### Features - Start-up and fixed thermal costs: the interpretation of the unit-commitment strategy (starting-up and shutting-down times of each thermal unit) includes the explicit @@ -1534,7 +1519,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Control of license validity through the internet (setting up of a dedicated server) -### Bug fixes +#### Bug fixes - Scenario builder: indices not subject to random draws could be mixed up in areas including both "must-run" units and "regular" units (bug circumscribed to the thermal @@ -1543,18 +1528,18 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Spillage management, when numerous binding constraints are active: an excessive leeway could be observed regarding the level of hydro power allowed to be curtailed -## v4.5.2 (06/2014) +### 4.5.2 (06/2014) ---------------- -### Bug fixes +#### Bug fixes - In the previous version, the average values of interconnection-related variables were multiplied by two and this error was propagated to the standard deviation of the same variables -## v4.5.1 (06/2014) +### 4.5.1 (06/2014) ---------------- -### Features +#### Features - Start-up and fixed thermal costs: the contribution of each thermal cluster to the operating cost is now explicitly displayed in the results (field : "non proportional cost") @@ -1562,7 +1547,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Load time-series : negative values are now authorized -### Bug fixes +#### Bug fixes - Creation of a thermal cluster : the default value of the NPOMAX parameter is set to 100 @@ -1573,10 +1558,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti - Copy/paste of nodes : the field "spread on unsupplied energy cost" was not pasted -## v4.5.0 (04/2014) +### 4.5.0 (04/2014) ---------------- -### Features +#### Features - Simplex solver: acceleration regarding the control of the admissibility of the solution in the dual stages. This brings a significant improvement of the calculation time for @@ -1587,7 +1572,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti non-zero system costs ( max = 5 10^4 Euros/MWh ; min = 5 10^-3 Euros/MWh) -### Bug fixes +#### Bug fixes - Hydro Time-series generation : the GUI did not react properly when forbidden values (negative) were seized for energy expectation and/or standard deviation @@ -1597,10 +1582,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti within a week was not fully optimized -## v4.4.1 (05/2013) +### 4.4.1 (05/2013) ---------------- -### Bug fixes +#### Bug fixes - Creation of a new binding constraint: the operation needed to be confirmed twice (double click on "create button") and the study had to be "saved as" and reloaded before @@ -1613,10 +1598,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## v4.4.0 (04/2013) +### 4.4.0 (04/2013) ---------------- -### Features +#### Features - Antares licenses can be either static or floating. Floating tokens are managed and distributed by the Flexnet product, version 11.9. @@ -1647,32 +1632,32 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti is levelled on the other days of the month with a flatter pattern. -### Bug fixes +#### Bug fixes - On creation of a new link, the transmission capacity status parameter is set to `Use transmission capacities` instead of `Set to null`. -## v4.3.7 (02/2013) +### 4.3.7 (02/2013) ---------------- -### Features +#### Features - Performance improvements for graphical display of large tables -### Bug fixes +#### Bug fixes - The binding constraint data might not be written properly in some cases when the constraint was renamed. -## V4.3.6 (12/2012) +### 4.3.6 (12/2012) ---------------- -### Bug fixes +#### Bug fixes - Windows only: fixed potential crash which could happen when exiting a simulation in adequacy mode with import of generated time-series @@ -1681,10 +1666,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti consideration user- and folder-related quotas -## V4.3.5 (10/2012) +### 4.3.5 (10/2012) ---------------- -### Features +#### Features - The calendar field "year" is now available in the simulation main screen (allows not only simulations from JAN to DEC but also from OCT to SEP, etc.) @@ -1702,7 +1687,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti the ultimate choice may differ from that of the previous version -### Bug fixes +#### Bug fixes - Reference numbers of the time-series used in the course of a simulation: When the simulation is based on a user-defined scenario (building mode: custom) @@ -1720,17 +1705,17 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## V4.2.6 (07/2012) +### 4.2.6 (07/2012) ---------------- -### Features +#### Features - The field "MAX MRG" (last of the nodal results) is now available in the output files - The Monte-Carlo synthesis edition can be skipped when year-by-year results are asked for -### Bug fixes +#### Bug fixes - Binding constraints: in the filter available for the weight matrix, removal of redundant options @@ -1752,10 +1737,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## v4.1.0 (06/2012) +### 4.1.0 (06/2012) ---------------- -### Features +#### Features - Hydro storage energy management : each nodal policy of use can be tuned so as to accommodate simultaneously the net load of several nodes @@ -1773,10 +1758,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## v3.8.0 (12/2011) +### 3.8.0 (12/2011) ---------------- -### Features +#### Features - The simulation mode `Adequacy` is renamed `Draft`. @@ -1795,10 +1780,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## V3.7.4 (08/2011) +### 3.7.4 (08/2011) ---------------- -### Features +#### Features - New version of the dual simplex engine (speed is about twice that of 3.6 version) @@ -1823,10 +1808,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## V3.6.4 (04/2011) +### 3.6.4 (04/2011) ---------------- -### Features +#### Features - The "scenario builder" is now available. With this builder it is possible to define precisely the simulation context (for any given year, random numbers drawn for each @@ -1837,10 +1822,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## V3.5.3 (03/2011) +### 3.5.3 (03/2011) ---------------- -### Features +#### Features - Addition of the fuel category "lignite" to the regular options available for the description of thermal plants. @@ -1856,10 +1841,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## V3.4.4 (02/2011) +### 3.4.4 (02/2011) ---------------- -### Features +#### Features - The names of nodes, thermal clusters and binding constraints can be extended to 128 characters. Authorized characters are : `a-z, A-Z,0-9,-,_, space` @@ -1867,10 +1852,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## v3.4.3 (10/2010) +### 3.4.3 (10/2010) ---------------- -### Features +#### Features - Two calculations modes are now available (in the "run" window): @@ -1899,10 +1884,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## v3.3.2 (07/2010) +### 3.3.2 (07/2010) ---------------- -### Features +#### Features - Improvement of the wind power time-series generator (faster calculations) @@ -1926,10 +1911,10 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## v3.1.0 (01/2010) +### 3.1.0 (01/2010) ---------------- -### Features +#### Features - Breakdown of monthly hydro storage energy credits in daily credits: The pilot curve is now the net load (i.e. load - all must-run generation) @@ -1943,7 +1928,7 @@ In the CI workflow, CentOS 7 now uses devtoolset-9 (previously 7), with in parti -## From V1 to V2 (all versions) +### From V1 to V2 (all versions) ---------------------------- - Refer to project development archives (TRAC thread) From 88a3aa78e924668189a527b99601942530d0af0b Mon Sep 17 00:00:00 2001 From: Sylvain Leclerc Date: Thu, 30 May 2024 15:58:35 +0200 Subject: [PATCH 03/18] Feature/vcpkg linux (#2078) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Continuing work on VCPKG for Linux, basically trying to simplify workflows from https://github.com/AntaresSimulatorTeam/Antares_Simulator/pull/2049 and using manifest mode. **Status** - Build OK for all workflows - Caching OK for all workflows **Overall strategy** Merge this in feature branch `feature/vcpkg-dependencies` first. The whole feature branch will be merged only once it brings sufficient added value to existing mechanisms. In particular, when we are able to remove the use of `antares-deps` in favor of using vcpkg would be a good time to do so. Documentation should be updated in `feature/vcpkg-dependencies` when the developer workflow is clear. --------- Signed-off-by: Sylvain Leclerc Co-authored-by: Florian OMNES <26088210+flomnes@users.noreply.github.com> Co-authored-by: Jason Marechal Co-authored-by: Jason Maréchal <45510813+JasonMarechal25@users.noreply.github.com> Co-authored-by: Florian OMNES --- .github/workflows/centos7.yml | 59 +- .github/workflows/oracle8.yml | 52 +- .github/workflows/sonarcloud.yml | 24 + .github/workflows/ubuntu.yml | 57 +- .github/workflows/windows-vcpkg.yml | 583 +++++++++--------- src/CMakeLists.txt | 43 +- src/cmake/wxWidgets/FindwxWidgets.cmake | 1 - src/libs/antares/writer/CMakeLists.txt | 1 - src/packaging/Config.cmake.in | 12 +- .../test_binding_constraints.cpp | 40 +- .../end-to-end/simple_study/simple-study.cpp | 40 +- .../libs/antares/array/tests-matrix-load.cpp | 38 +- .../libs/antares/array/tests-matrix-save.cpp | 38 +- .../benchmarking/test_duration_collector.cpp | 38 +- .../antares/concurrency/test_concurrency.cpp | 41 +- .../area/test-save-area-optimization-ini.cpp | 38 +- .../study/area/test-save-link-properties.cpp | 38 +- .../study/constraint/test_constraint.cpp | 38 +- .../antares/study/constraint/test_group.cpp | 38 +- .../antares/study/output-folder/study.cpp | 38 +- .../study/parameters/parameters-tests.cpp | 38 +- .../study/parts/hydro/test-hydro-series.cpp | 21 + .../parts/hydro/test-hydroreader-class.cpp | 21 + .../test-sc-builder-file-read-line.cpp | 38 +- .../test-sc-builder-file-save.cpp | 38 +- .../antares/study/series/timeseries-tests.cpp | 38 +- .../short-term-storage-input-output.cpp | 38 +- .../src/libs/antares/study/test_study.cpp | 38 +- .../thermal-price-definition.cpp | 38 +- src/tests/src/libs/antares/test_utils.cpp | 38 +- .../src/libs/antares/writer/CMakeLists.txt | 10 +- .../src/libs/antares/writer/test_writer.cpp | 40 +- .../test-unfeasible-problem-analyzer.cpp | 2 - .../solver/optimisation/adequacy_patch.cpp | 38 +- .../test-store-timeseries-number.cpp | 38 +- .../solver/simulation/test-time_series.cpp | 38 +- .../solver/simulation/tests-ts-numbers.cpp | 38 +- src/tests/src/solver/utils/basis_status.cpp | 38 +- src/triplets/x64-linux-antares.cmake | 5 + src/triplets/x64-linux-release.cmake | 7 + src/triplets/x64-windows-antares.cmake | 11 + src/triplets/x64-windows-release.cmake | 15 + src/vcpkg.json | 32 + vcpkg_manifest/vcpkg.json | 8 - 44 files changed, 1048 insertions(+), 875 deletions(-) create mode 100644 src/triplets/x64-linux-antares.cmake create mode 100644 src/triplets/x64-linux-release.cmake create mode 100644 src/triplets/x64-windows-antares.cmake create mode 100644 src/triplets/x64-windows-release.cmake create mode 100644 src/vcpkg.json delete mode 100644 vcpkg_manifest/vcpkg.json diff --git a/.github/workflows/centos7.yml b/.github/workflows/centos7.yml index b43fde4cd1..5f5a34d4b6 100644 --- a/.github/workflows/centos7.yml +++ b/.github/workflows/centos7.yml @@ -46,7 +46,28 @@ jobs: yum install -y centos-release-scl yum install -y devtoolset-10-gcc* - - uses: ./.github/workflows/install-cmake-328 + - name: Install cmake 3.28 + run: pip3 install cmake==3.28.4 + + - name: Install VCPKG + # Note: we need to use environment variables instead of workflow variables + # because github messes up path variables when running in container, + # see https://github.com/actions/runner/issues/2058 + run: | + git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics + echo "VCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg" >> $GITHUB_ENV + echo "VCPKG_CACHE_DIR=$GITHUB_WORKSPACE/vcpkg_cache" >> $GITHUB_ENV + echo "VCPKG_BINARY_SOURCES=clear;files,$GITHUB_WORKSPACE/vcpkg_cache,readwrite" >> $GITHUB_ENV + + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + # Note: we are stuck with v3, because v4 is not compatible with oracle8 image + uses: actions/cache/restore@v3 + with: + path: ${{ env.VCPKG_CACHE_DIR }} + key: vcpkg-cache-centos7-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-centos7- - name: Init submodule run: | @@ -80,20 +101,22 @@ jobs: dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo dnf -y install gh - - name: Configure run: | - source /opt/rh/devtoolset-10/enable - cmake -B _build -S src \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DDEPS_INSTALL_DIR=/rte-antares-deps-Release \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_TESTING=ON \ - -DBUILD_not_system=OFF \ - -DBUILD_TOOLS=ON \ - -DBUILD_UI=OFF \ - -DCMAKE_PREFIX_PATH=${{ env.ORTOOLSDIR }}/install \ + source /opt/rh/devtoolset-10/enable + source /opt/rh/rh-git227/enable + cmake -B _build -S src \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ + -DDEPS_INSTALL_DIR=/rte-antares-deps-Release \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=ON \ + -DBUILD_not_system=OFF \ + -DBUILD_TOOLS=ON \ + -DBUILD_UI=OFF \ + -DCMAKE_PREFIX_PATH=${{ env.ORTOOLSDIR }}/install \ - name: Build run: | @@ -139,5 +162,11 @@ jobs: tag: ${{ github.event.inputs.release_tag }} run: | gh release upload "$tag" _build/*.tar.gz _build/*.rpm - - + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v3 + with: + path: ${{ env.VCPKG_CACHE_DIR }} + key: vcpkg-cache-centos7-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} diff --git a/.github/workflows/oracle8.yml b/.github/workflows/oracle8.yml index 82666b7876..23c5d49d57 100644 --- a/.github/workflows/oracle8.yml +++ b/.github/workflows/oracle8.yml @@ -25,7 +25,6 @@ env: IS_PUSH: ${{ github.event_name == 'push' }} REF: ${{ inputs.target_branch =='' && github.ref_name || inputs.target_branch}} - jobs: build: @@ -50,7 +49,28 @@ jobs: - name: Checkout run: | - git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b ${{ env.REF }} . + git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b ${{ env.REF }} . + git config --global safe.directory '*' + + - name: Install VCPKG + # Note: we need to use environment variables instead of workflow variables + # because github messes up path variables when running in container, + # see https://github.com/actions/runner/issues/2058 + run: | + git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics + echo "VCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg" >> $GITHUB_ENV + echo "VCPKG_CACHE_DIR=$GITHUB_WORKSPACE/vcpkg_cache" >> $GITHUB_ENV + echo "VCPKG_BINARY_SOURCES=clear;files,$GITHUB_WORKSPACE/vcpkg_cache,readwrite" >> $GITHUB_ENV + + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + # Note: we are stuck with v3, because v4 is not compatible with oracle8 image + uses: actions/cache/restore@v3 + with: + path: ${{ env.VCPKG_CACHE_DIR }} + key: vcpkg-cache-oracle8-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-oracle8- - name: Config OR-Tools URL run: | @@ -65,9 +85,7 @@ jobs: rm ortools.zip - name: Init submodule - run: | - git config --global safe.directory '*' - git submodule update --init --remote src/antares-deps src/tests/resources/Antares_Simulator_Tests + run: git submodule update --init --remote src/antares-deps src/tests/resources/Antares_Simulator_Tests - name: Install dependencies run: | @@ -82,13 +100,15 @@ jobs: - name: Configure run: | - source /opt/rh/gcc-toolset-11/enable - cmake -B _build -S src \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_TESTING=OFF \ - -DBUILD_TOOLS=ON \ - -DBUILD_UI=OFF \ - -DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install + source /opt/rh/gcc-toolset-11/enable + cmake -B _build -S src \ + -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=ON \ + -DBUILD_TOOLS=ON \ + -DBUILD_UI=OFF \ + -DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install - name: Build run: | @@ -138,3 +158,11 @@ jobs: tag: ${{ github.event.inputs.release_tag }} run: | gh release upload "$tag" _build/*.tar.gz _build/*.rpm + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v3 + with: + path: ${{ env.VCPKG_CACHE_DIR }} + key: vcpkg-cache-oracle8-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 9c061abe15..cf326c2d72 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -15,12 +15,26 @@ jobs: env: SONAR_SERVER_URL: "https://sonarcloud.io" ORTOOLS_DIR: ${{ github.workspace }}/or-tools + # Caching strategy of VCPKG dependencies + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Install VCPKG + run: git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics + + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-ubuntu- + - name: Config OR-Tools URL run: | echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/$(cat ortools_tag)/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV @@ -81,6 +95,8 @@ jobs: -DCMAKE_C_COMPILER=/usr/bin/gcc-10 \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \ + -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ -DDEPS_INSTALL_DIR=./rte-antares-deps-Debug \ -DCODE_COVERAGE=ON \ -DCMAKE_BUILD_TYPE=Debug \ @@ -109,3 +125,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 0ee8848977..2de211c08c 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -40,6 +40,8 @@ jobs: env: ORTOOLS_DIR: ${{ github.workspace }}/or-tools os: ubuntu-20.04 + # Caching strategy of VCPKG dependencies + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" runs-on: ubuntu-20.04 if: "!contains(github.event.head_commit.message, '[skip ci]')" @@ -49,6 +51,18 @@ jobs: with: ref: ${{ env.REF }} + - name: Install VCPKG + run: git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics + + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-ubuntu- + - name: ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -78,9 +92,9 @@ jobs: - name: Install libraries run: | - sudo apt-get update - sudo apt-get install uuid-dev libwxgtk3.0-gtk3-dev - sudo apt-get install g++-10 gcc-10 + sudo apt-get update + sudo apt-get install uuid-dev libwxgtk3.0-gtk3-dev + sudo apt-get install g++-10 gcc-10 - name: export wxWidgets script shell: bash @@ -135,26 +149,25 @@ jobs: - name: Configure run: | - cmake -B _build -S src \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DVCPKG_ROOT="${{env.VCPKG_ROOT}}" \ - -DVCPKG_TARGET_TRIPLET=${{ env.triplet }} \ - -DCMAKE_C_COMPILER=/usr/bin/gcc-10 \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \ - -DDEPS_INSTALL_DIR=${{github.workspace}}/rte-antares-deps-Release \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_TESTING=ON \ - -DBUILD_not_system=OFF \ - -DBUILD_TOOLS=ON \ - -DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install \ - -DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/bin/python" + cmake -B _build -S src \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_C_COMPILER=/usr/bin/gcc-10 \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \ + -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ + -DDEPS_INSTALL_DIR=${{github.workspace}}/rte-antares-deps-Release \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=ON \ + -DBUILD_not_system=OFF \ + -DBUILD_TOOLS=ON \ + -DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install \ + -DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/bin/python" - name: Build run: | cmake --build _build -j$(nproc) - # simtest - name: Read simtest version id: simtest-version @@ -338,3 +351,11 @@ jobs: tag: ${{ github.event.inputs.release_tag }} run: | gh release upload "$tag" _build/*.tar.gz _build/*.deb + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 04d9f72c53..4eb484b8d0 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -39,307 +39,302 @@ jobs: ORTOOLS_DIR: ${{ github.workspace }}/or-tools os: windows-latest test-platform: windows-2022 - vcpkgPackages: wxwidgets boost-test yaml-cpp antlr4 - triplet: x64-windows + vcpkgPackages: wxwidgets boost-test + triplet: x64-windows-release + # Caching strategy of VCPKG dependencies + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" runs-on: windows-latest steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.REF }} + - uses: actions/checkout@v4 + with: + ref: ${{ env.REF }} - - name: Config OR-Tools URL - run: | + - name: Config OR-Tools URL + run: | echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/$(cat ortools_tag)/ortools_cxx_windows-latest_static_sirius.zip" >> $GITHUB_ENV - shell: bash + shell: bash - - name: Pre-requisites - shell: cmd - run: | + - name: Pre-requisites + shell: cmd + run: | choco install wget unzip zip --no-progress - # Downloads ccache, and copies it to "cl.exe" in order to trick cmake into using it, - # see ccache wiki for background on using it with MSVC: - # https://github.com/ccache/ccache/wiki/MS-Visual-Studio - - name: Install ccache - shell: bash - run: | - wget https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3-windows-x86_64.zip -O ccache.zip - unzip ccache.zip - rm ccache.zip - mv ccache-4.8.3-windows-x86_64 ccache - cp ccache/ccache.exe ccache/cl.exe - echo "${GITHUB_WORKSPACE}/ccache" >> $GITHUB_PATH - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: windows - - - name : Init VCPKG submodule - run: | - git submodule update --init vcpkg - - # Restore both vcpkg and its artifacts from the GitHub cache service. - - name: Restore vcpkg and its artifacts. - uses: actions/cache@v4 - with: - # The first path is the location of vcpkg (it contains the vcpkg executable and data files). - # The other paths starting with '!' are exclusions: they contain temporary files generated during the build of the installed packages. - path: | - ${{ env.VCPKG_ROOT }} - !${{ env.VCPKG_ROOT }}/buildtrees - !${{ env.VCPKG_ROOT }}/packages - !${{ env.VCPKG_ROOT }}/downloads - # The key is composed in a way that it gets properly invalidated: this must happen whenever vcpkg's Git commit id changes, or the list of packages changes. In this case a cache miss must happen and a new entry with a new key with be pushed to GitHub the cache service. - # The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm. - # Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already). - key: | - ${{ hashFiles( 'vcpkg_manifest/vcpkg.json' ) }}-${{ hashFiles( '.git/modules/vcpkg/HEAD' )}}-${{ env.triplet }} - - - name : Install deps with VCPKG - run: | - cd vcpkg - ./bootstrap-vcpkg.sh - vcpkg install ${{env.vcpkgPackages}} --triplet ${{env.triplet}} - rm -rf buildtrees packages downloads - shell: bash - - - name: Read antares-deps version - id: antares-deps-version - uses: notiz-dev/github-action-json-property@release - with: - path: 'antares-deps-version.json' - prop_path: 'antares_deps_version' - - - name: Download pre-compiled librairies - uses: ./.github/workflows/download-extract-precompiled-libraries-zip - with: - antares-deps-version: ${{steps.antares-deps-version.outputs.prop}} - os: ${{env.os}} - ortools-url: ${{env.ORTOOLS_URL}} - ortools-dir: ${{env.ORTOOLS_DIR}} - - - name: Setup Python 3.12 - uses: actions/setup-python@v5 - id: setup-python - with: - architecture: 'x64' - python-version: '3.12' - - - name: Install pip dependencies if necessary - run: pip install -r src/tests/examples/requirements.txt - - - name: Init submodule - run: | - git submodule update --init src/antares-deps - git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests - - - name: Enable git longpaths - run: git config --system core.longpaths true - - - name: Configure - shell: bash - run: | - cmake -B _build -S src \ - -DDEPS_INSTALL_DIR=rte-antares-deps-Release \ - -DCMAKE_PREFIX_PATH="${{ env.ORTOOLS_DIR }}/install" \ - -DVCPKG_ROOT="${{env.VCPKG_ROOT}}" \ - -DVCPKG_TARGET_TRIPLET=${{ env.triplet }} \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_TESTING=ON \ - -DBUILD_TOOLS=ON \ - -DBUILD_not_system=OFF \ - -DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/python.exe" \ - -DCMAKE_VS_GLOBALS="CLToolExe=cl.exe;CLToolPath=${GITHUB_WORKSPACE}/ccache;TrackFileAccess=false;UseMultiToolTask=true;DebugInformationFormat=OldStyle" - - - name: Build - shell: bash - run: | - cmake --build _build --config Release -j$(nproc) - # simtest - - name: Read simtest version - id: simtest-version - uses: notiz-dev/github-action-json-property@release - with: - path: 'simtest.json' - prop_path: 'version' - - - name: Run named mps tests - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-named-mps - os: ${{ env.test-platform }} - variant: "named-mps" - - - name: Run unfeasibility-related tests - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - run: | - cd _build - ctest -C Release --output-on-failure -R "^unfeasible$" - - - name: Run unit and end-to-end tests - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - run: | - cd _build - ctest -C Release --output-on-failure -L "unit|end-to-end" -LE ortools - - - name: Upload build on failure - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: MPS-diff - path: ${{ github.workspace }}/src/tests/mps - - - - name: Run tests for adequacy patch (CSR) - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: adequacy-patch-CSR - os: ${{ env.test-platform }} - - - name: Run tests about infinity on BCs RHS - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v830 - os: ${{ env.test-platform }} - - - name: Run MILP with CBC - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-milp - variant: "milp-cbc" - os: ${{ env.test-platform }} - - - name: Run tests introduced in v860 - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v860 - os: ${{ env.test-platform }} - - - name: Run tests introduced in v870 - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v870 - os: ${{ env.test-platform }} - - - name: Run tests introduced in v910 - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v910 - os: ${{ env.test-platform }} - - - name: Run short-tests - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: short-tests - os: ${{ env.test-platform }} - - - name: Run mps tests - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-mps - os: ${{ env.test-platform }} - - - name: Run parallel tests - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-parallel - os: ${{ env.test-platform }} - variant: "parallel" - - - name: Run medium-tests - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: medium-tests - os: ${{ env.test-platform }} - - - name: Run long-tests-1 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-1 - os: ${{ env.test-platform }} - - - name: Run long-tests-2 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-2 - os: ${{ env.test-platform }} - - - name: Run long-tests-3 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-3 - os: ${{ env.test-platform }} - - - name: Solver archive creation - shell: bash - run: | - cd _build - zip -r antares-solver_windows.zip solver/Release/antares-solver.exe solver/Release/*.dll - - - name: NSIS Installer creation - shell: bash - run: | - rm -rf src/tests/resources/Antares_Simulator_Tests - cd _build - cpack -GNSIS - export NSIS_NAME=$(ls *.exe) - echo "NSIS_NAME=$NSIS_NAME" >> $GITHUB_ENV - - - name: Upload NSIS log on failure - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: NSISError.log - path: _build/_CPack_Packages/win64/NSIS/NSISOutput.log - - - name: .zip creation - run: | - cd _build - cpack -G ZIP - - - name: Installer upload - uses: actions/upload-artifact@v4 - with: - name: installer - path: _build/${{env.NSIS_NAME}} - - - name: Publish assets - if: ${{ env.IS_RELEASE == 'true' }} - env: - GITHUB_TOKEN: ${{ github.token }} - tag: ${{ github.event.inputs.release_tag }} - run: | - gh release upload "$tag" _build/*.zip _build/*.exe - shell: bash + # Downloads ccache, and copies it to "cl.exe" in order to trick cmake into using it, + # see ccache wiki for background on using it with MSVC: + # https://github.com/ccache/ccache/wiki/MS-Visual-Studio + - name: Install ccache + shell: bash + run: | + wget https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3-windows-x86_64.zip -O ccache.zip + unzip ccache.zip + rm ccache.zip + mv ccache-4.8.3-windows-x86_64 ccache + cp ccache/ccache.exe ccache/cl.exe + echo "${GITHUB_WORKSPACE}/ccache" >> $GITHUB_PATH + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: windows + + - name: Install VCPKG + shell: bash + run: | + git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.bat -disableMetrics + + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-windows-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-windows- + + - name: Read antares-deps version + id: antares-deps-version + uses: notiz-dev/github-action-json-property@release + with: + path: 'antares-deps-version.json' + prop_path: 'antares_deps_version' + + - name: Download pre-compiled librairies + uses: ./.github/workflows/download-extract-precompiled-libraries-zip + with: + antares-deps-version: ${{steps.antares-deps-version.outputs.prop}} + os: ${{env.os}} + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} + + - name: Setup Python 3.12 + uses: actions/setup-python@v5 + id: setup-python + with: + architecture: 'x64' + python-version: '3.12' + + - name: Install pip dependencies if necessary + run: pip install -r src/tests/examples/requirements.txt + + - name: Init submodule + run: | + git submodule update --init src/antares-deps + git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests + + - name: Enable git longpaths + run: git config --system core.longpaths true + + - name: Configure + shell: bash + run: | + cmake -B _build -S src \ + -DDEPS_INSTALL_DIR=rte-antares-deps-Release \ + -DCMAKE_PREFIX_PATH="${{ env.ORTOOLS_DIR }}/install" \ + -DVCPKG_ROOT="${{env.VCPKG_ROOT}}" \ + -DVCPKG_TARGET_TRIPLET=${{ env.triplet }} \ + -DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=ON \ + -DBUILD_TOOLS=ON \ + -DBUILD_not_system=OFF \ + -DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/python.exe" \ + -DCMAKE_VS_GLOBALS="CLToolExe=cl.exe;CLToolPath=${GITHUB_WORKSPACE}/ccache;TrackFileAccess=false;UseMultiToolTask=true;DebugInformationFormat=OldStyle" + + - name: Build + shell: bash + run: | + cmake --build _build --config Release -j$(nproc) + # simtest + - name: Read simtest version + id: simtest-version + uses: notiz-dev/github-action-json-property@release + with: + path: 'simtest.json' + prop_path: 'version' + + - name: Run named mps tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-named-mps + os: ${{ env.test-platform }} + variant: "named-mps" + + - name: Run unfeasibility-related tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + run: | + cd _build + ctest -C Release --output-on-failure -R "^unfeasible$" + + - name: Run unit and end-to-end tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + run: | + cd _build + ctest -C Release --output-on-failure -L "unit|end-to-end" -LE ortools + + - name: Upload build on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: MPS-diff + path: ${{ github.workspace }}/src/tests/mps + + - name: Run tests for adequacy patch (CSR) + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: adequacy-patch-CSR + os: ${{ env.test-platform }} + + - name: Run tests about infinity on BCs RHS + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-v830 + os: ${{ env.test-platform }} + + - name: Run MILP with CBC + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-milp + variant: "milp-cbc" + os: ${{ env.test-platform }} + + - name: Run tests introduced in v860 + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-v860 + os: ${{ env.test-platform }} + + - name: Run tests introduced in v870 + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-v870 + os: ${{ env.test-platform }} + + - name: Run tests introduced in v910 + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-v910 + os: ${{ env.test-platform }} + + - name: Run short-tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: short-tests + os: ${{ env.test-platform }} + + - name: Run mps tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-mps + os: ${{ env.test-platform }} + + - name: Run parallel tests + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-parallel + os: ${{ env.test-platform }} + variant: "parallel" + + - name: Run medium-tests + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: medium-tests + os: ${{ env.test-platform }} + + - name: Run long-tests-1 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: long-tests-1 + os: ${{ env.test-platform }} + + - name: Run long-tests-2 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: long-tests-2 + os: ${{ env.test-platform }} + + - name: Run long-tests-3 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: long-tests-3 + os: ${{ env.test-platform }} + + - name: Solver archive creation + shell: bash + run: | + cd _build + zip -r antares-solver_windows.zip solver/Release/antares-solver.exe solver/Release/*.dll + + - name: NSIS Installer creation + shell: bash + run: | + rm -rf src/tests/resources/Antares_Simulator_Tests + cd _build + cpack -GNSIS + export NSIS_NAME=$(ls *.exe) + echo "NSIS_NAME=$NSIS_NAME" >> $GITHUB_ENV + + - name: Upload NSIS log on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: NSISError.log + path: _build/_CPack_Packages/win64/NSIS/NSISOutput.log + + - name: .zip creation + run: | + cd _build + cpack -G ZIP + + - name: Installer upload + uses: actions/upload-artifact@v4 + with: + name: installer + path: _build/${{env.NSIS_NAME}} + + - name: Publish assets + if: ${{ env.IS_RELEASE == 'true' }} + env: + GITHUB_TOKEN: ${{ github.token }} + tag: ${{ github.event.inputs.release_tag }} + run: | + gh release upload "$tag" _build/*.zip _build/*.exe + shell: bash + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-windows-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index adfa646d54..763c40cb96 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -260,10 +260,6 @@ if (NOT sirius_solver_FOUND) message (FATAL_ERROR "Sirius solver not found. Sirius solver can be compiled with -DBUILD_sirius=ON or you can specify previous dependency install directory with -DCMAKE_PREFIX_PATH or -DDEPS_INSTALL_DIR") endif() -#gflags needed for ortools -set(GFLAGS_USE_TARGET_NAMESPACE TRUE) -find_package(gflags) - find_package(ortools) if(NOT ortools_FOUND OR BUILD_ORTOOLS) message(STATUS "OR-Tools tag ${ORTOOLS_TAG}") @@ -290,36 +286,17 @@ message(STATUS "OR-Tools tag ${ORTOOLS_TAG}") FetchContent_MakeAvailable(ortools) endif() -find_package(minizip QUIET) - -if(NOT minizip_FOUND OR BUILD_MINIZIP) - if (NOT minizip_FOUND) - message("minizip not found, downloading") +find_package(minizip-ng) +if (minizip-ng_FOUND) + add_library(MINIZIP::minizip ALIAS MINIZIP::minizip-ng) +else () + find_package(minizip) + if (minizip_FOUND) + message (STATUS "Found minizip (not minizip-ng).") + else () + message (FATAL_ERROR "Minizip not found.") endif () - if (BUILD_MINIZIP) - message("BUILD_MINIZIP set, downloading") - endif () - # Repository + tag - set(MZ_REPOSITORY "https://github.com/zlib-ng/minizip-ng.git") - set(MZ_TAG "4.0.1") - # CMake flags - set(MZ_LZMA "OFF" CACHE INTERNAL "") - set(MZ_ZSTD "OFF" CACHE INTERNAL "") - set(MZ_BZIP2 "OFF" CACHE INTERNAL "") - set(MZ_PKCRYPT "OFF" CACHE INTERNAL "") - set(MZ_WZAES "OFF" CACHE INTERNAL "") - set(MZ_OPENSSL "OFF" CACHE INTERNAL "") - set(MZ_ICONV "OFF" CACHE INTERNAL "") - - FetchContent_Declare(minizip - GIT_REPOSITORY ${MZ_REPOSITORY} - GIT_TAG ${MZ_TAG} - OVERRIDE_FIND_PACKAGE - ) - - FetchContent_MakeAvailable(minizip) -endif() -find_package(minizip REQUIRED) +endif () #wxWidget not needed for all library find is done in ui CMakeLists.txt diff --git a/src/cmake/wxWidgets/FindwxWidgets.cmake b/src/cmake/wxWidgets/FindwxWidgets.cmake index dea003dce6..c174be3ed7 100644 --- a/src/cmake/wxWidgets/FindwxWidgets.cmake +++ b/src/cmake/wxWidgets/FindwxWidgets.cmake @@ -820,7 +820,6 @@ else() find_program(wxWidgets_CONFIG_EXECUTABLE NAMES $ENV{WX_CONFIG} wx-config wx-config-3.1 wx-config-3.0 wx-config-2.9 wx-config-2.8 DOC "Location of wxWidgets library configuration provider binary (wx-config)." - ONLY_CMAKE_FIND_ROOT_PATH ) if(wxWidgets_CONFIG_EXECUTABLE) diff --git a/src/libs/antares/writer/CMakeLists.txt b/src/libs/antares/writer/CMakeLists.txt index 21ddd81ba4..9795f6ace4 100644 --- a/src/libs/antares/writer/CMakeLists.txt +++ b/src/libs/antares/writer/CMakeLists.txt @@ -1,5 +1,4 @@ project(result-writer) -find_package(minizip) add_library(result_writer # Helper class diff --git a/src/packaging/Config.cmake.in b/src/packaging/Config.cmake.in index be7a1a62fa..2cbf63a275 100644 --- a/src/packaging/Config.cmake.in +++ b/src/packaging/Config.cmake.in @@ -1,8 +1,16 @@ @PACKAGE_INIT@ include(CMakeFindDependencyMacro) -find_dependency(ortools) -find_dependency(minizip) +find_dependency(ortools REQUIRED) +find_dependency(minizip-ng) +if (minizip-ng_FOUND) + add_library(MINIZIP::minizip ALIAS MINIZIP::minizip-ng) +else () + find_dependency(minizip) + if (NOT minizip_FOUND) + message (FATAL_ERROR "Minizip dependency (minizip or minizip-ng) not found.") + endif () +endif () include("${CMAKE_CURRENT_LIST_DIR}/AntaresTargets.cmake") diff --git a/src/tests/end-to-end/binding_constraints/test_binding_constraints.cpp b/src/tests/end-to-end/binding_constraints/test_binding_constraints.cpp index a40157091a..c1b875378f 100644 --- a/src/tests/end-to-end/binding_constraints/test_binding_constraints.cpp +++ b/src/tests/end-to-end/binding_constraints/test_binding_constraints.cpp @@ -1,25 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ -#include // Fix for Boost < 1.67 - + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test - end - to - end tests_binding_constraints #define WIN32_LEAN_AND_MEAN #include diff --git a/src/tests/end-to-end/simple_study/simple-study.cpp b/src/tests/end-to-end/simple_study/simple-study.cpp index 5c9181ddbf..e5813befd8 100644 --- a/src/tests/end-to-end/simple_study/simple-study.cpp +++ b/src/tests/end-to-end/simple_study/simple-study.cpp @@ -1,25 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ -#include // Fix for Boost < 1.67 - + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test - end - to - end tests #include #include diff --git a/src/tests/src/libs/antares/array/tests-matrix-load.cpp b/src/tests/src/libs/antares/array/tests-matrix-load.cpp index 1dfecf1517..2c427890eb 100644 --- a/src/tests/src/libs/antares/array/tests-matrix-load.cpp +++ b/src/tests/src/libs/antares/array/tests-matrix-load.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test - lib - antares - matrix tests #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/array/tests-matrix-save.cpp b/src/tests/src/libs/antares/array/tests-matrix-save.cpp index 13560a047e..d1af11d387 100644 --- a/src/tests/src/libs/antares/array/tests-matrix-save.cpp +++ b/src/tests/src/libs/antares/array/tests-matrix-save.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test - lib - antares - matrix tests #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/benchmarking/test_duration_collector.cpp b/src/tests/src/libs/antares/benchmarking/test_duration_collector.cpp index d213dc64d5..4fc74bcda9 100644 --- a/src/tests/src/libs/antares/benchmarking/test_duration_collector.cpp +++ b/src/tests/src/libs/antares/benchmarking/test_duration_collector.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test - benchmarking #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/concurrency/test_concurrency.cpp b/src/tests/src/libs/antares/concurrency/test_concurrency.cpp index 26923159c7..c1188c7a9d 100644 --- a/src/tests/src/libs/antares/concurrency/test_concurrency.cpp +++ b/src/tests/src/libs/antares/concurrency/test_concurrency.cpp @@ -1,27 +1,24 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ -#include // Fix for Boost < 1.67 - + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test - concurrency tests - #include #include diff --git a/src/tests/src/libs/antares/study/area/test-save-area-optimization-ini.cpp b/src/tests/src/libs/antares/study/area/test-save-area-optimization-ini.cpp index 40fcb4b5fd..77672b88c2 100644 --- a/src/tests/src/libs/antares/study/area/test-save-area-optimization-ini.cpp +++ b/src/tests/src/libs/antares/study/area/test-save-area-optimization-ini.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test save area optimization.ini #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/study/area/test-save-link-properties.cpp b/src/tests/src/libs/antares/study/area/test-save-link-properties.cpp index af30689f4b..305241cd3e 100644 --- a/src/tests/src/libs/antares/study/area/test-save-link-properties.cpp +++ b/src/tests/src/libs/antares/study/area/test-save-link-properties.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test save link properties.ini #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/study/constraint/test_constraint.cpp b/src/tests/src/libs/antares/study/constraint/test_constraint.cpp index 25322ae361..e6e5cd54c3 100644 --- a/src/tests/src/libs/antares/study/constraint/test_constraint.cpp +++ b/src/tests/src/libs/antares/study/constraint/test_constraint.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ // // Created by marechaljas on 13/03/23. // diff --git a/src/tests/src/libs/antares/study/constraint/test_group.cpp b/src/tests/src/libs/antares/study/constraint/test_group.cpp index 3e87707fe2..21f5c7377a 100644 --- a/src/tests/src/libs/antares/study/constraint/test_group.cpp +++ b/src/tests/src/libs/antares/study/constraint/test_group.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ // // Created by marechaljas on 28/06/23. // diff --git a/src/tests/src/libs/antares/study/output-folder/study.cpp b/src/tests/src/libs/antares/study/output-folder/study.cpp index eba613c781..1675ae7909 100644 --- a/src/tests/src/libs/antares/study/output-folder/study.cpp +++ b/src/tests/src/libs/antares/study/output-folder/study.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE output folder #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/study/parameters/parameters-tests.cpp b/src/tests/src/libs/antares/study/parameters/parameters-tests.cpp index 3dde6f5784..f690649668 100644 --- a/src/tests/src/libs/antares/study/parameters/parameters-tests.cpp +++ b/src/tests/src/libs/antares/study/parameters/parameters-tests.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE "test parameters" #include diff --git a/src/tests/src/libs/antares/study/parts/hydro/test-hydro-series.cpp b/src/tests/src/libs/antares/study/parts/hydro/test-hydro-series.cpp index 9e28c98df0..d534ca7d53 100644 --- a/src/tests/src/libs/antares/study/parts/hydro/test-hydro-series.cpp +++ b/src/tests/src/libs/antares/study/parts/hydro/test-hydro-series.cpp @@ -1,3 +1,24 @@ +/* + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ + #define BOOST_TEST_MODULE test hydro series #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/study/parts/hydro/test-hydroreader-class.cpp b/src/tests/src/libs/antares/study/parts/hydro/test-hydroreader-class.cpp index a933b5a3c0..cf519c3cb7 100644 --- a/src/tests/src/libs/antares/study/parts/hydro/test-hydroreader-class.cpp +++ b/src/tests/src/libs/antares/study/parts/hydro/test-hydroreader-class.cpp @@ -1,3 +1,24 @@ +/* + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ + #define BOOST_TEST_MODULE test hydro reader #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/study/scenario-builder/test-sc-builder-file-read-line.cpp b/src/tests/src/libs/antares/study/scenario-builder/test-sc-builder-file-read-line.cpp index 003a24b22a..36346b2014 100644 --- a/src/tests/src/libs/antares/study/scenario-builder/test-sc-builder-file-read-line.cpp +++ b/src/tests/src/libs/antares/study/scenario-builder/test-sc-builder-file-read-line.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test read scenario - builder.dat #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/study/scenario-builder/test-sc-builder-file-save.cpp b/src/tests/src/libs/antares/study/scenario-builder/test-sc-builder-file-save.cpp index b0fd157f03..e1b0666b7d 100644 --- a/src/tests/src/libs/antares/study/scenario-builder/test-sc-builder-file-save.cpp +++ b/src/tests/src/libs/antares/study/scenario-builder/test-sc-builder-file-save.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test save scenario - builder.dat #include #include diff --git a/src/tests/src/libs/antares/study/series/timeseries-tests.cpp b/src/tests/src/libs/antares/study/series/timeseries-tests.cpp index 4e49aea134..4908d10601 100644 --- a/src/tests/src/libs/antares/study/series/timeseries-tests.cpp +++ b/src/tests/src/libs/antares/study/series/timeseries-tests.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE "test time series" #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/study/short-term-storage-input/short-term-storage-input-output.cpp b/src/tests/src/libs/antares/study/short-term-storage-input/short-term-storage-input-output.cpp index fed4f02570..83965049e6 100644 --- a/src/tests/src/libs/antares/study/short-term-storage-input/short-term-storage-input-output.cpp +++ b/src/tests/src/libs/antares/study/short-term-storage-input/short-term-storage-input-output.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE "test short term storage" #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/study/test_study.cpp b/src/tests/src/libs/antares/study/test_study.cpp index 77c30ed914..104b304c0e 100644 --- a/src/tests/src/libs/antares/study/test_study.cpp +++ b/src/tests/src/libs/antares/study/test_study.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE study #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp index e2473fc986..cfef5909e5 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp +++ b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE "test thermal price definition" #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/libs/antares/test_utils.cpp b/src/tests/src/libs/antares/test_utils.cpp index 9e101e34a3..ad7e97d833 100644 --- a/src/tests/src/libs/antares/test_utils.cpp +++ b/src/tests/src/libs/antares/test_utils.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test utils #include diff --git a/src/tests/src/libs/antares/writer/CMakeLists.txt b/src/tests/src/libs/antares/writer/CMakeLists.txt index 6487355a81..b85bcce05c 100644 --- a/src/tests/src/libs/antares/writer/CMakeLists.txt +++ b/src/tests/src/libs/antares/writer/CMakeLists.txt @@ -2,11 +2,11 @@ add_executable(test-writer test_writer.cpp) target_link_libraries(test-writer - PRIVATE - Boost::unit_test_framework - Antares::result_writer - test_utils_unit - MINIZIP::minizip + PRIVATE + Boost::unit_test_framework + Antares::result_writer + test_utils_unit + MINIZIP::minizip ) set_target_properties(test-writer PROPERTIES FOLDER Unit-tests/test-writer) diff --git a/src/tests/src/libs/antares/writer/test_writer.cpp b/src/tests/src/libs/antares/writer/test_writer.cpp index 3a87905607..e3af61cc44 100644 --- a/src/tests/src/libs/antares/writer/test_writer.cpp +++ b/src/tests/src/libs/antares/writer/test_writer.cpp @@ -1,25 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ -#include // Fix for Boost < 1.67 - + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test - writer tests #include #include diff --git a/src/tests/src/solver/infeasible-problem-analysis/test-unfeasible-problem-analyzer.cpp b/src/tests/src/solver/infeasible-problem-analysis/test-unfeasible-problem-analyzer.cpp index 8d56ec12f2..d333f5104c 100644 --- a/src/tests/src/solver/infeasible-problem-analysis/test-unfeasible-problem-analyzer.cpp +++ b/src/tests/src/solver/infeasible-problem-analysis/test-unfeasible-problem-analyzer.cpp @@ -18,8 +18,6 @@ * You should have received a copy of the Mozilla Public Licence 2.0 * along with Antares_Simulator. If not, see . */ -#include // Fix for Boost < 1.67 - #define WIN32_LEAN_AND_MEAN #define BOOST_TEST_MODULE unfeasible_problem_analyzer diff --git a/src/tests/src/solver/optimisation/adequacy_patch.cpp b/src/tests/src/solver/optimisation/adequacy_patch.cpp index 6234cc1c65..377969fd5d 100644 --- a/src/tests/src/solver/optimisation/adequacy_patch.cpp +++ b/src/tests/src/solver/optimisation/adequacy_patch.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test adequacy patch functions #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/solver/simulation/test-store-timeseries-number.cpp b/src/tests/src/solver/simulation/test-store-timeseries-number.cpp index 1524b26627..16cbb59fc2 100644 --- a/src/tests/src/solver/simulation/test-store-timeseries-number.cpp +++ b/src/tests/src/solver/simulation/test-store-timeseries-number.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ // // Created by marechaljas on 15/03/23. // diff --git a/src/tests/src/solver/simulation/test-time_series.cpp b/src/tests/src/solver/simulation/test-time_series.cpp index 5c9fdfa942..42f1fbddf4 100644 --- a/src/tests/src/solver/simulation/test-time_series.cpp +++ b/src/tests/src/solver/simulation/test-time_series.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ // // Created by marechaljas on 07/04/23. // diff --git a/src/tests/src/solver/simulation/tests-ts-numbers.cpp b/src/tests/src/solver/simulation/tests-ts-numbers.cpp index a6ecf820c1..e82d432121 100644 --- a/src/tests/src/solver/simulation/tests-ts-numbers.cpp +++ b/src/tests/src/solver/simulation/tests-ts-numbers.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test solver simulation things #define WIN32_LEAN_AND_MEAN diff --git a/src/tests/src/solver/utils/basis_status.cpp b/src/tests/src/solver/utils/basis_status.cpp index b4994b28dc..292dc56c3c 100644 --- a/src/tests/src/solver/utils/basis_status.cpp +++ b/src/tests/src/solver/utils/basis_status.cpp @@ -1,23 +1,23 @@ /* -** Copyright 2007-2024, RTE (https://www.rte-france.com) -** See AUTHORS.txt -** SPDX-License-Identifier: MPL-2.0 -** This file is part of Antares-Simulator, -** Adequacy and Performance assessment for interconnected energy networks. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the Mozilla Public Licence 2.0 as published by -** the Mozilla Foundation, either version 2 of the License, or -** (at your option) any later version. -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** Mozilla Public Licence 2.0 for more details. -** -** You should have received a copy of the Mozilla Public Licence 2.0 -** along with Antares_Simulator. If not, see . -*/ + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ #define BOOST_TEST_MODULE test adequacy patch functions #define WIN32_LEAN_AND_MEAN diff --git a/src/triplets/x64-linux-antares.cmake b/src/triplets/x64-linux-antares.cmake new file mode 100644 index 0000000000..63954c80c5 --- /dev/null +++ b/src/triplets/x64-linux-antares.cmake @@ -0,0 +1,5 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CMAKE_SYSTEM_NAME Linux) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + diff --git a/src/triplets/x64-linux-release.cmake b/src/triplets/x64-linux-release.cmake new file mode 100644 index 0000000000..d9eb98ddae --- /dev/null +++ b/src/triplets/x64-linux-release.cmake @@ -0,0 +1,7 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CMAKE_SYSTEM_NAME Linux) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +# Avoid building debug artifacts +set(VCPKG_BUILD_TYPE release) diff --git a/src/triplets/x64-windows-antares.cmake b/src/triplets/x64-windows-antares.cmake new file mode 100644 index 0000000000..f2480f7012 --- /dev/null +++ b/src/triplets/x64-windows-antares.cmake @@ -0,0 +1,11 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + +# Link zlib and minizip statically +list(APPEND STATIC_PORTS "zlib.*" "minizip.*") +foreach (STATIC_PORT IN LISTS STATIC_PORTS) + if(PORT MATCHES ${STATIC_PORT}) + set(VCPKG_LIBRARY_LINKAGE static) + endif() +endforeach () diff --git a/src/triplets/x64-windows-release.cmake b/src/triplets/x64-windows-release.cmake new file mode 100644 index 0000000000..7e4eb27f4d --- /dev/null +++ b/src/triplets/x64-windows-release.cmake @@ -0,0 +1,15 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) + +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + +# Avoid building debug artifacts +set(VCPKG_BUILD_TYPE release) + +# Link zlib and minizip statically +list(APPEND STATIC_PORTS "zlib.*" "minizip.*") +foreach (STATIC_PORT IN LISTS STATIC_PORTS) + if(PORT MATCHES ${STATIC_PORT}) + set(VCPKG_LIBRARY_LINKAGE static) + endif() +endforeach () diff --git a/src/vcpkg.json b/src/vcpkg.json new file mode 100644 index 0000000000..f15f208a42 --- /dev/null +++ b/src/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "antares-simulator", + "version-string": "9.1.0", + "builtin-baseline": "9484a57dd560b89f0a583be08af6753611c57fd5", + "vcpkg-configuration": { + "overlay-triplets": [ + "./triplets" + ] + }, + "dependencies": [ + { + "name": "wxwidgets", + "platform": "windows" + }, + { + "name": "boost-test", + "version>=": "1.81.0" + }, + { + "name": "boost-algorithm", + "version>=": "1.81.0" + }, + { + "name": "minizip-ng", + "default-features": false, + "version>=": "4.0.0", + "features": [ + "zlib" + ] + } + ] +} diff --git a/vcpkg_manifest/vcpkg.json b/vcpkg_manifest/vcpkg.json deleted file mode 100644 index 15837160b1..0000000000 --- a/vcpkg_manifest/vcpkg.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "antares-simulator", - "version-string": "8.5.0", - "dependencies": [ - "wxwidgets", - "boost-test" - ] -} \ No newline at end of file From 69cf48652880dd097ec4f63aef8c73577390911d Mon Sep 17 00:00:00 2001 From: abdoulbari zaher <32519851+a-zakir@users.noreply.github.com> Date: Fri, 31 May 2024 09:17:32 +0200 Subject: [PATCH 04/18] Fix PDF generation for useguide (#2134) --- docs/user-guide/03-getting_started.md | 4 ++-- docs/user-guide/04-migration-guides.md | 2 +- docs/user-guide/other-features/analyzer.md | 9 ++++--- docs/user-guide/other-features/batchrun.md | 4 ++-- docs/user-guide/other-features/config.md | 2 -- .../kirchhoff-constraints-builder.md | 2 -- .../other-features/study-cleaner.md | 3 +-- .../user-guide/other-features/study-finder.md | 2 -- .../other-features/study-updater.md | 2 -- .../user-guide/other-features/ui-simulator.md | 2 -- docs/user-guide/other-features/vacuum.md | 2 -- .../other-features/ybyaggregator.md | 2 -- docs/user-guide/solver/00-index.md | 2 +- .../{01-overview.md => 01-overview-solver.md} | 0 docs/user-guide/solver/02-inputs.md | 2 +- docs/user-guide/solver/04-parameters.md | 10 ++++---- .../user-guide/solver/07-thermal-heuristic.md | 24 +++++++++---------- docs/user-guide/ts-generator/00-index.md | 2 +- ...overview.md => 01-overview-tsgenerator.md} | 0 docs/user-guide/ts-generator/04-parameters.md | 2 +- 20 files changed, 33 insertions(+), 45 deletions(-) rename docs/user-guide/solver/{01-overview.md => 01-overview-solver.md} (100%) rename docs/user-guide/ts-generator/{01-overview.md => 01-overview-tsgenerator.md} (100%) diff --git a/docs/user-guide/03-getting_started.md b/docs/user-guide/03-getting_started.md index 6ceab3315b..ba4ca923a8 100644 --- a/docs/user-guide/03-getting_started.md +++ b/docs/user-guide/03-getting_started.md @@ -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).* diff --git a/docs/user-guide/04-migration-guides.md b/docs/user-guide/04-migration-guides.md index 2fda042306..354dfa692f 100644 --- a/docs/user-guide/04-migration-guides.md +++ b/docs/user-guide/04-migration-guides.md @@ -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") diff --git a/docs/user-guide/other-features/analyzer.md b/docs/user-guide/other-features/analyzer.md index 877b423332..89f79928c7 100644 --- a/docs/user-guide/other-features/analyzer.md +++ b/docs/user-guide/other-features/analyzer.md @@ -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) \ No newline at end of file + + diff --git a/docs/user-guide/other-features/batchrun.md b/docs/user-guide/other-features/batchrun.md index eb6c4ead58..97e973501c 100644 --- a/docs/user-guide/other-features/batchrun.md +++ b/docs/user-guide/other-features/batchrun.md @@ -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) diff --git a/docs/user-guide/other-features/config.md b/docs/user-guide/other-features/config.md index b9acd22cca..6d06b1bea4 100644 --- a/docs/user-guide/other-features/config.md +++ b/docs/user-guide/other-features/config.md @@ -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) diff --git a/docs/user-guide/other-features/kirchhoff-constraints-builder.md b/docs/user-guide/other-features/kirchhoff-constraints-builder.md index e0c11c66b8..5aecd43e30 100644 --- a/docs/user-guide/other-features/kirchhoff-constraints-builder.md +++ b/docs/user-guide/other-features/kirchhoff-constraints-builder.md @@ -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) diff --git a/docs/user-guide/other-features/study-cleaner.md b/docs/user-guide/other-features/study-cleaner.md index ad2049afc6..ff67c59f24 100644 --- a/docs/user-guide/other-features/study-cleaner.md +++ b/docs/user-guide/other-features/study-cleaner.md @@ -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) diff --git a/docs/user-guide/other-features/study-finder.md b/docs/user-guide/other-features/study-finder.md index d7e21a09f8..d681ff07a1 100644 --- a/docs/user-guide/other-features/study-finder.md +++ b/docs/user-guide/other-features/study-finder.md @@ -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) diff --git a/docs/user-guide/other-features/study-updater.md b/docs/user-guide/other-features/study-updater.md index 0f6bafd87b..70b51873c3 100644 --- a/docs/user-guide/other-features/study-updater.md +++ b/docs/user-guide/other-features/study-updater.md @@ -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) diff --git a/docs/user-guide/other-features/ui-simulator.md b/docs/user-guide/other-features/ui-simulator.md index f79bab5c42..2987c7f095 100644 --- a/docs/user-guide/other-features/ui-simulator.md +++ b/docs/user-guide/other-features/ui-simulator.md @@ -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) diff --git a/docs/user-guide/other-features/vacuum.md b/docs/user-guide/other-features/vacuum.md index 42af2f9f25..25db8dacb4 100644 --- a/docs/user-guide/other-features/vacuum.md +++ b/docs/user-guide/other-features/vacuum.md @@ -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) diff --git a/docs/user-guide/other-features/ybyaggregator.md b/docs/user-guide/other-features/ybyaggregator.md index 0ca3630116..aa885301d5 100644 --- a/docs/user-guide/other-features/ybyaggregator.md +++ b/docs/user-guide/other-features/ybyaggregator.md @@ -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) diff --git a/docs/user-guide/solver/00-index.md b/docs/user-guide/solver/00-index.md index d9a519183b..4ef21bd614 100644 --- a/docs/user-guide/solver/00-index.md +++ b/docs/user-guide/solver/00-index.md @@ -4,7 +4,7 @@ ```{toctree} :hidden: -01-overview.md +01-overview-solver.md 02-inputs.md 03-outputs.md 04-parameters.md diff --git a/docs/user-guide/solver/01-overview.md b/docs/user-guide/solver/01-overview-solver.md similarity index 100% rename from docs/user-guide/solver/01-overview.md rename to docs/user-guide/solver/01-overview-solver.md diff --git a/docs/user-guide/solver/02-inputs.md b/docs/user-guide/solver/02-inputs.md index cf3768b7d2..287be4b797 100644 --- a/docs/user-guide/solver/02-inputs.md +++ b/docs/user-guide/solver/02-inputs.md @@ -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 diff --git a/docs/user-guide/solver/04-parameters.md b/docs/user-guide/solver/04-parameters.md index 7c0515c420..efe0e44ad4 100644 --- a/docs/user-guide/solver/04-parameters.md +++ b/docs/user-guide/solver/04-parameters.md @@ -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) @@ -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) @@ -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 @@ -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 @@ -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` diff --git a/docs/user-guide/solver/07-thermal-heuristic.md b/docs/user-guide/solver/07-thermal-heuristic.md index 67670a36ca..372ceb8bed 100644 --- a/docs/user-guide/solver/07-thermal-heuristic.md +++ b/docs/user-guide/solver/07-thermal-heuristic.md @@ -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 }

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.

#### 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) @@ -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). diff --git a/docs/user-guide/ts-generator/00-index.md b/docs/user-guide/ts-generator/00-index.md index 264054542c..d4ead75883 100644 --- a/docs/user-guide/ts-generator/00-index.md +++ b/docs/user-guide/ts-generator/00-index.md @@ -3,7 +3,7 @@ ```{toctree} :hidden: -01-overview.md +01-overview-tsgenerator.md 02-inputs.md 03-outputs.md 04-parameters.md diff --git a/docs/user-guide/ts-generator/01-overview.md b/docs/user-guide/ts-generator/01-overview-tsgenerator.md similarity index 100% rename from docs/user-guide/ts-generator/01-overview.md rename to docs/user-guide/ts-generator/01-overview-tsgenerator.md diff --git a/docs/user-guide/ts-generator/04-parameters.md b/docs/user-guide/ts-generator/04-parameters.md index 2fac490989..debe1465cc 100644 --- a/docs/user-guide/ts-generator/04-parameters.md +++ b/docs/user-guide/ts-generator/04-parameters.md @@ -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`) From 4d7e767172498dc3b89c8548581b27e1ad3c2c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Fri, 31 May 2024 10:58:51 +0200 Subject: [PATCH 05/18] Remove multiple definitions for Antares::Statistics::HasWrittenToDisk (#2136) --- src/tests/src/libs/antares/array/fill-matrix.h | 10 ---------- src/tests/src/libs/antares/array/matrix-bypass-load.h | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/src/tests/src/libs/antares/array/fill-matrix.h b/src/tests/src/libs/antares/array/fill-matrix.h index 167e943715..29681740e3 100644 --- a/src/tests/src/libs/antares/array/fill-matrix.h +++ b/src/tests/src/libs/antares/array/fill-matrix.h @@ -31,16 +31,6 @@ using namespace std; using namespace Antares; -namespace Antares -{ -namespace Statistics -{ -void HasWrittenToDisk(uint64_t /* size */) -{ -} -} // namespace Statistics -} // namespace Antares - template class Matrix_easy_to_fill: public Matrix { diff --git a/src/tests/src/libs/antares/array/matrix-bypass-load.h b/src/tests/src/libs/antares/array/matrix-bypass-load.h index 387dcfdc8a..c981a8d199 100644 --- a/src/tests/src/libs/antares/array/matrix-bypass-load.h +++ b/src/tests/src/libs/antares/array/matrix-bypass-load.h @@ -41,16 +41,6 @@ struct PredicateIdentity } // namespace UnitTests } // namespace Antares -namespace Antares -{ -namespace Statistics -{ -void HasReadFromDisk(uint64_t /* size */) -{ -} -} // namespace Statistics -} // namespace Antares - template class Matrix_load_bypass: public Matrix_easy_to_fill { From 8d9c79581bbfd9d6aca3b1fcca7b05dc8ebea0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Fri, 31 May 2024 11:35:31 +0200 Subject: [PATCH 06/18] Fix version metadata in SonarQ & docs (v9.1) (#2135) --- docs/pdf-doc-generation-with-sphinx/source/conf.py | 4 ++-- sonar-project.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/pdf-doc-generation-with-sphinx/source/conf.py b/docs/pdf-doc-generation-with-sphinx/source/conf.py index 9c84a4fc3b..9226aefac1 100644 --- a/docs/pdf-doc-generation-with-sphinx/source/conf.py +++ b/docs/pdf-doc-generation-with-sphinx/source/conf.py @@ -18,8 +18,8 @@ # -- Project information ----------------------------------------------------- project = 'Antares Simulator User Guide' -release = 'v8.8' -copyright = '2023, RTE' +release = 'v9.1' +copyright = '2024, RTE' author = 'RTE' diff --git a/sonar-project.properties b/sonar-project.properties index 5065cb1141..bf90dbda19 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,7 +1,7 @@ sonar.projectName=Antares_Simulator sonar.projectKey=AntaresSimulatorTeam_Antares_Simulator sonar.organization=antaressimulatorteam -sonar.projectVersion=9.0.0 +sonar.projectVersion=9.1.0 # ===================================================== # Properties that will be shared amongst all modules From 26e03f5eb186e8afe80ffd7cd4477ba790d68f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Fri, 31 May 2024 14:31:15 +0200 Subject: [PATCH 07/18] Restore correct behavior when options -h/--list-solvers are provided (#2138) #2056 introduced a slight change of behavior : after this PR, when the user requests help (--help) or queries the available OR-Tools solvers (--list-solvers), a warning message is displayed after the requested information. This is a bit annoying, so here is a fix. --- src/solver/application/application.cpp | 19 +++++++++++-------- .../include/antares/application/application.h | 6 ++++-- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/solver/application/application.cpp b/src/solver/application/application.cpp index 374982928e..d221d19eb6 100644 --- a/src/solver/application/application.cpp +++ b/src/solver/application/application.cpp @@ -63,7 +63,7 @@ Application::Application() resetProcessPriority(); } -void Application::parseCommandLine(Data::StudyLoadOptions& options) +bool Application::parseCommandLine(Data::StudyLoadOptions& options) { auto parser = CreateParser(pSettings, options); auto ret = parser->operator()(pArgc, pArgv); @@ -73,27 +73,28 @@ void Application::parseCommandLine(Data::StudyLoadOptions& options) throw Error::CommandLineArguments(parser->errors()); case Yuni::GetOpt::ReturnCode::help: pStudy = nullptr; - return; + return false; default: - break; + return true; } } -void Application::handleOptions(const Data::StudyLoadOptions& options) +bool Application::handleOptions(const Data::StudyLoadOptions& options) { if (options.displayVersion) { PrintVersionToStdCout(); pStudy = nullptr; - return; + return false; } if (options.listSolvers) { printSolvers(); pStudy = nullptr; - return; + return false; } + return true; } void Application::readDataForTheStudy(Data::StudyLoadOptions& options) @@ -335,9 +336,11 @@ void Application::prepare(int argc, char* argv[]) // The parser contains references to members of pSettings and options, // don't de-allocate these. - parseCommandLine(options); + if (!parseCommandLine(options)) // --help + return; - handleOptions(options); + if (!handleOptions(options)) // --version, --list-solvers + return; // Perform some checks checkAndCorrectSettingsAndOptions(pSettings, options); diff --git a/src/solver/application/include/antares/application/application.h b/src/solver/application/include/antares/application/application.h index 7f6dab80d6..788aff68e9 100644 --- a/src/solver/application/include/antares/application/application.h +++ b/src/solver/application/include/antares/application/application.h @@ -124,8 +124,10 @@ class Application final: public Yuni::IEventObserver Date: Fri, 31 May 2024 15:38:57 +0200 Subject: [PATCH 08/18] [ubuntu workflow] remove vcpkg manual install (#2139) --- .github/workflows/ubuntu.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 2de211c08c..cbb66c6df8 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -101,14 +101,6 @@ jobs: run: | export WX_CONFIG=${{env.WX_CONFIG}} - - name : Install deps with VCPKG - run: | - cd vcpkg - ./bootstrap-vcpkg.sh - vcpkg install ${{env.vcpkgPackages}} --triplet ${{env.triplet}} - rm -rf buildtrees packages downloads - shell: bash - - name: Read antares-deps version id: antares-deps-version uses: notiz-dev/github-action-json-property@release From 6e0e94f3dd80ec49c8d86cd25ebbe01f81d7ad30 Mon Sep 17 00:00:00 2001 From: abdoulbari zaher <32519851+a-zakir@users.noreply.github.com> Date: Fri, 31 May 2024 17:28:28 +0200 Subject: [PATCH 09/18] Fix circular dependencies on CMake targets (#2140) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #2137 --------- Co-authored-by: Florian Omnès --- src/solver/optimisation/CMakeLists.txt | 1 - .../solver/optimisation/opt_fonctions.h | 2 +- .../opt_period_string_generator_base.h | 34 ------------------- src/solver/utils/CMakeLists.txt | 1 - src/solver/utils/filename.cpp | 4 --- .../include/antares/solver/utils/filename.h | 2 +- .../utils/opt_period_string_generator.h | 8 ++++- 7 files changed, 9 insertions(+), 43 deletions(-) delete mode 100644 src/solver/optimisation/include/antares/solver/optimisation/opt_period_string_generator_base.h diff --git a/src/solver/optimisation/CMakeLists.txt b/src/solver/optimisation/CMakeLists.txt index 0b5783ae92..2e3f257932 100644 --- a/src/solver/optimisation/CMakeLists.txt +++ b/src/solver/optimisation/CMakeLists.txt @@ -72,7 +72,6 @@ set(RTESOLVER_OPT include/antares/solver/optimisation/adequacy_patch_csr/constraints/CsrBindingConstraintHour.h adequacy_patch_csr/constraints/CsrBindingConstraintHour.cpp - include/antares/solver/optimisation/opt_period_string_generator_base.h include/antares/solver/optimisation/opt_rename_problem.h opt_rename_problem.cpp diff --git a/src/solver/optimisation/include/antares/solver/optimisation/opt_fonctions.h b/src/solver/optimisation/include/antares/solver/optimisation/opt_fonctions.h index 308616f1c4..8aad20d799 100644 --- a/src/solver/optimisation/include/antares/solver/optimisation/opt_fonctions.h +++ b/src/solver/optimisation/include/antares/solver/optimisation/opt_fonctions.h @@ -22,13 +22,13 @@ #define __SOLVER_OPTIMISATION_FUNCTIONS_H__ #include +#include #include #include "antares/config/config.h" #include "antares/solver/optimisation/opt_structure_probleme_a_resoudre.h" #include "antares/study/parameters/adq-patch-params.h" #include "adequacy_patch_csr/hourly_csr_problem.h" -#include "opt_period_string_generator_base.h" using AdqPatchParams = Antares::Data::AdequacyPatch::AdqPatchParams; using OptimizationOptions = Antares::Solver::Optimization::OptimizationOptions; diff --git a/src/solver/optimisation/include/antares/solver/optimisation/opt_period_string_generator_base.h b/src/solver/optimisation/include/antares/solver/optimisation/opt_period_string_generator_base.h deleted file mode 100644 index 217d95db0c..0000000000 --- a/src/solver/optimisation/include/antares/solver/optimisation/opt_period_string_generator_base.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2007-2024, RTE (https://www.rte-france.com) - * See AUTHORS.txt - * SPDX-License-Identifier: MPL-2.0 - * This file is part of Antares-Simulator, - * Adequacy and Performance assessment for interconnected energy networks. - * - * Antares_Simulator is free software: you can redistribute it and/or modify - * it under the terms of the Mozilla Public Licence 2.0 as published by - * the Mozilla Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * Antares_Simulator is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * Mozilla Public Licence 2.0 for more details. - * - * You should have received a copy of the Mozilla Public Licence 2.0 - * along with Antares_Simulator. If not, see . - */ - -#pragma once - -#include - -// --------------------------------------------- -// Optimization period as string : base class -// -------------------------------------------- -class OptPeriodStringGenerator -{ -public: - virtual std::string to_string() const = 0; - virtual ~OptPeriodStringGenerator() = default; -}; diff --git a/src/solver/utils/CMakeLists.txt b/src/solver/utils/CMakeLists.txt index e5ad63c05e..16cf2a96e5 100644 --- a/src/solver/utils/CMakeLists.txt +++ b/src/solver/utils/CMakeLists.txt @@ -35,7 +35,6 @@ target_link_libraries(utils Antares::result_writer #ortools_utils.h Antares::optimization-options antares-core #enum.h - model_antares #opt_period_string_generator.h -> antares/solver/optimisation/opt_period_string_generator_base.h ) target_include_directories(utils diff --git a/src/solver/utils/filename.cpp b/src/solver/utils/filename.cpp index 4e8b9e0482..cc71083350 100644 --- a/src/solver/utils/filename.cpp +++ b/src/solver/utils/filename.cpp @@ -22,10 +22,6 @@ #include -#include "antares/solver/optimisation/opt_period_string_generator_base.h" - -#include "include/antares/solver/utils/opt_period_string_generator.h" - // ------------------------------------ // Optimization period factory // ------------------------------------ diff --git a/src/solver/utils/include/antares/solver/utils/filename.h b/src/solver/utils/include/antares/solver/utils/filename.h index 0ce354bfab..472d8f8477 100644 --- a/src/solver/utils/include/antares/solver/utils/filename.h +++ b/src/solver/utils/include/antares/solver/utils/filename.h @@ -23,7 +23,7 @@ #include #include -#include "antares/solver/optimisation/opt_period_string_generator_base.h" +#include "opt_period_string_generator.h" std::shared_ptr createOptPeriodAsString(bool isOptimizationWeekly, unsigned int day, diff --git a/src/solver/utils/include/antares/solver/utils/opt_period_string_generator.h b/src/solver/utils/include/antares/solver/utils/opt_period_string_generator.h index 36b5630211..f19a65bcfa 100644 --- a/src/solver/utils/include/antares/solver/utils/opt_period_string_generator.h +++ b/src/solver/utils/include/antares/solver/utils/opt_period_string_generator.h @@ -19,6 +19,7 @@ ** along with Antares_Simulator. If not, see . */ #pragma once +#include /* MPS and criterion generated files wear the same time interval sequence in their names. @@ -35,7 +36,12 @@ called. */ -#include "antares/solver/optimisation/opt_period_string_generator_base.h" +class OptPeriodStringGenerator +{ +public: + virtual std::string to_string() const = 0; + virtual ~OptPeriodStringGenerator() = default; +}; // ------------------------------------ // Daily optimization From 5e6a57fd368b305d119a654e84e78a45114597cd Mon Sep 17 00:00:00 2001 From: Sylvain Leclerc Date: Wed, 5 Jun 2024 15:13:52 +0200 Subject: [PATCH 10/18] Install sirius solver with VCPKG, remove antares-deps (#2090) **Description** Continues the work of #2078 (which should be merged before in feature branch feature/vcpkg-dependencies), to push further the use of VCPKG, and in particular remove the need for the home-made antares-deps repository. Hence, this includes: - Addition of sirius-solver "overlay" port to install sirius with VCPKG - Removal of antares-deps and associated code --------- Signed-off-by: Sylvain Leclerc --- .github/workflows/centos7.yml | 14 +- .../action.yml | 9 -- .../action.yml | 13 +- .github/workflows/oracle8.yml | 2 +- .github/workflows/sonarcloud.yml | 11 -- .github/workflows/ubuntu.yml | 20 --- .github/workflows/windows-vcpkg.yml | 11 -- .gitmodules | 4 - antares-deps-version.json | 3 - .../1-Development-requirements.md | 12 +- .../developer-guide/2-Dependencies-install.md | 111 ++++++---------- docs/developer-guide/3-Build.md | 122 +++++++++++------- src/CMakeLists.txt | 57 +------- src/antares-deps | 1 - src/ports/sirius-solver/portfile.cmake | 21 +++ src/ports/sirius-solver/vcpkg.json | 16 +++ src/ui/CMakeLists.txt | 5 - src/vcpkg.json | 6 + 18 files changed, 170 insertions(+), 268 deletions(-) delete mode 100644 antares-deps-version.json delete mode 160000 src/antares-deps create mode 100644 src/ports/sirius-solver/portfile.cmake create mode 100644 src/ports/sirius-solver/vcpkg.json diff --git a/.github/workflows/centos7.yml b/.github/workflows/centos7.yml index 5f5a34d4b6..3308dab812 100644 --- a/.github/workflows/centos7.yml +++ b/.github/workflows/centos7.yml @@ -7,7 +7,6 @@ on: branches: - develop - dependabot/* - schedule: - cron: '21 2 * * *' workflow_call: @@ -71,15 +70,7 @@ jobs: - name: Init submodule run: | - git submodule update --init --remote src/antares-deps src/tests/resources/Antares_Simulator_Tests - - - name: Download & extract precompiled deps at root - run: | - ANTARES_DEPS_VERSION=$(cut -d'"' -f4 antares-deps-version.json | grep -Ev '\{|\}') - cd / - wget https://github.com/AntaresSimulatorTeam/antares-deps/releases/download/v${ANTARES_DEPS_VERSION}/rte-antares-deps-centos7-Release.tar.gz - tar -xvf rte-antares-deps-centos7-Release.tar.gz - rm -rf rte-antares-deps-centos7-Release.tar.gz + git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests - name: Config OR-Tools URL run: | @@ -110,14 +101,13 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/vcpkg/scripts/buildsystems/vcpkg.cmake \ -DVCPKG_TARGET_TRIPLET=x64-linux-release \ - -DDEPS_INSTALL_DIR=/rte-antares-deps-Release \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTING=ON \ - -DBUILD_not_system=OFF \ -DBUILD_TOOLS=ON \ -DBUILD_UI=OFF \ -DCMAKE_PREFIX_PATH=${{ env.ORTOOLSDIR }}/install \ + - name: Build run: | source /opt/rh/devtoolset-10/enable diff --git a/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml b/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml index 00852138af..d6b87bcaa5 100644 --- a/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml +++ b/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml @@ -1,9 +1,6 @@ name: "Download extract .tgz precompiled libraries" description: "Download and extract .tgz precompiled libraries from antares-deps and antares-simulator repository" inputs: - antares-deps-version: - description: 'antares-deps version' - required: true os: description: 'operational system used for github action' required: true @@ -21,12 +18,6 @@ inputs: runs: using: "composite" steps: - - name: Download & extract antares-deps - shell: bash - run: | - wget https://github.com/AntaresSimulatorTeam/antares-deps/releases/download/v${{inputs.antares-deps-version}}/rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.tar.gz - tar -xvf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.tar.gz - rm -rf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.tar.gz - name: Download & extract OR-Tools shell: bash diff --git a/.github/workflows/download-extract-precompiled-libraries-zip/action.yml b/.github/workflows/download-extract-precompiled-libraries-zip/action.yml index 745b76236c..52eec0beea 100644 --- a/.github/workflows/download-extract-precompiled-libraries-zip/action.yml +++ b/.github/workflows/download-extract-precompiled-libraries-zip/action.yml @@ -1,9 +1,6 @@ name: "Download extract .zip precompiled libraries" description: "Download and extract .zip precompiled libraries from antares-deps and antares-simulator repository" inputs: - antares-deps-version: - description: 'antares-deps version' - required: true os: description: 'operational system used for github action' required: true @@ -20,15 +17,7 @@ inputs: runs: using: "composite" - steps: - - name: Download & extract antares-deps - shell: bash - run: | - wget https://github.com/AntaresSimulatorTeam/antares-deps/releases/download/v${{inputs.antares-deps-version}}/rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip - unzip rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip - rm -rf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip - echo "${GITHUB_WORKSPACE}/rte-antares-deps-Release/bin" >> $GITHUB_PATH - + steps: - name: Download & extract OR-Tools shell: bash run: | diff --git a/.github/workflows/oracle8.yml b/.github/workflows/oracle8.yml index 23c5d49d57..92b65a9a72 100644 --- a/.github/workflows/oracle8.yml +++ b/.github/workflows/oracle8.yml @@ -85,7 +85,7 @@ jobs: rm ortools.zip - name: Init submodule - run: git submodule update --init --remote src/antares-deps src/tests/resources/Antares_Simulator_Tests + run: git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests - name: Install dependencies run: | diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index cf326c2d72..cfe5324d3c 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -54,17 +54,9 @@ jobs: sudo apt-get install libboost-test-dev sudo apt-get install g++-10 gcc-10 - - name: Read antares-deps version - id: antares-deps-version - uses: notiz-dev/github-action-json-property@release - with: - path: 'antares-deps-version.json' - prop_path: 'antares_deps_version' - - name: Download pre-compiled librairies uses: ./.github/workflows/download-extract-precompiled-libraries-tgz with: - antares-deps-version: ${{steps.antares-deps-version.outputs.prop}} os: ${{matrix.os}} buildtype: Debug ortools-url: ${{env.ORTOOLS_URL}} @@ -85,7 +77,6 @@ jobs: - name: Init submodule run: | - git submodule update --init src/antares-deps git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests - name: Configure @@ -97,13 +88,11 @@ jobs: -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \ -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \ -DVCPKG_TARGET_TRIPLET=x64-linux-release \ - -DDEPS_INSTALL_DIR=./rte-antares-deps-Debug \ -DCODE_COVERAGE=ON \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_PREFIX_PATH="../install;${{ env.ORTOOLS_DIR }}/install" \ -DBUILD_TESTING=ON \ -DMZ_CODE_COVERAGE=ON \ - -DBUILD_not_system=OFF \ -DPython3_EXECUTABLE='${{ steps.setup-python.outputs.python-path }}' - name: Build diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index cbb66c6df8..2bcf2954a0 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -68,7 +68,6 @@ jobs: with: key: ${{ env.os }} - - name : Init VCPKG submodule run: | git submodule update --init vcpkg @@ -96,19 +95,6 @@ jobs: sudo apt-get install uuid-dev libwxgtk3.0-gtk3-dev sudo apt-get install g++-10 gcc-10 - - name: export wxWidgets script - shell: bash - run: | - export WX_CONFIG=${{env.WX_CONFIG}} - - - name: Read antares-deps version - id: antares-deps-version - uses: notiz-dev/github-action-json-property@release - with: - path: 'antares-deps-version.json' - prop_path: 'antares_deps_version' - - - name: Config OR-Tools URL run: | echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/$(cat ortools_tag)/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV @@ -116,7 +102,6 @@ jobs: - name: Download pre-compiled librairies uses: ./.github/workflows/download-extract-precompiled-libraries-tgz with: - antares-deps-version: ${{steps.antares-deps-version.outputs.prop}} os: ${{env.os}} ortools-url: ${{env.ORTOOLS_URL}} ortools-dir: ${{env.ORTOOLS_DIR}} @@ -134,11 +119,8 @@ jobs: - name: Init submodule run: | - git submodule update --init src/antares-deps git submodule update --init --remote --recursive src/tests/resources/Antares_Simulator_Tests - - - name: Configure run: | cmake -B _build -S src \ @@ -148,10 +130,8 @@ jobs: -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \ -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \ -DVCPKG_TARGET_TRIPLET=x64-linux-release \ - -DDEPS_INSTALL_DIR=${{github.workspace}}/rte-antares-deps-Release \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTING=ON \ - -DBUILD_not_system=OFF \ -DBUILD_TOOLS=ON \ -DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install \ -DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/bin/python" diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 4eb484b8d0..ccc8794dcb 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -94,17 +94,9 @@ jobs: # Allows to restore a cache when deps have only partially changed (like adding a dependency) restore-keys: vcpkg-cache-windows- - - name: Read antares-deps version - id: antares-deps-version - uses: notiz-dev/github-action-json-property@release - with: - path: 'antares-deps-version.json' - prop_path: 'antares_deps_version' - - name: Download pre-compiled librairies uses: ./.github/workflows/download-extract-precompiled-libraries-zip with: - antares-deps-version: ${{steps.antares-deps-version.outputs.prop}} os: ${{env.os}} ortools-url: ${{env.ORTOOLS_URL}} ortools-dir: ${{env.ORTOOLS_DIR}} @@ -121,7 +113,6 @@ jobs: - name: Init submodule run: | - git submodule update --init src/antares-deps git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests - name: Enable git longpaths @@ -131,7 +122,6 @@ jobs: shell: bash run: | cmake -B _build -S src \ - -DDEPS_INSTALL_DIR=rte-antares-deps-Release \ -DCMAKE_PREFIX_PATH="${{ env.ORTOOLS_DIR }}/install" \ -DVCPKG_ROOT="${{env.VCPKG_ROOT}}" \ -DVCPKG_TARGET_TRIPLET=${{ env.triplet }} \ @@ -139,7 +129,6 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTING=ON \ -DBUILD_TOOLS=ON \ - -DBUILD_not_system=OFF \ -DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/python.exe" \ -DCMAKE_VS_GLOBALS="CLToolExe=cl.exe;CLToolPath=${GITHUB_WORKSPACE}/ccache;TrackFileAccess=false;UseMultiToolTask=true;DebugInformationFormat=OldStyle" diff --git a/.gitmodules b/.gitmodules index 9bee42d242..77fb4921c7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,3 @@ -[submodule "src/antares-deps"] - path = src/antares-deps - url = https://github.com/AntaresSimulatorTeam/antares-deps.git - branch = v2.0.2b [submodule "src/tests/resources/Antares_Simulator_Tests"] path = src/tests/resources/Antares_Simulator_Tests url = https://github.com/AntaresSimulatorTeam/Antares_Simulator_Tests.git diff --git a/antares-deps-version.json b/antares-deps-version.json deleted file mode 100644 index ced7f5add0..0000000000 --- a/antares-deps-version.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "antares_deps_version": "2.0.2b" -} diff --git a/docs/developer-guide/1-Development-requirements.md b/docs/developer-guide/1-Development-requirements.md index 7378d198cc..02c0896f33 100644 --- a/docs/developer-guide/1-Development-requirements.md +++ b/docs/developer-guide/1-Development-requirements.md @@ -11,13 +11,17 @@ The compilation of *Antares Simulator* requires C++17 support. === "Centos" By default, GCC version on Centos is old. - Some external repositories must be enabled depedning on your version of the OS: + Some external repositories must be enabled depending on your version of the OS: #### Centos 7 You must enable the EPEL repository: ``` sudo yum install epel-release - sudo yum install centos-release-scl + sudo yum install git redhat-lsb-core make wget centos-release-scl scl-utils rpm-build + sudo yum install devtoolset-10-gcc* + + scl enable devtoolset-10 bash + source /opt/rh/rh-git227/enable ``` #### Centos 8 @@ -25,8 +29,8 @@ The compilation of *Antares Simulator* requires C++17 support. ``` sudo yum install dnf-plugins-core sudo yum config-manager --set-enabled PowerTools - sudo yum install devtoolset-9 - scl enable devtoolset-9 bash + sudo yum install devtoolset-10 + scl enable devtoolset-10 bash ``` === "Ubuntu/Debian" diff --git a/docs/developer-guide/2-Dependencies-install.md b/docs/developer-guide/2-Dependencies-install.md index 45a96e08f0..1177228e6a 100644 --- a/docs/developer-guide/2-Dependencies-install.md +++ b/docs/developer-guide/2-Dependencies-install.md @@ -10,94 +10,61 @@ toc_depth: 2 - [OR-Tools](https://github.com/rte-france.com/or-tools) (fork from [Google](https://github.com/google/or-tools)) - [wxWidgets](https://github.com/wxWidgets/wxWidgets) (Only for the complete Antares Simulator solution with GUI) -- [Boost](https://www.boost.org/) libraries: test (Only for unit tests) +- [minizip](https://github.com/zlib-ng/minizip-ng) library, with its dependency zlib +- [Boost](https://www.boost.org/) libraries: header libraries and boost-test library +- [libuuid](https://linux.die.net/man/3/libuuid) on Linux systems -These third-party libraries can be installed: -- by building them from sources (see [here](3-Build.md) for more information) -- or using a package manager. +We favor using [vcpkg](https://github.com/microsoft/vcpkg) for building and installing most of those dependencies, +see [build instructions](3-Build.md) which explain how it integrates with CMake build. +However, we still have a few exceptions that must be installed in a different way, see next sections. -## Install with package manager +Although not encouraged, it's still possible to install those dependencies yourself and add +their installation path to your `CMAKE_PREFIX_PATH`. -=== "Windows" +## OR-Tools - For Windows we will use [vcpkg](https://github.com/microsoft/vcpkg) to download and compile the libraries. vcpkg is available as a submodule in *ANTARES*. - - You must install the corresponding [vcpkg-triplet](https://vcpkg.readthedocs.io/en/latest/users/integration/#triplet-selection) depending on Antares version and libraries load: - - - ``x64-windows`` : 64 bits version with dynamic libraries load - - ``x86-windows`` : 32 bits version with dynamic libraries load - - ``x64-windows-static``: 64 bits version with static libraries load - - ``x86-windows-static``: 32 bits version with static libraries load - - The vcpkg-triplet used will be named [vcpg-triplet] later in this document. - - - Init submodule and install vcpkg - - ``` - git submodule update --init vcpkg - cd vcpkg - .\bootstrap-vcpkg.bat - ``` - - Note: - > all vcpkg command further described must be run from vcpkg folder. This folder will be named [vcpkg_root] later in this document. +OR-Tools may be installed in one of 2 ways: + +1. **As a pre-compiled dependency** + + You can [download](https://github.com/rte-france/or-tools/releases) a precompiled OR-Tools archive that contains headers & static libraries. + Please note that dynamic linking with OR-Tools is only supported in Linux. - - Install dependencies - ``` - cd vcpkg - vcpkg install wxwidgets boost-test --triplet [vcpg-triplet] - ``` + Decompress the archive, and provide its path as a `CMAKE_PREFIX_PATH`. + +2. **As part of the build** + + You may enable the `BUILD_ORTOOLS` configuration option to build it from source during Antares build, + as documented in [build instructions](3-Build.md). + + The drawback of this second approach is that OR-Tools may need to be built again when you + run again a cmake configure step, therefore it's not advised for developers. + + +## Linux: libuuid and wxWidgets + +On Linux systems, libuuid development packages need to be installed with your +OS package manager. +You will also need to install wxWidgets if you want to build the GUI. + === "Centos" ``` - sudo yum install git redhat-lsb-core gcc gcc-c++ make wget centos-release-scl scl-utils rpm-build - sudo yum install cmake3 devtoolset-9 - sudo yum install libuuid-devel unzip wxGTK3-devel boost-test boost-devel + sudo yum install libuuid-devel + sudo yum install wxGTK3-devel ``` + === "Ubuntu 20.04 or 22.04 / Debian 11" ``` - sudo apt install uuid-dev libwxgtk3.0-gtk3-dev - sudo apt install libboost-test-dev + sudo apt install uuid-dev + sudo apt install libwxgtk3.0-gtk3-dev ``` === "Ubuntu 23.04 / Debian 12" ``` - sudo apt install uuid-dev libwxgtk3.2-dev libboost-test-dev + sudo apt install uuid-dev + sudo apt install libwxgtk3.2-dev ``` - -## Automatic libraries compilation from sources -[The Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps) is a submodule that can be used for automatic libraries compilation from sources. - -Apart from OR-Tools, all dependencies can be built at configure time using the option `-DBUILD_ALL=ON` (`OFF` by default). -For a list of available options, see [the Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps). - -You can set `-DBUILD_ORTOOLS=ON` to download & build OR-Tools. It is also possible to use a precompiled archive, see below. - -For compiling the package yourself from git, additional build dependencies are needed (see [here](1-Development-requirements.md)). - -### Pre-compiled OR-Tools: release+static only -You can [download](https://github.com/rte-france/or-tools/releases) a precompiled OR-Tools archive that contains headers & static libraries. - -Please note that dynamic linking with OR-Tools is only supported in Linux. - -Decompress the archive, and provide its path as a `CMAKE_PREFIX_PATH`. If you use XPRESS, you may need also to specify `XPRESS_ROOT`. - -### Defining dependency install directory -When using multiple directories for Antares development with multiple branches, it can be useful to have a common dependency install directory. - -Dependency install directory can be specified with `DEPS_INSTALL_DIR`. By default, install directory is `/../rte-antares-deps-` - -Note: -> `DEPS_INSTALL_DIR` is added to `CMAKE_PREFIX_PATH` - -### Pre-compiled libraries download: release version only -You can download a pre-compiled antares-deps archive from [Antares dependencies compilation repository][antares-deps-url]. Only release versions are available. - -Note: -> For Windows, you must you use a MSVC version compatible with the MSVC version used in the GitHub Action that made the release. - -[antares-deps-url]: https://github.com/AntaresSimulatorTeam/antares-deps/releases - diff --git a/docs/developer-guide/3-Build.md b/docs/developer-guide/3-Build.md index 14f7ccdbe3..860c9f47cb 100644 --- a/docs/developer-guide/3-Build.md +++ b/docs/developer-guide/3-Build.md @@ -1,69 +1,77 @@ # Build -Before build, make sure that dependencies are [installed](2-Dependencies-install.md). -## Environment settings -On CentOS, enable `devtoolset-9` and `rh-git227`: -``` -scl enable devtoolset-9 bash -source /opt/rh/rh-git227/enable -``` -## Update git submodule -``` -git submodule update --init src/antares-deps -``` -> 💡 **Ignore submodules to make git operations faster** -> Antares_Simulator is quite a large project, with a few large submodules. In file .git/config, you can add this line to all [submodule] sections -> ``` -> ignore = all -> ``` -> This way git won't waste time computing diff on these when checking out, diffing commits, etc. git operations should be a lot faster. -> Keep in mind that your submodules won't be updated. +Before building, make sure that dependencies are [installed](2-Dependencies-install.md). + +## Install VCPKG + +Although you may install third party dependencies yourself, the preferred way is +to rely on [vcpkg](https://github.com/microsoft/vcpkg) and its CMake integration +to build and install most of them. + +The first step will be to install VCPKG using its bootstrap script: -## Configure build with CMake === "Windows" ``` - cmake -B _build -S [antares_src] -DVCPKG_ROOT=[vcpkg_root] -DVCPKG_TARGET_TRIPLET=[vcpkg-triplet] -DCMAKE_BUILD_TYPE=release + git submodule update --init vcpkg + cd vcpkg + .\bootstrap-vcpkg.bat ``` - > **Note:** cpack NSIS installer creation needs an 'out-of-source build'. The build directory must be outside `[antares_src]` directory -=== "CentOS" +=== "Linux" ``` - cmake3 -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release + git submodule update --init vcpkg + cd vcpkg + ./bootstrap-vcpkg.sh ``` -=== "Ubuntu/Debian" + +## Configure build with CMake + +The preferred way of building the project is to use a pre-compiled version of OR-Tools and to install +other dependencies using vcpkg. To achieve this, you will need to define VCPKG-related variables, +and add your OR-tools install path to `CMAKE_PREFIX_PATH`: + + +=== "Windows" ``` - cmake -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release + cmake -B _build -S src -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_TARGET_TRIPLET=x64-windows-antares \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_PREFIX_PATH= + ``` + + > **Note:** cpack NSIS installer creation needs an 'out-of-source build'. The build directory must be outside `src` directory + + +=== "Linux" + + ``` + cmake -B _build -S src -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_TARGET_TRIPLET=x64-linux-antares \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_PREFIX_PATH= ``` Here is a list of mandatory or optional CMake configuration options: -| Option | Mandatory | Description | Expected value | Default value | -|:----------------------|-----------|----------------------------------------------------------------------------------|----------------------------------------|-----------------------------------------------------------| -| `CMAKE_C_COMPILER` | **yes** | Select C compiler | `gcc_-10` | | -| `CMAKE_CXX_COMPILER` | **yes** | Select C++ compiler | `g++-10` | | -| `CMAKE_BUILD_TYPE` | **yes** | Define build type | `Release` / `Debug` / `RelWithDebInfo` | | -| `BUILD_UI` | no | Enable or disable Antares Simulator UI[^1] compilation | `ON` / `OFF` | `ON` | -| `BUILD_ALL` | no | Enable build of ALL external libraries | `ON` / `OFF` | `OFF` | -| `DEPS_INSTALL_DIR` | no | Define dependencies libraries install directory | absolute path to an existing directory | `/../rte-antares-deps-` | -| `USE_PRECOMPILED_EXT` | no | This option must be set if you use wxWidget as precompiled external library | `ON` / `OFF` | `OFF` | -| `BUILD_TESTING` | no | Enable build for unit tests | `ON` / `OFF` | `OFF` | -| `BUILD_ORTOOLS` | no | Enable build for OR-Tools and its dependencies (requires an Internet connection) | `ON` / `OFF` | `OFF` | +| Option | Mandatory | Description | Expected value | Default value | +|:-----------------------|--------------|----------------------------------------------------------------------------------|---------------------------------------------|-----------------------------------------------------------| +| `CMAKE_C_COMPILER` | OS-dependent | Select C compiler | `gcc-10` | | +| `CMAKE_CXX_COMPILER` | OS-dependent | Select C++ compiler | `g++-10` | | +| `CMAKE_BUILD_TYPE` | **yes** | Define build type | `Release` / `Debug` / `RelWithDebInfo` | | +| `BUILD_UI` | no | Enable or disable Antares Simulator UI[^1] compilation | `ON` / `OFF` | `ON` | +| `BUILD_TESTING` | no | Enable build for unit tests | `ON` / `OFF` | `OFF` | +| `BUILD_ORTOOLS` | no | Enable build for OR-Tools and its dependencies (requires an Internet connection) | `ON` / `OFF` | `OFF` | +| `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** > 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` -Additional options for Windows: - -| Option | Description | -|:-----------------------|------------------------| -| `VCPKG_ROOT` | Define vcpkg directory | -| `VCPKG_TARGET_TRIPLET` | Define [vcpkg-triplet] | - > 💡 **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 +> 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. > ``` > cmake -S src [...] -G Ninja @@ -74,17 +82,17 @@ Additional options for Windows: === "Windows" ``` - cmake --build _build --config release -j8 + cmake --build _build --config Release -j8 ``` === "CentOS" ``` - cmake3 --build _build --config release -j8 + cmake3 --build _build -j8 ``` === "Ubuntu/Debian" ``` - cmake --build _build --config release -j8 + cmake --build _build -j8 ``` > 💡 Compilation can be done on several processors with `-j` option. @@ -92,4 +100,24 @@ Additional options for Windows: The final GUI file can be executed at `_build/ui/simulator/antares-X.Y-ui-simulator` +## Developer tips + +### Use a compiler cache +In order to avoid unnecessary rebuilds, for example when you switch branches, you may use a compiler cache +such as ccache. Using it under Linux systems is pretty easy with CMake, you only need to specify it +as the compiler launcher at configure time: +``` +cmake ... -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ... +``` + +### Ignore submodules to make git operations faster +Antares_Simulator is quite a large project, with a few large submodules. In file .git/config, you can add this line to all [submodule] sections +``` +ignore = all +``` +This way git won't waste time computing diff on these when checking out, diffing commits, etc. git operations should be a lot faster. +Keep in mind that your submodules won't be updated. + + + [^1]: GUI support has been dropped in favor of [Antares Web](https://antares-web.readthedocs.io) \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 763c40cb96..51fdc67271 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -196,69 +196,15 @@ if (${BUILD_MERSENNE_TWISTER_PYBIND11}) find_package(pybind11 REQUIRED) endif() -#Define install directory -if (NOT DEPS_INSTALL_DIR) - SET(DEPS_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../rte-antares-deps-${CMAKE_BUILD_TYPE}) - -else() - if(NOT IS_ABSOLUTE ${DEPS_INSTALL_DIR}) - SET(DEPS_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../${DEPS_INSTALL_DIR}) - endif() -endif() - - -# Add DEPS_INSTALL_DIR with antares-xpansion CMAKE_BUILD_TYPE -if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release") - - string(REPLACE ${CMAKE_BUILD_TYPE} Release - DEPS_INSTALL_DIR_XPANSION - ${DEPS_INSTALL_DIR}) - - list(APPEND CMAKE_PREFIX_PATH ${DEPS_INSTALL_DIR_XPANSION}) - -elseif("${CMAKE_BUILD_TYPE}" STREQUAL "debug") - - string(REPLACE ${CMAKE_BUILD_TYPE} Debug - DEPS_INSTALL_DIR_XPANSION - ${DEPS_INSTALL_DIR}) - - list(APPEND CMAKE_PREFIX_PATH ${DEPS_INSTALL_DIR_XPANSION}) - -endif() - -list(APPEND CMAKE_PREFIX_PATH ${DEPS_INSTALL_DIR}) -message(STATUS "CMAKE_PREFIX_PATH : ${CMAKE_PREFIX_PATH}") - -# Build Needed dependencies -add_subdirectory(antares-deps) - -#Add needed definition in case of external dependencies compilation -include (antares-deps/cmake/additionnal-definitions.cmake) - #Boost header libraries find_package(Boost REQUIRED) -#TODO : Add ZLIB if VCPKG used why is this needed -if (VCPKG_TOOLCHAIN) - #zlib - find_package(ZLIB REQUIRED) -endif() - #Sirius solver if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() -if (VCPKG_TOOLCHAIN) - list(APPEND CMAKE_PREFIX_PATH "${sirius_solver_ROOT}") - list(APPEND CMAKE_PREFIX_PATH "${ortools_ROOT}") -endif() - -find_package(sirius_solver) - -if (NOT sirius_solver_FOUND) - message (FATAL_ERROR "Sirius solver not found. Sirius solver can be compiled with -DBUILD_sirius=ON or you can specify previous dependency install directory with -DCMAKE_PREFIX_PATH or -DDEPS_INSTALL_DIR") -endif() +find_package(sirius_solver REQUIRED) find_package(ortools) if(NOT ortools_FOUND OR BUILD_ORTOOLS) @@ -298,7 +244,6 @@ else () endif () endif () - #wxWidget not needed for all library find is done in ui CMakeLists.txt if (VCPKG_TOOLCHAIN AND NOT BUILD_wxWidgets) #Add cmake directory to CMAKE_MODULE_PATH to use specific FindwxWidgets package needed for vcpkg diff --git a/src/antares-deps b/src/antares-deps deleted file mode 160000 index 0d6bebfb90..0000000000 --- a/src/antares-deps +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0d6bebfb901e47ec6ac1c73cb61a522803c81b98 diff --git a/src/ports/sirius-solver/portfile.cmake b/src/ports/sirius-solver/portfile.cmake new file mode 100644 index 0000000000..30cce62622 --- /dev/null +++ b/src/ports/sirius-solver/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "rte-france/sirius-solver" + REF "antares-integration-v1.4" + SHA512 1eecb351b32490a82a2f93bf91e77ea4fd55cffc92c466b4136314e70d8a70328e4fda5257a46c08c431fd7013475050bc3908fcedee4fbdd746ed1ab6cb0efd + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/src" +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME sirius_solver CONFIG_PATH cmake) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/src/ports/sirius-solver/vcpkg.json b/src/ports/sirius-solver/vcpkg.json new file mode 100644 index 0000000000..8e4a0a36df --- /dev/null +++ b/src/ports/sirius-solver/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "sirius-solver", + "version": "1.4", + "port-version": 0, + "description": "Sirius solver", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index 0c8f846f96..8bb000564a 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -1,9 +1,4 @@ - -if (USE_PRECOMPILED_EXT AND UNIX) - set (wxWidgets_CONFIG_EXECUTABLE ${DEPS_INSTALL_DIR}/bin/wx-config) -endif() - #wxWidget required find_package(wxWidgets REQUIRED COMPONENTS net core base richtext propgrid aui adv html xml) include(${wxWidgets_USE_FILE}) diff --git a/src/vcpkg.json b/src/vcpkg.json index f15f208a42..011ede41ad 100644 --- a/src/vcpkg.json +++ b/src/vcpkg.json @@ -3,11 +3,17 @@ "version-string": "9.1.0", "builtin-baseline": "9484a57dd560b89f0a583be08af6753611c57fd5", "vcpkg-configuration": { + "overlay-ports": [ + "./ports" + ], "overlay-triplets": [ "./triplets" ] }, "dependencies": [ + { + "name": "sirius-solver" + }, { "name": "wxwidgets", "platform": "windows" From f485d5245a061b73e9d5cd26a03eac551b8d4365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20Mar=C3=A9chal?= <45510813+JasonMarechal25@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:27:19 +0200 Subject: [PATCH 11/18] Remove extra caching vcpkg (#2145) --- .github/workflows/ubuntu.yml | 530 +++++++++++++++++------------------ 1 file changed, 254 insertions(+), 276 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 2bcf2954a0..c774854d16 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -47,287 +47,265 @@ jobs: if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.REF }} - - - name: Install VCPKG - run: git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics - - - name: Restore vcpkg binary dir from cache - id: cache-vcpkg-binary - uses: actions/cache/restore@v4 - with: - path: ${{ github.workspace }}/vcpkg_cache - key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} - # Allows to restore a cache when deps have only partially changed (like adding a dependency) - restore-keys: vcpkg-cache-ubuntu- - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: + - uses: actions/checkout@v4 + with: + ref: ${{ env.REF }} + + - name: Install VCPKG + run: git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics + + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-ubuntu- + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: key: ${{ env.os }} - - name : Init VCPKG submodule - run: | - git submodule update --init vcpkg - - # Restore both vcpkg and its artifacts from the GitHub cache service. - - name: Restore vcpkg and its artifacts. - uses: actions/cache@v4 - with: - # The first path is the location of vcpkg (it contains the vcpkg executable and data files). - # The other paths starting with '!' are exclusions: they contain termporary files generated during the build of the installed packages. - path: | - ${{ env.VCPKG_ROOT }} - !${{ env.VCPKG_ROOT }}/buildtrees - !${{ env.VCPKG_ROOT }}/packages - !${{ env.VCPKG_ROOT }}/downloads - # The key is composed in a way that it gets properly invalidated: this must happen whenever vcpkg's Git commit id changes, or the list of packages changes. In this case a cache miss must happen and a new entry with a new key with be pushed to GitHub the cache service. - # The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm. - # Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already). - key: | - ${{ hashFiles( 'vcpkg_manifest/vcpkg.json' ) }}-${{ hashFiles( '.git/modules/vcpkg/HEAD' )}}-${{ env.triplet }} - - - name: Install libraries - run: | - sudo apt-get update - sudo apt-get install uuid-dev libwxgtk3.0-gtk3-dev - sudo apt-get install g++-10 gcc-10 - - - name: Config OR-Tools URL - run: | + - name: Install libraries + run: | + sudo apt-get update + sudo apt-get install uuid-dev libwxgtk3.0-gtk3-dev + sudo apt-get install g++-10 gcc-10 + + - name: Config OR-Tools URL + run: | echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/$(cat ortools_tag)/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV - - name: Download pre-compiled librairies - uses: ./.github/workflows/download-extract-precompiled-libraries-tgz - with: - os: ${{env.os}} - ortools-url: ${{env.ORTOOLS_URL}} - ortools-dir: ${{env.ORTOOLS_DIR}} - - - name: Set up Python - id: setup-python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install dependencies - run: | + - name: Download pre-compiled librairies + uses: ./.github/workflows/download-extract-precompiled-libraries-tgz + with: + os: ${{env.os}} + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} + + - name: Set up Python + id: setup-python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install dependencies + run: | python -m pip install --upgrade pip pip3 install -r src/tests/examples/requirements.txt - - name: Init submodule - run: | + - name: Configure + run: | + cmake -B _build -S src \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_C_COMPILER=/usr/bin/gcc-10 \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \ + -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=ON \ + -DBUILD_TOOLS=ON \ + -DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install \ + -DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/bin/python" + + - name: Build + run: | + cmake --build _build -j$(nproc) + + # simtest + - name: Read simtest version + id: simtest-version + uses: notiz-dev/github-action-json-property@release + with: + path: 'simtest.json' + prop_path: 'version' + + - name: Init submodule + run: | git submodule update --init --remote --recursive src/tests/resources/Antares_Simulator_Tests - - - name: Configure - run: | - cmake -B _build -S src \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_C_COMPILER=/usr/bin/gcc-10 \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \ - -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \ - -DVCPKG_TARGET_TRIPLET=x64-linux-release \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_TESTING=ON \ - -DBUILD_TOOLS=ON \ - -DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install \ - -DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/bin/python" - - - name: Build - run: | - cmake --build _build -j$(nproc) - - # simtest - - name: Read simtest version - id: simtest-version - uses: notiz-dev/github-action-json-property@release - with: - path: 'simtest.json' - prop_path: 'version' - - - - name: Run named mps tests - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-named-mps - os: ${{ env.os }} - variant: "named-mps" - - - name: Run unfeasibility-related tests - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - run: | - cd _build - ctest -C Release --output-on-failure -R "^unfeasible$" - - - name: Run unit and end-to-end tests - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - run: | - cd _build - ctest -C Release --output-on-failure -L "unit|end-to-end" - - - name: Upload logs for failed tests - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: test-log - path: ${{ github.workspace }}/_build/Testing/Temporary/LastTest.log - - - name: Run tests about infinity on BCs RHS - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v830 - os: ${{ env.os }} - - - name: Run MILP with CBC - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-milp - variant: "milp-cbc" - os: ${{ env.os }} - - - name: Run tests introduced in v860 - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v860 - os: ${{ env.os }} - - - name: Run tests introduced in v870 - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v870 - os: ${{ env.os }} - - - name: Run tests introduced in v910 - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v910 - os: ${{ env.os }} - - - name: Run short-tests - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: short-tests - os: ${{ env.os }} - - - name: Run mps tests - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-mps - os: ${{ env.os }} - - - name: Run tests for adequacy patch (CSR) - if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: adequacy-patch-CSR - os: ${{ env.os }} - - - name: Run parallel tests - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-parallel - os: ${{ env.os }} - variant: "parallel" - - - name: Run medium-tests - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: medium-tests - os: ${{ env.os }} - - - name: Run long-tests-1 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-1 - os: ${{ env.os }} - - - name: Run long-tests-2 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-2 - os: ${{ env.os }} - - - name: Run long-tests-3 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-3 - os: ${{ env.os }} - - - name: Installer .deb creation - run: | - cd _build - cpack -G DEB - - - name: .tar.gz creation - run: | - cd _build - cpack -G TGZ - - - name: Solver archive creation - run: | - cd _build - cmake --install . --prefix install - pushd . - cd install/bin - tar czf ../../antares-solver_ubuntu20.04.tar.gz antares-solver libsirius_solver.so - popd - rm -rf install - - - name: Installer archive upload push - uses: actions/upload-artifact@v4 - with: - name: targz - path: _build/*.tar.gz - - - name: Installer deb upload push - uses: actions/upload-artifact@v4 - with: - name: deb - path: _build/*.deb - - - - name: Publish assets - if: ${{ env.IS_RELEASE == 'true' }} - env: - GITHUB_TOKEN: ${{ github.token }} - tag: ${{ github.event.inputs.release_tag }} - run: | - gh release upload "$tag" _build/*.tar.gz _build/*.deb - - - name: Cache vcpkg binary dir - if: always() - id: save-cache-vcpkg-binary - uses: actions/cache/save@v4 - with: - path: ${{ github.workspace }}/vcpkg_cache - key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + + - name: Run named mps tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-named-mps + os: ${{ env.os }} + variant: "named-mps" + + - name: Run unfeasibility-related tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + run: | + cd _build + ctest -C Release --output-on-failure -R "^unfeasible$" + + - name: Run unit and end-to-end tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + run: | + cd _build + ctest -C Release --output-on-failure -L "unit|end-to-end" + + - name: Upload logs for failed tests + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: test-log + path: ${{ github.workspace }}/_build/Testing/Temporary/LastTest.log + + - name: Run tests about infinity on BCs RHS + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-v830 + os: ${{ env.os }} + + - name: Run MILP with CBC + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-milp + variant: "milp-cbc" + os: ${{ env.os }} + + - name: Run tests introduced in v860 + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-v860 + os: ${{ env.os }} + + - name: Run tests introduced in v870 + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-v870 + os: ${{ env.os }} + + - name: Run tests introduced in v910 + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-v910 + os: ${{ env.os }} + + - name: Run short-tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: short-tests + os: ${{ env.os }} + + - name: Run mps tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-mps + os: ${{ env.os }} + + - name: Run tests for adequacy patch (CSR) + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: adequacy-patch-CSR + os: ${{ env.os }} + + - name: Run parallel tests + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-parallel + os: ${{ env.os }} + variant: "parallel" + + - name: Run medium-tests + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: medium-tests + os: ${{ env.os }} + + - name: Run long-tests-1 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: long-tests-1 + os: ${{ env.os }} + + - name: Run long-tests-2 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: long-tests-2 + os: ${{ env.os }} + + - name: Run long-tests-3 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: long-tests-3 + os: ${{ env.os }} + + - name: Installer .deb creation + run: | + cd _build + cpack -G DEB + + - name: .tar.gz creation + run: | + cd _build + cpack -G TGZ + + - name: Solver archive creation + run: | + cd _build + cmake --install . --prefix install + pushd . + cd install/bin + tar czf ../../antares-solver_ubuntu20.04.tar.gz antares-solver libsirius_solver.so + popd + rm -rf install + + - name: Installer archive upload push + uses: actions/upload-artifact@v4 + with: + name: targz + path: _build/*.tar.gz + + - name: Installer deb upload push + uses: actions/upload-artifact@v4 + with: + name: deb + path: _build/*.deb + + + - name: Publish assets + if: ${{ env.IS_RELEASE == 'true' }} + env: + GITHUB_TOKEN: ${{ github.token }} + tag: ${{ github.event.inputs.release_tag }} + run: | + gh release upload "$tag" _build/*.tar.gz _build/*.deb + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} From a5398197a81a3290942644efba720a63cad4734b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Thu, 6 Jun 2024 14:25:43 +0200 Subject: [PATCH 12/18] Use constexpr instead of enum to eliminate warnings (#2144) --- .../include/antares/solver/variable/constants.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/solver/variable/include/antares/solver/variable/constants.h b/src/solver/variable/include/antares/solver/variable/constants.h index 89f9dcf70e..cea6298346 100644 --- a/src/solver/variable/include/antares/solver/variable/constants.h +++ b/src/solver/variable/include/antares/solver/variable/constants.h @@ -27,16 +27,13 @@ namespace Solver { namespace Variable { -enum Constant -{ - maxHoursInAYear = 8785, - maxDaysInAYear = 7 * 53 + 1, // 366, - maxWeeksInAYear = 53, - maxHoursInADay = 24, - maxMonths = 12, - maxDaysInAWeek = 7, - maxHoursInAWeek = 24 * 7, // 168, -}; +constexpr unsigned int maxHoursInAYear = 8785; +constexpr unsigned int maxDaysInAYear = 7 * 53 + 1; // 366, +constexpr unsigned int maxWeeksInAYear = 53; +constexpr unsigned int maxHoursInADay = 24; +constexpr unsigned int maxMonths = 12; +constexpr unsigned int maxDaysInAWeek = 7; +constexpr unsigned int maxHoursInAWeek = 24 * 7; // 168 template struct PrecisionToPrintfFormat From a89c067326ab7be40442c33174ab4b9d1d58a898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Thu, 6 Jun 2024 17:12:36 +0200 Subject: [PATCH 13/18] Fix changelog for v9.1.0 (#2146) Most of the contents for v9.1.0 were under section 8.8.3 --------- Co-authored-by: abdoulbari zaher <32519851+a-zakir@users.noreply.github.com> --- docs/developer-guide/CHANGELOG.md | 84 +++++++++++++++---------------- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/docs/developer-guide/CHANGELOG.md b/docs/developer-guide/CHANGELOG.md index 67aa64da57..d6606547da 100644 --- a/docs/developer-guide/CHANGELOG.md +++ b/docs/developer-guide/CHANGELOG.md @@ -10,51 +10,8 @@ toc_depth: 2 * Scenarized & hourly values for hydro pumping and hydro generation. Previously this data was not scenarized and daily. * STS groups are now "dynamic" : group names are no longer fixed by code, user is free to define these groups. * Add optimization options from command line in OR-Tools / XPRESS (#1837) -#### TODO - -## Branch 9.0.x - -### 9.0.0 -#### License -* Use licence MPL 2.0 instead of GPL3_WITH_RTE-Exceptions (#1812) - -#### Improvements -* Include overflow variable in HydroPower constraint (#1903) -* Add total time logging at the end of the simulation (#1908) -* Add STS level constraint to suspect list for infeasible problem analysis (#1891) - -#### For developers -* Use precompiled OR-Tools for Oracle Linux 8 CI (#1893) -* Change version behavior to allow more flexibility (#1898) - -#### Code quality -* Use std::shared_ptr instead of indices for active binding constraints in results (#1887) -* Fix a few compilation warnings (#1880) -* Scratchpad numspace (#1749) - -#### Tests -* Fix invalid index causing segfault in `test-study` test (#1902) - -## Branch 8.8.x (end of support 12/2025) - -### 8.8.5 (05/2024) -#### Bugfix -- [UI] Fix opening a study from the file browser -- Fix crash occurring when duplicate thermal clusters are present in a study (same name) -- Fix formula for "PROFIT BY PLANT" - -### 8.8.4 (03/2024) -#### Bugfix -* Adequacy patch CSR - fix DTG MRG (#1982) -* Fix ts numbers for no gen clusters (#1969) -* Remove unitcount limit for time series generation (#1960) - -### 8.8.3 (02/2024) -#### Bugfix -* Fix an issue where depending on the platform the output archive could contain several entries of the same area and inrco files #### Improvements -* Remove sc-builder prefix "hgp", use "h" instead for max hydro pumping & generation timeseries. * Rationalize consistency checks on the number of columns (#2073) * Documentation reorganization and improvement (#2024) (#2023) (#2022) * Add doc for thermal heuristic (#2048) @@ -102,6 +59,47 @@ toc_depth: 2 * Remove deps-build Actions (#2043) * Remove unused logs.hxx (#2026) +## Branch 9.0.x + +### 9.0.0 +#### License +* Use licence MPL 2.0 instead of GPL3_WITH_RTE-Exceptions (#1812) + +#### Improvements +* Include overflow variable in HydroPower constraint (#1903) +* Add total time logging at the end of the simulation (#1908) +* Add STS level constraint to suspect list for infeasible problem analysis (#1891) + +#### For developers +* Use precompiled OR-Tools for Oracle Linux 8 CI (#1893) +* Change version behavior to allow more flexibility (#1898) + +#### Code quality +* Use std::shared_ptr instead of indices for active binding constraints in results (#1887) +* Fix a few compilation warnings (#1880) +* Scratchpad numspace (#1749) + +#### Tests +* Fix invalid index causing segfault in `test-study` test (#1902) + +## Branch 8.8.x (end of support 12/2025) + +### 8.8.5 (05/2024) +#### Bugfix +- [UI] Fix opening a study from the file browser +- Fix crash occurring when duplicate thermal clusters are present in a study (same name) +- Fix formula for "PROFIT BY PLANT" + +### 8.8.4 (03/2024) +#### Bugfix +* Adequacy patch CSR - fix DTG MRG (#1982) +* Fix ts numbers for no gen clusters (#1969) +* Remove unitcount limit for time series generation (#1960) + +### 8.8.3 (02/2024) +#### Bugfix +* Fix an issue where depending on the platform the output archive could contain several entries of the same area and interco files + ### 8.8.2 #### Bugfix * Fix segfault caused by uninitialized `cluster.series.timeseriesNumbers` (#1876). This bug was introduced in v8.8.1 by #1752 From 8d6cdc4156357f630babc524ffb49612704f6306 Mon Sep 17 00:00:00 2001 From: guilpier-code <62292552+guilpier-code@users.noreply.github.com> Date: Fri, 7 Jun 2024 09:08:52 +0200 Subject: [PATCH 14/18] Remove state from hydro ventilation (#2143) **State** type is passed to the hydro ventilation. The object **state** is used by the hydro ventilation to reach the weekly optimization problem, in order to update the hydro initial level of a MC year. This important update is hidden in the depth of the code whereas it should be more highlighted (when a year starts). Furthermore, removing state alleviates a bit the hydro ventilation, already too complicated. Eventually, removing dependency of class **HydroManagement** to **State** allows to : - highlight the update of hydro initial level when beginning a year - loose a dependency to **State** --- .../solver/hydro/management/management.h | 7 ++----- src/solver/hydro/management/daily.cpp | 17 +++++------------ src/solver/hydro/management/management.cpp | 3 +-- src/solver/simulation/adequacy.cpp | 1 + src/solver/simulation/common-eco-adq.cpp | 17 +++++++++++++++++ src/solver/simulation/economy.cpp | 1 + .../antares/solver/simulation/common-eco-adq.h | 4 ++++ .../antares/solver/simulation/solver.hxx | 1 - 8 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/solver/hydro/include/antares/solver/hydro/management/management.h b/src/solver/hydro/include/antares/solver/hydro/management/management.h index 29f64fbd93..78f3d4e6ea 100644 --- a/src/solver/hydro/include/antares/solver/hydro/management/management.h +++ b/src/solver/hydro/include/antares/solver/hydro/management/management.h @@ -112,7 +112,6 @@ class HydroManagement final //! Perform the hydro ventilation void makeVentilation(double* randomReservoirLevel, - Solver::Variable::State& state, uint y, Antares::Data::Area::ScratchMap& scratchmap); @@ -152,12 +151,10 @@ class HydroManagement final // \return The total inflow for the whole year double prepareMonthlyTargetGenerations(Data::Area& area, TmpDataByArea& data); - void prepareDailyOptimalGenerations(Solver::Variable::State& state, - uint y, + void prepareDailyOptimalGenerations(uint y, Antares::Data::Area::ScratchMap& scratchmap); - void prepareDailyOptimalGenerations(Solver::Variable::State& state, - Data::Area& area, + void prepareDailyOptimalGenerations(Data::Area& area, uint y, Antares::Data::Area::ScratchMap& scratchmap); diff --git a/src/solver/hydro/management/daily.cpp b/src/solver/hydro/management/daily.cpp index 649de96f5d..8391b523d0 100644 --- a/src/solver/hydro/management/daily.cpp +++ b/src/solver/hydro/management/daily.cpp @@ -40,7 +40,6 @@ #include "antares/solver/hydro/daily2/h2o2_j_fonctions.h" #include "antares/solver/hydro/management/management.h" #include "antares/solver/simulation/sim_extern_variables_globales.h" -#include "antares/solver/variable/state.h" using namespace Yuni; @@ -220,10 +219,9 @@ struct DebugData }; inline void HydroManagement::prepareDailyOptimalGenerations( - Solver::Variable::State& state, - Data::Area& area, - uint y, - Antares::Data::Area::ScratchMap& scratchmap) + Data::Area& area, + uint y, + Antares::Data::Area::ScratchMap& scratchmap) { const auto srcinflows = area.hydro.series->storage.getColumn(y); @@ -546,10 +544,6 @@ inline void HydroManagement::prepareDailyOptimalGenerations( H2O2_J_Free(problem); } - uint firstDaySimu = parameters_.simulationDays.first; - state.problemeHebdo->previousSimulationFinalLevel[area.index] - = ventilationResults.NiveauxReservoirsDebutJours[firstDaySimu] * reservoirCapacity; - if (debugData) { debugData->writeDailyDebugData(calendar_, initReservoirLvlMonth, y, area.name); @@ -557,11 +551,10 @@ inline void HydroManagement::prepareDailyOptimalGenerations( } } -void HydroManagement::prepareDailyOptimalGenerations(Solver::Variable::State& state, - uint y, +void HydroManagement::prepareDailyOptimalGenerations(uint y, Antares::Data::Area::ScratchMap& scratchmap) { areas_.each([&](Data::Area& area) - { prepareDailyOptimalGenerations(state, area, y, scratchmap); }); + { prepareDailyOptimalGenerations(area, y, scratchmap); }); } } // namespace Antares diff --git a/src/solver/hydro/management/management.cpp b/src/solver/hydro/management/management.cpp index 5d8fb79d47..fe9311280d 100644 --- a/src/solver/hydro/management/management.cpp +++ b/src/solver/hydro/management/management.cpp @@ -519,7 +519,6 @@ bool HydroManagement::checksOnGenerationPowerBounds(uint year) const } void HydroManagement::makeVentilation(double* randomReservoirLevel, - Solver::Variable::State& state, uint y, Antares::Data::Area::ScratchMap& scratchmap) { @@ -534,7 +533,7 @@ void HydroManagement::makeVentilation(double* randomReservoirLevel, prepareEffectiveDemand(); prepareMonthlyOptimalGenerations(randomReservoirLevel, y); - prepareDailyOptimalGenerations(state, y, scratchmap); + prepareDailyOptimalGenerations(y, scratchmap); } } // namespace Antares diff --git a/src/solver/simulation/adequacy.cpp b/src/solver/simulation/adequacy.cpp index 5d3a54b261..f4e7f433d7 100644 --- a/src/solver/simulation/adequacy.cpp +++ b/src/solver/simulation/adequacy.cpp @@ -136,6 +136,7 @@ bool Adequacy::year(Progression::Task& progression, currentProblem.year = state.year; PrepareRandomNumbers(study, currentProblem, randomForYear); + SetInitialHydroLevel(study, currentProblem, hydroVentilationResults); state.startANewYear(); diff --git a/src/solver/simulation/common-eco-adq.cpp b/src/solver/simulation/common-eco-adq.cpp index 8abcb0cb98..b413b632d5 100644 --- a/src/solver/simulation/common-eco-adq.cpp +++ b/src/solver/simulation/common-eco-adq.cpp @@ -395,6 +395,23 @@ void PrepareRandomNumbers(Data::Study& study, }); } + +void SetInitialHydroLevel(Data::Study& study, + PROBLEME_HEBDO& problem, + const HYDRO_VENTILATION_RESULTS& hydroVentilationResults) +{ + uint firstDaySimu = study.parameters.simulationDays.first; + study.areas.each([&](Data::Area& area) + { + if (area.hydro.reservoirManagement) + { + double capacity = area.hydro.reservoirCapacity; + problem.previousSimulationFinalLevel[area.index] = + hydroVentilationResults[area.index].NiveauxReservoirsDebutJours[firstDaySimu] * capacity; + } + }); +} + void BuildThermalPartOfWeeklyProblem(Data::Study& study, PROBLEME_HEBDO& problem, const int PasDeTempsDebut, diff --git a/src/solver/simulation/economy.cpp b/src/solver/simulation/economy.cpp index 558c4f2095..0ffdf71d7b 100644 --- a/src/solver/simulation/economy.cpp +++ b/src/solver/simulation/economy.cpp @@ -126,6 +126,7 @@ bool Economy::year(Progression::Task& progression, currentProblem.year = state.year; PrepareRandomNumbers(study, currentProblem, randomForYear); + SetInitialHydroLevel(study, currentProblem, hydroVentilationResults); state.startANewYear(); diff --git a/src/solver/simulation/include/antares/solver/simulation/common-eco-adq.h b/src/solver/simulation/include/antares/solver/simulation/common-eco-adq.h index 2110c4cbe9..14d260af09 100644 --- a/src/solver/simulation/include/antares/solver/simulation/common-eco-adq.h +++ b/src/solver/simulation/include/antares/solver/simulation/common-eco-adq.h @@ -56,6 +56,10 @@ void PrepareRandomNumbers(Data::Study& study, PROBLEME_HEBDO& problem, yearRandomNumbers& randomForYear); +void SetInitialHydroLevel(Data::Study& study, + PROBLEME_HEBDO& problem, + const HYDRO_VENTILATION_RESULTS& hydroVentilationResults); + void BuildThermalPartOfWeeklyProblem(Data::Study& study, PROBLEME_HEBDO& problem, const int PasDeTempsDebut, diff --git a/src/solver/simulation/include/antares/solver/simulation/solver.hxx b/src/solver/simulation/include/antares/solver/simulation/solver.hxx index 70d88c47af..dc2a7d4e09 100644 --- a/src/solver/simulation/include/antares/solver/simulation/solver.hxx +++ b/src/solver/simulation/include/antares/solver/simulation/solver.hxx @@ -172,7 +172,6 @@ public: // 4 - Hydraulic ventilation pDurationCollector("hydro_ventilation") << [&] { hydroManagement.makeVentilation(randomReservoirLevel, - state[numSpace], y, scratchmap); }; From a121c7571a4b6e7fed2904b325aa8127dd25261e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Mon, 10 Jun 2024 10:59:09 +0200 Subject: [PATCH 15/18] Add `/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR` to fix segfault (#2151) --- src/cmake/common-settings.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmake/common-settings.cmake b/src/cmake/common-settings.cmake index b659a5f46c..23326f6158 100644 --- a/src/cmake/common-settings.cmake +++ b/src/cmake/common-settings.cmake @@ -11,7 +11,7 @@ if (NOT WIN32) set(COMMON_GCC_FLAGS "${COMMON_GCC_FLAGS} -Werror=return-type") endif() set(COMMON_MSVC_FLAGS "/W3 /MP4") -set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /we4715 /we4716") #adding no return or no return for all code paths as errors +set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /we4715 /we4716 /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR") #adding no return or no return for all code paths as errors set(ADDITIONAL_C_FLAGS " -Wconversion -Wmissing-prototypes -Wstrict-prototypes") set(ADDITIONAL_C_FLAGS "${ADDITIONAL_C_FLAGS} -Wmissing-noreturn -Wpacked -Wredundant-decls -Wbad-function-cast -W -Wcast-align -Wcast-qual -Wsign-compare -fno-exceptions -Wdeclaration-after-statement") From f1cfbc0a1d3f75928d52a426d536df42aca3e141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Mon, 10 Jun 2024 17:07:22 +0200 Subject: [PATCH 16/18] Remove unused arrays & variables from `RESULTATS_HORAIRES` (#2147) Many `*Up`, `*Down`, `*Any` are unused. Remove them & allocations to simplify code and hopefully reduce memory footprint at runtime. --- .../opt_gestion_des_bornes_cas_lineaire.cpp | 3 -- .../sim_structure_probleme_economique.h | 17 ----------- .../simulation/sim_alloc_probleme_hebdo.cpp | 30 +------------------ 3 files changed, 1 insertion(+), 49 deletions(-) diff --git a/src/solver/optimisation/opt_gestion_des_bornes_cas_lineaire.cpp b/src/solver/optimisation/opt_gestion_des_bornes_cas_lineaire.cpp index dda3b10423..5bdbeef705 100644 --- a/src/solver/optimisation/opt_gestion_des_bornes_cas_lineaire.cpp +++ b/src/solver/optimisation/opt_gestion_des_bornes_cas_lineaire.cpp @@ -471,9 +471,6 @@ void OPT_InitialiserLesBornesDesVariablesDuProblemeLineaire(PROBLEME_HEBDO* prob .ValeursHorairesDeDefaillanceNegative[pdtHebdo]); AdresseOuPlacerLaValeurDesVariablesOptimisees[var] = adresseDuResultat; } - - problemeHebdo->ResultatsHoraires[pays].ValeursHorairesDeDefaillanceEnReserve[pdtHebdo] - = 0.0; } } diff --git a/src/solver/simulation/include/antares/solver/simulation/sim_structure_probleme_economique.h b/src/solver/simulation/include/antares/solver/simulation/sim_structure_probleme_economique.h index 307be5b068..8f74ccb94a 100644 --- a/src/solver/simulation/include/antares/solver/simulation/sim_structure_probleme_economique.h +++ b/src/solver/simulation/include/antares/solver/simulation/sim_structure_probleme_economique.h @@ -250,9 +250,6 @@ struct PDISP_ET_COUTS_HORAIRES_PAR_PALIER std::vector CoutHoraireDeProductionDuPalierThermique; - std::vector CoutHoraireDuPalierThermiqueUp; - std::vector CoutHoraireDuPalierThermiqueDown; - std::vector NombreMaxDeGroupesEnMarcheDuPalierThermique; std::vector NombreMinDeGroupesEnMarcheDuPalierThermique; }; @@ -302,8 +299,6 @@ struct ENERGIES_ET_PUISSANCES_HYDRAULIQUES double PenalisationDeLaVariationDeProductionHydrauliqueSurVariationMax; double WeeklyWaterValueStateRegular; - double WeeklyWaterValueStateUp; - double WeeklyWaterValueStateDown; bool TurbinageEntreBornes; bool SansHeuristique; @@ -405,9 +400,6 @@ struct PRODUCTION_THERMIQUE_OPTIMALE { std::vector ProductionThermiqueDuPalier; - std::vector ProductionThermiqueDuPalierUp; - std::vector ProductionThermiqueDuPalierDown; - std::vector NombreDeGroupesEnMarcheDuPalier; std::vector NombreDeGroupesQuiDemarrentDuPalier; @@ -423,20 +415,11 @@ struct RESULTATS_HORAIRES std::vector ValeursHorairesLmrViolations; // adq patch lmr violations std::vector ValeursHorairesSpilledEnergyAfterCSR; // adq patch spillage after CSR std::vector ValeursHorairesDtgMrgCsr; // adq patch DTG MRG after CSR - std::vector ValeursHorairesDeDefaillancePositiveUp; - std::vector ValeursHorairesDeDefaillancePositiveDown; - std::vector ValeursHorairesDeDefaillancePositiveAny; std::vector ValeursHorairesDeDefaillanceNegative; - std::vector ValeursHorairesDeDefaillanceNegativeUp; - std::vector ValeursHorairesDeDefaillanceNegativeDown; - std::vector ValeursHorairesDeDefaillanceNegativeAny; - std::vector ValeursHorairesDeDefaillanceEnReserve; std::vector PompageHoraire; std::vector TurbinageHoraire; - std::vector TurbinageHoraireUp; - std::vector TurbinageHoraireDown; std::vector niveauxHoraires; std::vector valeurH2oHoraire; diff --git a/src/solver/simulation/sim_alloc_probleme_hebdo.cpp b/src/solver/simulation/sim_alloc_probleme_hebdo.cpp index aa1a5c90e3..860d2b8bfe 100644 --- a/src/solver/simulation/sim_alloc_probleme_hebdo.cpp +++ b/src/solver/simulation/sim_alloc_probleme_hebdo.cpp @@ -387,26 +387,11 @@ void SIM_AllocateAreas(PROBLEME_HEBDO& problem, 0.); // adq patch problem.ResultatsHoraires[k].ValeursHorairesDtgMrgCsr.assign(NombreDePasDeTemps, 0.); // adq patch - problem.ResultatsHoraires[k] - .ValeursHorairesDeDefaillancePositiveUp.assign(NombreDePasDeTemps, 0.); - problem.ResultatsHoraires[k] - .ValeursHorairesDeDefaillancePositiveDown.assign(NombreDePasDeTemps, 0.); - problem.ResultatsHoraires[k] - .ValeursHorairesDeDefaillancePositiveAny.assign(NombreDePasDeTemps, 0.); + problem.ResultatsHoraires[k].ValeursHorairesDeDefaillanceNegative.assign(NombreDePasDeTemps, 0.); - problem.ResultatsHoraires[k] - .ValeursHorairesDeDefaillanceNegativeUp.assign(NombreDePasDeTemps, 0.); - problem.ResultatsHoraires[k] - .ValeursHorairesDeDefaillanceNegativeDown.assign(NombreDePasDeTemps, 0.); - problem.ResultatsHoraires[k] - .ValeursHorairesDeDefaillanceNegativeAny.assign(NombreDePasDeTemps, 0.); - problem.ResultatsHoraires[k] - .ValeursHorairesDeDefaillanceEnReserve.assign(NombreDePasDeTemps, 0.); problem.ResultatsHoraires[k].TurbinageHoraire.assign(NombreDePasDeTemps, 0.); problem.ResultatsHoraires[k].PompageHoraire.assign(NombreDePasDeTemps, 0.); - problem.ResultatsHoraires[k].TurbinageHoraireUp.assign(NombreDePasDeTemps, 0.); - problem.ResultatsHoraires[k].TurbinageHoraireDown.assign(NombreDePasDeTemps, 0.); problem.ResultatsHoraires[k].CoutsMarginauxHoraires.assign(NombreDePasDeTemps, 0.); problem.ResultatsHoraires[k].niveauxHoraires.assign(NombreDePasDeTemps, 0.); problem.ResultatsHoraires[k].valeurH2oHoraire.assign(NombreDePasDeTemps, 0.); @@ -438,25 +423,12 @@ void SIM_AllocateAreas(PROBLEME_HEBDO& problem, problem.PaliersThermiquesDuPays[k] .PuissanceDisponibleEtCout[j] .NombreMinDeGroupesEnMarcheDuPalierThermique.assign(NombreDePasDeTemps, 0); - - problem.PaliersThermiquesDuPays[k] - .PuissanceDisponibleEtCout[j] - .CoutHoraireDuPalierThermiqueUp.assign(NombreDePasDeTemps, 0.); - problem.PaliersThermiquesDuPays[k] - .PuissanceDisponibleEtCout[j] - .CoutHoraireDuPalierThermiqueDown.assign(NombreDePasDeTemps, 0.); } for (unsigned j = 0; j < NombreDePasDeTemps; j++) { problem.ResultatsHoraires[k].ProductionThermique[j].ProductionThermiqueDuPalier.assign( nbPaliers, 0.); - problem.ResultatsHoraires[k] - .ProductionThermique[j] - .ProductionThermiqueDuPalierUp.assign(nbPaliers, 0.); - problem.ResultatsHoraires[k] - .ProductionThermique[j] - .ProductionThermiqueDuPalierDown.assign(nbPaliers, 0.); problem.ResultatsHoraires[k] .ProductionThermique[j] .NombreDeGroupesEnMarcheDuPalier.assign(nbPaliers, 0.); From 7b9a058ef400c9551e1a82fccb29a104ffdbbf57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Tue, 11 Jun 2024 15:10:37 +0200 Subject: [PATCH 17/18] Use sirius-solver@antares-integration-v1.5 (#2148) https://github.com/rte-france/sirius-solver/releases/tag/antares-integration-v1.5 --- src/ports/sirius-solver/portfile.cmake | 4 ++-- src/ports/sirius-solver/vcpkg.json | 2 +- src/vcpkg.json | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ports/sirius-solver/portfile.cmake b/src/ports/sirius-solver/portfile.cmake index 30cce62622..287994c152 100644 --- a/src/ports/sirius-solver/portfile.cmake +++ b/src/ports/sirius-solver/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "rte-france/sirius-solver" - REF "antares-integration-v1.4" - SHA512 1eecb351b32490a82a2f93bf91e77ea4fd55cffc92c466b4136314e70d8a70328e4fda5257a46c08c431fd7013475050bc3908fcedee4fbdd746ed1ab6cb0efd + REF "antares-integration-v1.5" + SHA512 19c6c156861bdeb58c2f17f703124d52020c79f9b81734057bf1bc5dff3dbc464179f99aeab6c8c44a84de1f84ed8f4929f9a919d2bf8bd49ac737f656088e19 HEAD_REF main ) diff --git a/src/ports/sirius-solver/vcpkg.json b/src/ports/sirius-solver/vcpkg.json index 8e4a0a36df..ded804499d 100644 --- a/src/ports/sirius-solver/vcpkg.json +++ b/src/ports/sirius-solver/vcpkg.json @@ -1,6 +1,6 @@ { "name": "sirius-solver", - "version": "1.4", + "version": "1.5", "port-version": 0, "description": "Sirius solver", "dependencies": [ diff --git a/src/vcpkg.json b/src/vcpkg.json index 011ede41ad..fdd3963fd5 100644 --- a/src/vcpkg.json +++ b/src/vcpkg.json @@ -12,7 +12,8 @@ }, "dependencies": [ { - "name": "sirius-solver" + "name": "sirius-solver", + "version>=": "1.5" }, { "name": "wxwidgets", From 9cde7e57b64c07984b06894fb9fae31b47c162b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Tue, 11 Jun 2024 15:17:00 +0200 Subject: [PATCH 18/18] Add precision on `playlist_year +/-` properties (generaldata.ini) (#2156) --- docs/user-guide/solver/04-parameters.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/user-guide/solver/04-parameters.md b/docs/user-guide/solver/04-parameters.md index efe0e44ad4..bd46430336 100644 --- a/docs/user-guide/solver/04-parameters.md +++ b/docs/user-guide/solver/04-parameters.md @@ -792,13 +792,15 @@ They are **required** if [user-playlist](#user-playlist) is set to `true`. --- #### playlist_year - **Expected value:** `+ =` or `- =`, followed by a positive integer (example: `playlist_year + = 5`) -- **Required:** **yes**, if [user-playlist](#user-playlist) is set to `true`. +- **Required:** **yes**, if [user-playlist](#user-playlist) is set to `true`, ignored otherwise. - **Usage:** - for every Monte-Carlo year that you want the Antares Simulator to **study**, add the parameter entry `playlist_year + = i`, where `i` is the index of the year. - for every Monte-Carlo year that you want the Antares Simulator to **skip**, add the parameter entry `playlist_year - = i`, where `i` is the index of the year. +_Please note that by convention, the first year has index 0._ + --- #### playlist_year_weight [//]: # (TODO: document this parameter)