diff --git a/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByDispatchableOffUnitsPlant.h b/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByDispatchableOffUnitsPlant.h index 6e20d3afa7..3310663ad2 100644 --- a/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByDispatchableOffUnitsPlant.h +++ b/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByDispatchableOffUnitsPlant.h @@ -106,7 +106,7 @@ class ReserveParticipationByDispatchableOffUnitsPlant pNbYearsParallel = study->maxNbYearsInParallel; pValuesForTheCurrentYear = new VCardType::IntermediateValuesBaseType[pNbYearsParallel]; - // Get the area + // Get the number of Onthermal reserveParticipations pSize = area->thermal.list.reserveParticipationsCount(); if (pSize) diff --git a/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByDispatchableOnUnitsPlant.h b/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByDispatchableOnUnitsPlant.h index 7fd761806f..ba377ffae1 100644 --- a/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByDispatchableOnUnitsPlant.h +++ b/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByDispatchableOnUnitsPlant.h @@ -106,7 +106,7 @@ class ReserveParticipationByDispatchableOnUnitsPlant pNbYearsParallel = study->maxNbYearsInParallel; pValuesForTheCurrentYear = new VCardType::IntermediateValuesBaseType[pNbYearsParallel]; - // Get the area + // Get the number of Onthermal reserveParticipations pSize = area->thermal.list.reserveParticipationsCount(); if (pSize) diff --git a/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByDispatchablePlant.h b/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByDispatchablePlant.h index d184239ccf..863e203898 100644 --- a/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByDispatchablePlant.h +++ b/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByDispatchablePlant.h @@ -106,16 +106,8 @@ class ReserveParticipationByDispatchableOnUnitsPlant pNbYearsParallel = study->maxNbYearsInParallel; pValuesForTheCurrentYear = new VCardType::IntermediateValuesBaseType[pNbYearsParallel]; - // Get the area - pSize = 0; - for (int areaIndex = 0; areaIndex < study->areas.size(); areaIndex++) - { - if (study->areas[areaIndex]->allCapacityReservations.size() > 0) - { - pSize = area->thermal.list.reserveParticipationsCount(); - break; - } - } + // Get the number of thermal reserveParticipations + pSize = area->thermal.list.reserveParticipationsCount(); if (pSize) { AncestorType::pResults.resize(pSize); diff --git a/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByLTStorage.h b/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByLTStorage.h index bf7e14a412..9f2bec9ebc 100644 --- a/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByLTStorage.h +++ b/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationByLTStorage.h @@ -67,11 +67,8 @@ class ReserveParticipationByLTStorage pNbYearsParallel = study->maxNbYearsInParallel; pValuesForTheCurrentYear = new VCardType::IntermediateValuesBaseType[pNbYearsParallel]; - pSize = 0; - for (int areaIndex = 0; areaIndex < study->areas.size(); areaIndex++) - { - pSize += study->areas[areaIndex]->hydro.reserveParticipationsCount(); - } + // Get the number of LTStorage reserveParticipations + pSize = area->hydro.reserveParticipationsCount; if (pSize) { AncestorType::pResults.resize(pSize); diff --git a/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationBySTStorage.h b/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationBySTStorage.h index 14794d4929..343df31000 100644 --- a/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationBySTStorage.h +++ b/src/solver/variable/include/antares/solver/variable/economy/reserveParticipationBySTStorage.h @@ -105,16 +105,8 @@ class ReserveParticipationBySTStorage pNbYearsParallel = study->maxNbYearsInParallel; pValuesForTheCurrentYear = new VCardType::IntermediateValuesBaseType[pNbYearsParallel]; - // Get the area - pSize = 0; - for (int areaIndex = 0; areaIndex < study->areas.size(); areaIndex++) - { - if (study->areas[areaIndex]->allCapacityReservations.size() > 0) - { - pSize = area->shortTermStorage.reserveParticipationsCount(); - break; - } - } + // Get the number of STStorage reserveParticipations + pSize = area->shortTermStorage.reserveParticipationsCount(); if (pSize) { AncestorType::pResults.resize(pSize);