Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/8.7.0 #1619

Merged
merged 8 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 16 additions & 50 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -74,39 +63,16 @@ 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)
--------------------
## Bugfixes
* Fix major bug related to short-term storage & MRG. PRICE (#1377)


8.6.0 (06/2023)
--------------------
## New features
Expand Down
8 changes: 4 additions & 4 deletions docs/reference-guide/13-file-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 2 additions & 0 deletions src/libs/antares/study/area/list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
30 changes: 5 additions & 25 deletions src/libs/antares/study/parts/common/cluster_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,17 +368,17 @@ int ClusterList<ClusterT>::saveDataSeriesToFolder(const AnyString& folder, const
return ret;
}

template<>
int ClusterList<ThermalCluster>::loadDataSeriesFromFolder(Study& s,
const StudyLoadOptions& options,
const AnyString& folder)
template<class ClusterT>
int ClusterList<ClusterT>::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;

Expand All @@ -388,26 +388,6 @@ int ClusterList<ThermalCluster>::loadDataSeriesFromFolder(Study& s,
return ret;
}

template<>
int ClusterList<RenewableCluster>::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<class ClusterT>
void ClusterList<ClusterT>::ensureDataTimeSeries()
{
Expand Down
69 changes: 46 additions & 23 deletions src/libs/antares/study/parts/thermal/cluster_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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
3 changes: 3 additions & 0 deletions src/libs/antares/study/parts/thermal/cluster_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ class ThermalClusterList : public ClusterList<ThermalCluster>
*/
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
Expand Down