Skip to content

Commit

Permalink
Fix output variable PROFIT for thermal clusters (#1767)
Browse files Browse the repository at this point in the history
* [DEV] Set thetaInf value to match constraint value

* [DEV] Revert thetainf changes

* [DEV] Add pmin to thermal cluster

* [DEV] Add pmin to resultatsHoraires

* [DEV] Add move pmin to PRODUCTION_THERMIQUE_OPTIMAL

* [DEV] Use PuissanceMinDuPalierThermique

* [DEV] Check if PuissanceDisponibleEtCout is empty

* [DEV] if syntax

* [DEV] use PMinOfClusters

* [DEV] Clean comments

* [DEV] use PuissanceMinDuPalierThermique

* Revert "[DEV] use PuissanceMinDuPalierThermique"

This reverts commit 8580847.

---------

Co-authored-by: Florian OMNES <[email protected]>
  • Loading branch information
payetvin and flomnes authored Nov 20, 2023
1 parent 4c9b101 commit 121f947
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/solver/simulation/sim_alloc_probleme_hebdo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,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);

Expand Down
1 change: 0 additions & 1 deletion src/solver/simulation/sim_structure_probleme_economique.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ struct PRODUCTION_THERMIQUE_OPTIMALE
std::vector<double> NombreDeGroupesQuiSArretentDuPalier;

std::vector<double> NombreDeGroupesQuiTombentEnPanneDuPalier;

};

struct RESULTATS_HORAIRES
Expand Down
4 changes: 3 additions & 1 deletion src/solver/variable/economy/profitByPlant.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,12 @@ class ProfitByPlant : public Variable::IVariable<ProfitByPlant<NextT>, NextT, VC
auto* cluster = state.area->thermal.clusters[clusterIndex];
double hourlyClusterProduction
= thermal[area->index].thermalClustersProductions[clusterIndex];
double pMin = thermal[area->index].PMinOfClusters[clusterIndex];
uint tsIndex = cluster->series.timeseriesNumbers[0][state.year];

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

0 comments on commit 121f947

Please sign in to comment.