Skip to content

Commit

Permalink
Correcting bug with the initialisation of hydro costs
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvmara committed Oct 16, 2024
1 parent 5b22c91 commit bce2257
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/solver/variable/include/antares/solver/variable/state.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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.;
Expand Down

0 comments on commit bce2257

Please sign in to comment.