diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a1387c3c4c..fa88e14d54 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,21 +1,29 @@ Antares Changelog ================= -8.7.0-rc2 (08/2023) +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 * Write full command-line instead of solver location in logs (#1518) +## Packages +* Give Oracle Linux 8 assets a proper name instead of "unknown" (#1438) +* Don't build tools (study-updater, etc.) by default (#1442) + ## Bugfixes -* Fix invalid study after update to v8.7.0 - Add default group to existing BCs (#1462) -* Fix incomplete check on constraint group (#1461) -* Handle case when a binding constraint group in scenariobuilder.dat does not match any group of the study (#1480) -* Fix error when fetching Antares_test submodule (#1456) * 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 -* Thermal price definition (RTEi's -> CR20) - UI remarks from Paul (#1485) +* Thermal price definition (RTEi's -> CR20) - UI (#1485) ## Docs * Fix possible values for ST storage (#1455) @@ -24,7 +32,7 @@ Antares Changelog * Add named MPS tests (#1408) * Enforce better unit test isolation (#1486) * Add tests for Windows CI when job is scheduled (#1483) -* Improve unit tests for CR20 (#1422) +* Tests for CR20: thermal price definition (#1364), improvements (#1422) ## For developers * Remove platform-specific headers (#1523) @@ -47,25 +55,6 @@ Antares Changelog * Memory allocation for ProblemeAResoudre, use std::vector (#1432) * Improve clarity for constraints that should be used (#1452) * Automatically include yuni include directory in dependents (#1525) - -8.7.0-rc1 (07/2023) --------------------- -## Features -* Implement --mps-export command-line option (#1404) -* Backport [v8.4.3](#v843-082023) changes - -## Bugfixes -* Fix segfault, add !skipped to enabled constraints (#1441) -* Use local index for thermal cluster instead of global one (#1448) -* Only add "active" thermal clusters in binding constraints (#1447) -* Add cluster name for 6 constraints associated to unit-commitment = accurate (#1426) -* Fix size for assign / resize - too much memory was allocated (#1443) - -## Packages -* Give Oracle Linux 8 assets a proper name instead of "unknown" (#1438) -* Don't build tools (study-updater, etc.) by default (#1442) - -## For developers * Clarify logs & code in case of "failed year" (#1450) * Remove two static functions (#1440) * Avoid copies using std::move (#1445) @@ -74,31 +63,9 @@ Antares Changelog * Named MPS: factorize variable & constraint namers (#1409) * Array, logs jit and correlation in makefile (#1410) -## Tests -* Tests for CR20: thermal price definition (#1364) - -8.7.0-beta3 (07/2023) --------------------- -## Bugfixes -* Fix MPS differences related to int/unsigned surprises (#1417) - -8.7.0-beta2 (07/2023) --------------------- -## Bugfixes -* Fix order for binding constraints of type "both" (#1413) - -8.7.0-beta1 (07/2023) --------------------- -## New features -* Binding constraint RHS scenarization (#1219) -* Name constraints & variables in MPS files (#1294) -* Thermal price definition (contributed by RTE-i, #1272) - -TODO: bugfix, code cleaning, etc. - -------------------- # v8.6.2 (08/2023) - +## Bugfixes * Backport [v8.4.3](#v843-082023) changes 8.6.1 (06/2023) @@ -106,7 +73,6 @@ TODO: bugfix, code cleaning, etc. ## Bugfixes * Fix major bug related to short-term storage & MRG. PRICE (#1377) - 8.6.0 (06/2023) -------------------- ## New features diff --git a/docs/reference-guide/13-file-format.md b/docs/reference-guide/13-file-format.md index 4275ae30d3..116ebfde11 100644 --- a/docs/reference-guide/13-file-format.md +++ b/docs/reference-guide/13-file-format.md @@ -24,11 +24,11 @@ This line is not mandatory for every group & MC year. If absent, the TS number w #### Thermal cluster new properties For each thermal cluster, in existing file **input/thermal/clusters/<area>/list.ini**, under existing sections **<cluster>**, following properties added: -* `costgeneration` [string] can take values `useCostTimeseries` or be excluded from the section if `Set manually` is selected (default behavior). -* `efficiency` [float] excluded from the section if default value 100 is selected (default behavior). -* `variableomcost` [float] excluded from the section if default value 0 is selected (default behavior). +* `costgeneration` [string] can take values `useCostTimeseries` or be excluded from the section if `SetManually` is selected (default behavior). +* `efficiency` [float] between 0-100 (default = 100). Unit is "percentage". +* `variableomcost` [float] excluded from the section if default value 0 is selected (default behavior). Unit is Euro / MWh -For each thermal cluster, new files added **input/thermal/prepro/<area>/<cluster>/CO2Cost.txt** and **input/thermal/series/<area>/<cluster>/fuelCost.txt**. **fuelCost.txt** and **CO2Cost.txt** must either have one column, or the same number of columns as existing file **series.txt** (availability) +For each thermal cluster, new files added **input/thermal/series/<area>/<cluster>/CO2Cost.txt** and **input/thermal/series/<area>/<cluster>/fuelCost.txt**. **fuelCost.txt** and **CO2Cost.txt** must either have one column, or the same number of columns as existing file **series.txt** (availability). The number of rows for these new matrices is 8760. ### Output #### Scenarized RHS for binding constraints diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6fa040c98c..077445d3b7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,7 +7,7 @@ set(ANTARES_VERSION_REVISION 0) # Beta release set(ANTARES_BETA 0) -set(ANTARES_RC 2) +set(ANTARES_RC 0) set(ANTARES_VERSION_YEAR 2023) diff --git a/src/libs/antares/study/area/list.cpp b/src/libs/antares/study/area/list.cpp index 53f1c40f5c..1e7d617b59 100644 --- a/src/libs/antares/study/area/list.cpp +++ b/src/libs/antares/study/area/list.cpp @@ -280,6 +280,7 @@ static bool AreaListSaveToFolderSingleArea(const Area& area, Clob& buffer, const ret = area.thermal.list.savePreproToFolder(buffer) && ret; buffer.clear() << folder << SEP << "input" << SEP << "thermal" << SEP << "series"; ret = area.thermal.list.saveDataSeriesToFolder(buffer) && ret; + ret = area.thermal.list.saveEconomicCosts(buffer) && ret; } // Renewable cluster list @@ -936,6 +937,7 @@ static bool AreaListLoadFromFolderSingleArea(Study& study, ret = area.thermal.list.loadPreproFromFolder(study, options, buffer) && ret; buffer.clear() << study.folderInput << SEP << "thermal" << SEP << "series"; ret = area.thermal.list.loadDataSeriesFromFolder(study, options, buffer) && ret; + ret = area.thermal.list.loadEconomicCosts(study, buffer) && ret; // In adequacy mode, all thermal clusters must be in 'mustrun' mode if (study.usedByTheSolver && study.parameters.mode == stdmAdequacy) diff --git a/src/libs/antares/study/parts/common/cluster_list.cpp b/src/libs/antares/study/parts/common/cluster_list.cpp index b28b495d78..6f5b85dbc4 100644 --- a/src/libs/antares/study/parts/common/cluster_list.cpp +++ b/src/libs/antares/study/parts/common/cluster_list.cpp @@ -368,17 +368,17 @@ int ClusterList::saveDataSeriesToFolder(const AnyString& folder, const return ret; } -template<> -int ClusterList::loadDataSeriesFromFolder(Study& s, - const StudyLoadOptions& options, - const AnyString& folder) +template +int ClusterList::loadDataSeriesFromFolder(Study& s, + const StudyLoadOptions& options, + const AnyString& folder) { if (empty()) return 1; int ret = 1; - each([&ret, &options, &s, &folder](ThermalCluster& c) { + each([&](ClusterT& c) { if (c.series) ret = c.loadDataSeriesFromFolder(s, folder) and ret; @@ -388,26 +388,6 @@ int ClusterList::loadDataSeriesFromFolder(Study& s, return ret; } -template<> -int ClusterList::loadDataSeriesFromFolder(Study& s, - const StudyLoadOptions& options, - const AnyString& folder) -{ - if (empty()) - return 1; - - int ret = 1; - - each([&](Cluster& cluster) { - if (cluster.series) - ret = cluster.loadDataSeriesFromFolder(s, folder) and ret; - - ++options.progressTicks; - options.pushProgressLogs(); - }); - return ret; -} - template void ClusterList::ensureDataTimeSeries() { diff --git a/src/libs/antares/study/parts/thermal/cluster_list.cpp b/src/libs/antares/study/parts/thermal/cluster_list.cpp index 6d41613f93..6368e167e0 100644 --- a/src/libs/antares/study/parts/thermal/cluster_list.cpp +++ b/src/libs/antares/study/parts/thermal/cluster_list.cpp @@ -445,18 +445,29 @@ bool ThermalClusterList::savePreproToFolder(const AnyString& folder) const Clob buffer; bool ret = true; - each([&](const Data::ThermalCluster& c) { + each([&](const ThermalCluster& c) { if (c.prepro) { assert(c.parentArea and "cluster: invalid parent area"); buffer.clear() << folder << SEP << c.parentArea->id << SEP << c.id(); ret = c.prepro->saveToFolder(buffer) and ret; } - { - assert(c.parentArea and "cluster: invalid parent area"); - buffer.clear() << folder << SEP << c.parentArea->id << SEP << c.id(); - ret = c.ecoInput.saveToFolder(buffer) && ret; - } + }); + return ret; +} + +bool ThermalClusterList::saveEconomicCosts(const AnyString& folder) const +{ + if (empty()) + return true; + + Clob buffer; + bool ret = true; + + each([&](const ThermalCluster& c) { + assert(c.parentArea and "cluster: invalid parent area"); + buffer.clear() << folder << SEP << c.parentArea->id << SEP << c.id(); + ret = c.ecoInput.saveToFolder(buffer) && ret; }); return ret; } @@ -474,39 +485,51 @@ bool ThermalClusterList::loadPreproFromFolder(Study& study, Clob buffer; bool ret = true; - for (auto it = begin(); it != end(); ++it) + for (auto& [name, c] : cluster) { - auto& c = *(it->second); - if (c.prepro) + if (c->prepro) { - assert(c.parentArea and "cluster: invalid parent area"); - buffer.clear() << folder << SEP << c.parentArea->id << SEP << c.id(); + assert(c->parentArea and "cluster: invalid parent area"); + buffer.clear() << folder << SEP << c->parentArea->id << SEP << c->id(); - bool result = c.prepro->loadFromFolder(study, buffer); + bool result = c->prepro->loadFromFolder(study, buffer); - if (result && study.usedByTheSolver && c.doWeGenerateTS(globalThermalTSgeneration)) + if (result && study.usedByTheSolver && c->doWeGenerateTS(globalThermalTSgeneration)) { // checking NPO max - result = c.prepro->normalizeAndCheckNPO(); + result = c->prepro->normalizeAndCheckNPO(); } ret = result and ret; } - { - assert(c.parentArea and "cluster: invalid parent area"); - buffer.clear() << folder << SEP << c.parentArea->id << SEP << c.id(); - - bool result = c.ecoInput.loadFromFolder(study, buffer); - c.ComputeCostTimeSeries(); - - ret = result && ret; - } ++options.progressTicks; options.pushProgressLogs(); } return ret; } + +bool ThermalClusterList::loadEconomicCosts(Study& study, const AnyString& folder) +{ + if (empty()) + return true; + + Clob buffer; + bool ret = true; + + for (auto& [name, c] : cluster) + { + assert(c->parentArea and "cluster: invalid parent area"); + buffer.clear() << folder << SEP << c->parentArea->id << SEP << c->id(); + + bool result = c->ecoInput.loadFromFolder(study, buffer); + c->ComputeCostTimeSeries(); + + ret = result && ret; + } + return ret; +} + } // namespace Data } // namespace Antares diff --git a/src/libs/antares/study/parts/thermal/cluster_list.h b/src/libs/antares/study/parts/thermal/cluster_list.h index e84849d8a6..1d15b028a9 100644 --- a/src/libs/antares/study/parts/thermal/cluster_list.h +++ b/src/libs/antares/study/parts/thermal/cluster_list.h @@ -82,7 +82,10 @@ class ThermalClusterList : public ClusterList */ bool loadPreproFromFolder(Study& s, const StudyLoadOptions& options, const AnyString& folder); + bool loadEconomicCosts(Study& s, const AnyString& folder); + bool savePreproToFolder(const AnyString& folder) const; + bool saveEconomicCosts(const AnyString& folder) const; bool saveToFolder(const AnyString& folder) const override; }; // class ThermalClusterList