Skip to content

Commit

Permalink
move checksOnGenerationPowerBounds
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Jun 6, 2024
1 parent a959348 commit 376df5c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
13 changes: 4 additions & 9 deletions src/solver/hydro/management/HydroInputsChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,10 @@ void HydroInputsChecker::Execute()

prepareInflows_.Run(year);
minGenerationScaling_.Run(year);
// if
// (!checksOnGenerationPowerBounds(year))
// {
// throw
// FatalError("hydro
// management: invalid
// minimum
// generation");
// }
if (!checksOnGenerationPowerBounds(year))
{
throw FatalError("hydro management: invalid minimum generation");
}

//---------------------//
// prepareNetDemand(year,
Expand Down
8 changes: 4 additions & 4 deletions src/solver/hydro/management/management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,10 @@ void HydroManagement::makeVentilation(double* randomReservoirLevel,
{
// prepareInflowsScaling(y);
// minGenerationScaling(y);
if (!checksOnGenerationPowerBounds(y))
{
throw FatalError("hydro management: invalid minimum generation");
}
// if (!checksOnGenerationPowerBounds(y))
// {
// throw FatalError("hydro management: invalid minimum generation");
// }

prepareNetDemand(y, parameters_.mode, scratchmap);
prepareEffectiveDemand(y);
Expand Down

0 comments on commit 376df5c

Please sign in to comment.