Skip to content

Commit

Permalink
Cout de remplissage
Browse files Browse the repository at this point in the history
  • Loading branch information
OMNES Florian committed Sep 12, 2024
1 parent 69d4ef7 commit 792b1f6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ class PartHydro
std::vector<std::optional<double>> deltaBetweenFinalAndInitialLevels;

double overflowCost = 0.;
double levelCost = 0.;

private:
static bool checkReservoirLevels(const Study& study);
Expand Down
8 changes: 7 additions & 1 deletion src/libs/antares/study/parts/hydro/container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ bool PartHydro::SaveToFolder(const AreaList& areas, const AnyString& folder)
IniFile::Section* sLeewayUp;
IniFile::Section* spumpingEfficiency;
IniFile::Section* sOverflowCost;
IniFile::Section* sLevelCost;

AllSections(IniFile& ini):
s(ini.addSection("inter-daily-breakdown")),
Expand All @@ -526,7 +527,8 @@ bool PartHydro::SaveToFolder(const AreaList& areas, const AnyString& folder)
sLeewayLow(ini.addSection("leeway low")),
sLeewayUp(ini.addSection("leeway up")),
spumpingEfficiency(ini.addSection("pumping efficiency")),
sOverflowCost(ini.addSection("overflow cost"))
sOverflowCost(ini.addSection("overflow cost")),
sLevelCost(ini.addSection("level cost"))
{
}
};
Expand Down Expand Up @@ -586,6 +588,10 @@ bool PartHydro::SaveToFolder(const AreaList& areas, const AnyString& folder)
{
allSections.sOverflowCost->add(area.id, area.hydro.overflowCost);
}
if (area.hydro.levelCost)
{
allSections.sLevelCost->add(area.id, area.hydro.overflowCost);
}

// max hours gen
buffer.clear() << folder << SEP << "common" << SEP << "capacity" << SEP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ struct PROBLEME_HEBDO
std::vector<double> CoutDeDefaillanceEnReserve;

std::vector<double> CoutDeDebordement;
std::vector<double> CoutDeRemplissage;

std::vector<PALIERS_THERMIQUES> PaliersThermiquesDuPays;
std::vector<ENERGIES_ET_PUISSANCES_HYDRAULIQUES> CaracteristiquesHydrauliques;
Expand Down
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 @@ -87,6 +87,7 @@ void SIM_AllocationProblemeDonneesGenerales(PROBLEME_HEBDO& problem,
problem.CoutDeDefaillanceEnReserve.assign(nbPays, 0);

problem.CoutDeDebordement.assign(nbPays, 0);
problem.CoutDeRemplissage.assign(nbPays, 0);

problem.NumeroDeContrainteEnergieHydraulique.assign(nbPays, 0);
problem.NumeroDeContrainteMinEnergieHydraulique.assign(nbPays, 0);
Expand Down
1 change: 1 addition & 0 deletions src/solver/simulation/sim_calcul_economique.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ void SIM_InitialisationProblemeHebdo(Data::Study& study,
problem.CoutDeDefaillanceNegative[i] = area.thermal.spilledEnergyCost;

problem.CoutDeDebordement[i] = area.hydro.overflowCost;
problem.CoutDeRemplissage[i] = area.hydro.levelCost;

problem.CoutDeDefaillanceEnReserve[i] = area.thermal.unsuppliedEnergyCost;

Expand Down

0 comments on commit 792b1f6

Please sign in to comment.