diff --git a/src/solver/variable/economy/profitByPlant.h b/src/solver/variable/economy/profitByPlant.h index 38a2db730f..e977716f5a 100644 --- a/src/solver/variable/economy/profitByPlant.h +++ b/src/solver/variable/economy/profitByPlant.h @@ -303,10 +303,10 @@ class ProfitByPlant : public Variable::IVariable, NextT, VC auto* cluster = state.area->thermal.clusters[clusterIndex]; double hourlyClusterProduction = thermal[area->index].thermalClustersProductions[clusterIndex]; - double pMin = thermal[area->index].PMinOfClusters[clusterIndex]; + // Thermal cluster profit pValuesForTheCurrentYear[numSpace][cluster->areaWideIndex].hour[hourInTheYear] - = (hourlyClusterProduction - pMin) + = std::max((hourlyClusterProduction - cluster->PthetaInf[hourInTheYear]), 0.) * (-areaMarginalCosts[hourInTheWeek] - cluster->marginalCost * cluster->modulation[Data::thermalModulationCost][hourInTheYear]);