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

Fix output variable profit #1767

Merged
merged 12 commits into from
Nov 20, 2023
1 change: 1 addition & 0 deletions src/libs/antares/study/parts/thermal/cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Data::ThermalCluster::ThermalCluster(Area* parent) :
forcedLaw(thermalLawUniform),
plannedLaw(thermalLawUniform),
PthetaInf(HOURS_PER_YEAR, 0),
pMin(HOURS_PER_YEAR, 0),
costsTimeSeries(1, CostsTimeSeries())
{
// assert
Expand Down
1 change: 1 addition & 0 deletions src/libs/antares/study/parts/thermal/cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ class ThermalCluster final : public Cluster, public std::enable_shared_from_this
** PthetaInf[hour]
*/
std::vector<double> PthetaInf;
mutable std::vector<double> pMin;

//! Data for the preprocessor
PreproThermal* prepro = nullptr;
Expand Down
3 changes: 3 additions & 0 deletions src/libs/antares/study/study.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1536,8 +1536,11 @@ void Study::computePThetaInfForThermalClusters() const
// Alias du cluster courant
auto& cluster = area.thermal.list.byIndex[j];
for (uint k = 0; k < HOURS_PER_YEAR; k++)
{
cluster->PthetaInf[k] = cluster->modulation[Data::thermalMinGenModulation][k]
* cluster->unitCount * cluster->nominalCapacity;
cluster->pMin[k] = cluster->PthetaInf[k];
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/solver/simulation/common-eco-adq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ void BuildThermalPartOfWeeklyProblem(Data::Study& study,
= (Pt.PuissanceDisponibleDuPalierThermique[hourInWeek] < cluster.PthetaInf[hourInYear])
? Pt.PuissanceDisponibleDuPalierThermique[hourInWeek]
: cluster.PthetaInf[hourInYear];
cluster.pMin[hourInYear] = Pt.PuissanceMinDuPalierThermique[hourInWeek];
});
}
}
Expand Down