From bce2257d81d77c656821039ff7c0b0da808aa4fa Mon Sep 17 00:00:00 2001 From: sylvmara Date: Wed, 16 Oct 2024 11:38:58 +0200 Subject: [PATCH] Correcting bug with the initialisation of hydro costs --- .../include/antares/solver/variable/state.hxx | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/solver/variable/include/antares/solver/variable/state.hxx b/src/solver/variable/include/antares/solver/variable/state.hxx index e5dcdd56e4..b2cae353da 100644 --- a/src/solver/variable/include/antares/solver/variable/state.hxx +++ b/src/solver/variable/include/antares/solver/variable/state.hxx @@ -42,18 +42,15 @@ inline void State::startANewYear() 0, sizeof(thermalClusterDispatchedUnitsCountForYear)); - if (unitCommitmentMode != Antares::Data::UnitCommitmentMode::ucHeuristicFast) - { - memset(thermalClusterReserveParticipationCostForYear, - 0, - sizeof(thermalClusterNonProportionalCostForYear)); - memset(STStorageClusterReserveParticipationCostForYear, - 0, - sizeof(STStorageClusterReserveParticipationCostForYear)); - memset(LTStorageClusterReserveParticipationCostForYear, - 0, - sizeof(LTStorageClusterReserveParticipationCostForYear)); - } + memset(thermalClusterReserveParticipationCostForYear, + 0, + sizeof(thermalClusterNonProportionalCostForYear)); + memset(STStorageClusterReserveParticipationCostForYear, + 0, + sizeof(STStorageClusterReserveParticipationCostForYear)); + memset(LTStorageClusterReserveParticipationCostForYear, + 0, + sizeof(LTStorageClusterReserveParticipationCostForYear)); // Re-initializing annual costs (to be printed in output into separate files) annualSystemCost = 0.;