diff --git a/src/libs/antares/study/include/antares/study/parts/hydro/container.h b/src/libs/antares/study/include/antares/study/parts/hydro/container.h index 8b8533da8c..b7a2c3c5b0 100644 --- a/src/libs/antares/study/include/antares/study/parts/hydro/container.h +++ b/src/libs/antares/study/include/antares/study/parts/hydro/container.h @@ -225,6 +225,7 @@ class PartHydro std::vector> deltaBetweenFinalAndInitialLevels; double overflowCost = 0.; + double levelCost = 0.; private: static bool checkReservoirLevels(const Study& study); diff --git a/src/libs/antares/study/parts/hydro/container.cpp b/src/libs/antares/study/parts/hydro/container.cpp index 06cb68ec1e..7e902ffa5f 100644 --- a/src/libs/antares/study/parts/hydro/container.cpp +++ b/src/libs/antares/study/parts/hydro/container.cpp @@ -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")), @@ -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")) { } }; @@ -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 diff --git a/src/solver/simulation/include/antares/solver/simulation/sim_structure_probleme_economique.h b/src/solver/simulation/include/antares/solver/simulation/sim_structure_probleme_economique.h index 65b16ead38..45b82933f1 100644 --- a/src/solver/simulation/include/antares/solver/simulation/sim_structure_probleme_economique.h +++ b/src/solver/simulation/include/antares/solver/simulation/sim_structure_probleme_economique.h @@ -429,6 +429,7 @@ struct PROBLEME_HEBDO std::vector CoutDeDefaillanceEnReserve; std::vector CoutDeDebordement; + std::vector CoutDeRemplissage; std::vector PaliersThermiquesDuPays; std::vector CaracteristiquesHydrauliques; diff --git a/src/solver/simulation/sim_alloc_probleme_hebdo.cpp b/src/solver/simulation/sim_alloc_probleme_hebdo.cpp index 7d13891ec9..5abc2f93d6 100644 --- a/src/solver/simulation/sim_alloc_probleme_hebdo.cpp +++ b/src/solver/simulation/sim_alloc_probleme_hebdo.cpp @@ -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); diff --git a/src/solver/simulation/sim_calcul_economique.cpp b/src/solver/simulation/sim_calcul_economique.cpp index 1204065ade..f4b3f2f8c9 100644 --- a/src/solver/simulation/sim_calcul_economique.cpp +++ b/src/solver/simulation/sim_calcul_economique.cpp @@ -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;