diff --git a/src/solver/simulation/sim_alloc_probleme_hebdo.cpp b/src/solver/simulation/sim_alloc_probleme_hebdo.cpp index b35d3f8b34..60ec2b21df 100644 --- a/src/solver/simulation/sim_alloc_probleme_hebdo.cpp +++ b/src/solver/simulation/sim_alloc_probleme_hebdo.cpp @@ -459,6 +459,7 @@ void SIM_AllocateAreas(PROBLEME_HEBDO& problem, .assign(NombreDePasDeTemps, 0.); problem.ResultatsHoraires[k].debordementsHoraires .assign(NombreDePasDeTemps, 0.); + problem.PaliersThermiquesDuPays[k].PuissanceDisponibleEtCout.resize(nbPaliers); problem.ResultatsHoraires[k].ProductionThermique.resize(NombreDePasDeTemps); diff --git a/src/solver/simulation/sim_structure_probleme_economique.h b/src/solver/simulation/sim_structure_probleme_economique.h index 49c620d868..e3d334103a 100644 --- a/src/solver/simulation/sim_structure_probleme_economique.h +++ b/src/solver/simulation/sim_structure_probleme_economique.h @@ -423,7 +423,6 @@ struct PRODUCTION_THERMIQUE_OPTIMALE std::vector NombreDeGroupesQuiSArretentDuPalier; std::vector NombreDeGroupesQuiTombentEnPanneDuPalier; - }; struct RESULTATS_HORAIRES diff --git a/src/solver/variable/economy/profitByPlant.h b/src/solver/variable/economy/profitByPlant.h index 5f28f9306c..ed16d434c0 100644 --- a/src/solver/variable/economy/profitByPlant.h +++ b/src/solver/variable/economy/profitByPlant.h @@ -304,9 +304,11 @@ class ProfitByPlant : public Variable::IVariable, NextT, VC double hourlyClusterProduction = thermal[area->index].thermalClustersProductions[clusterIndex]; uint tsIndex = state.timeseriesIndex->ThermiqueParPalier[cluster->areaWideIndex]; + double pMin = thermal[area->index].PMinOfClusters[clusterIndex]; + // Thermal cluster profit pValuesForTheCurrentYear[numSpace][cluster->areaWideIndex].hour[hourInTheYear] - = (hourlyClusterProduction - cluster->PthetaInf[hourInTheYear]) + = (hourlyClusterProduction - pMin) * (-areaMarginalCosts[hourInTheWeek] - cluster->getMarginalCost(tsIndex, hourInTheYear)); }