Skip to content

Commit

Permalink
Fix formula use in output var Profit by plant [ANT-1719] (#2097)
Browse files Browse the repository at this point in the history
Co-authored-by: Florian OMNES <26088210+flomnes@users.noreply.github.com>
Co-authored-by: Florian Omnès <florian.omnes@rte-france.com>
  • Loading branch information
3 people committed May 22, 2024
1 parent d29f976 commit d2066ab
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,11 @@ class ProfitByPlant: public Variable::IVariable<ProfitByPlant<NextT>, NextT, VCa
{
double hourlyClusterProduction = thermal[area->index]
.thermalClustersProductions[cluster->areaWideIndex];
double pMin = thermal[area->index].PMinOfClusters[cluster->areaWideIndex];
uint tsIndex = cluster->series.timeseriesNumbers[state.year];

// Thermal cluster profit
pValuesForTheCurrentYear[numSpace][cluster->areaWideIndex].hour[hourInTheYear]
= (hourlyClusterProduction - pMin)
= std::max((hourlyClusterProduction - cluster->PthetaInf[hourInTheYear]), 0.)
* (-areaMarginalCosts[hourInTheWeek]
- cluster->getMarginalCost(tsIndex, hourInTheYear));
}
Expand Down

0 comments on commit d2066ab

Please sign in to comment.