Skip to content

Commit

Permalink
Ignores reserves when thermal cluster is mustrun, but puts a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvmara committed Dec 11, 2024
1 parent 80e6f34 commit 55a216c
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions src/libs/antares/study/parts/common/cluster_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,30 @@ bool ClusterList<ClusterT>::loadReserveParticipations(Area& area, const std::fil
auto cluster = area.thermal.list.getClusterByName(tmpClusterName);
if (reserve && cluster)
{
ThermalClusterReserveParticipation tmpReserveParticipation{reserve.value(),
tmpMaxPower,
tmpParticipationCost,
tmpMaxPowerOff,
tmpParticipationCostOff};
cluster.value().get()->addReserveParticipation(section.name, tmpReserveParticipation);
bool isClusterMustRun = false;
for (const auto& clusterMustRun : area.thermal.list.each_mustrun_and_enabled())
{
if (clusterMustRun->id() == cluster.value().get()->id())
{
isClusterMustRun = true;
break;
}
}
if (!isClusterMustRun)
{
ThermalClusterReserveParticipation tmpReserveParticipation{ reserve.value(),
tmpMaxPower,
tmpParticipationCost,
tmpMaxPowerOff,
tmpParticipationCostOff };


cluster.value().get()->addReserveParticipation(section.name, tmpReserveParticipation);
}
else
{
logs.warning() << area.name << " : " << tmpClusterName << " is mustrun and is participating in capacity reservation " << section.name << ", ignored.";
}
}
else
{
Expand Down

0 comments on commit 55a216c

Please sign in to comment.