Skip to content

Commit

Permalink
Fix issue with multiple areas when exporting results with participati…
Browse files Browse the repository at this point in the history
…ons to reserves
  • Loading branch information
h-fournier committed Dec 9, 2024
1 parent f3edc0e commit d05df33
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d05df33

Please sign in to comment.