Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
finalLevelValidator.h
1/*
2** Copyright 2007-2023 RTE
3** Authors: Antares_Simulator Team
4**
5** This file is part of Antares_Simulator.
6**
7** Antares_Simulator is free software: you can redistribute it and/or modify
8** it under the terms of the GNU General Public License as published by
9** the Free Software Foundation, either version 3 of the License, or
10** (at your option) any later version.
11**
12** There are special exceptions to the terms and conditions of the
13** license as they are applied to this software. View the full text of
14** the exceptions in file COPYING.txt in the directory of this software
15** distribution
16**
17** Antares_Simulator is distributed in the hope that it will be useful,
18** but WITHOUT ANY WARRANTY; without even the implied warranty of
19** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20** GNU General Public License for more details.
21**
22** You should have received a copy of the GNU General Public License
23** along with Antares_Simulator. If not, see <http://www.gnu.org/licenses/>.
24**
25** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions
26*/
27#pragma once
28
29#include "antares/solver/hydro/management/HydroErrorsCollector.h"
30#include "antares/study/parts/hydro/container.h"
31
32namespace Antares
33{
34namespace Data
35{
36class PartHydro;
37}
38
39namespace Solver
40{
42{
43public:
45 unsigned int areaIndex,
46 const Antares::Data::AreaName areaName,
47 double initialLevel,
48 double finalLevel,
49 const unsigned int year,
50 const unsigned int lastSimulationDay,
51 const unsigned int firstMonthOfSimulation,
52 HydroErrorsCollector& errorCollector);
53 bool check();
54 bool finalLevelFineForUse();
55
56private:
57 bool wasSetInScenarioBuilder();
58 bool compatibleWithReservoirProperties();
59 bool skippingFinalLevelUse();
60 bool checkForInfeasibility();
61 bool hydroAllocationStartMatchesSimulation() const;
62 bool isFinalLevelReachable() const;
63 double calculateTotalInflows() const;
64 bool isBetweenRuleCurves() const;
65
66 // Data from simulation
67 unsigned int year_ = 0;
68 unsigned int lastSimulationDay_ = 0;
69 unsigned int firstMonthOfSimulation_ = 0;
70
71 // Data from area
73 unsigned int areaIndex_;
74 const Antares::Data::AreaName areaName_;
75 double initialLevel_;
76 double finalLevel_;
77
78 bool finalLevelFineForUse_ = false;
79
80 // area input errors
81 HydroErrorsCollector& errorCollector_;
82};
83} // namespace Solver
84} // namespace Antares
Hydro for a single area.
Definition container.h:91
Definition HydroErrorsCollector.h:32
Definition finalLevelValidator.h:42