Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Jun 21, 2024
1 parent c8d89e8 commit c109624
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ namespace Antares::Data
//! The maximum number of days in a year
constexpr size_t dayYearCount = 366;

struct HydroDailyLoadDemand
struct DailyDemand
{
//! Net demand, for each day of the year, for each area
double DLN = 0.;
//! Daily local effective load
double DLE = 0.;
};

struct HydroMonthlyDemandGeneration
struct MonthlyGenerationTargetData
{
//! Monthly local effective demand
double MLE = 0.;
Expand All @@ -56,8 +56,8 @@ struct HydroMonthlyDemandGeneration
//! Hydro Management Data for a given area
struct TimeDependantHydroManagementData
{
std::array<HydroDailyLoadDemand, dayYearCount> daily{0};
std::array<HydroMonthlyDemandGeneration, 12> monthly{0};
std::array<DailyDemand, dayYearCount> daily{0};
std::array<MonthlyGenerationTargetData, 12> monthly{0};
};

//! Area Hydro Management Data for a given year
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,11 @@ class HydroInputsChecker

private:
Data::AreaList& areas_;
const Data::Parameters& parameters_;
const Date::Calendar& calendar_;
Data::SimulationMode simulationMode_;
const uint firstYear_;
const uint endYear_;
PrepareInflows prepareInflows_;
MinGenerationScaling minGenerationScaling_;
bool refresh_ = false;
std::map<uint, bool> checked_years_;

//! return false if checkGenerationPowerConsistency or checkMinGeneration returns false
Expand Down
5 changes: 1 addition & 4 deletions src/solver/hydro/management/HydroInputsChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,11 @@ namespace Antares

HydroInputsChecker::HydroInputsChecker(Antares::Data::Study& study):
areas_(study.areas),
parameters_(study.parameters),
calendar_(study.calendar),
simulationMode_(study.runtime->mode),
firstYear_(0),
endYear_(1 + study.runtime->rangeLimits.year[Data::rangeEnd]),
prepareInflows_(study.areas, study.calendar),
minGenerationScaling_(study.areas, study.calendar),
refresh_(false)
minGenerationScaling_(study.areas, study.calendar)
{
for (auto year = firstYear_; year < endYear_; ++year)
{
Expand Down
2 changes: 1 addition & 1 deletion src/solver/hydro/management/monthly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void HydroManagement::prepareMonthlyOptimalGenerations(
{
uint indexArea = 0;
areas_.each(
[this, &random_reservoir_level, &y, &indexArea](Data::Area& area)
[this, &random_reservoir_level, &y, &indexArea, &hydro_specific_map](Data::Area& area)
{
auto& data = area.hydro.managementData[y];
auto& hydro_specific = hydro_specific_map[&area];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,6 @@ void ISimulation<ImplementationType>::loopThroughYears(uint firstYear,
// Loop over sets of parallel years to check hydro inputs
for (const auto& batch: setsOfParallelYears)
{
// if refresh break
if (batch.regenerateTS)
{
break;
Expand Down

0 comments on commit c109624

Please sign in to comment.