Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
state.hxx
1/*
2** Copyright 2007-2024, RTE (https://www.rte-france.com)
3** See AUTHORS.txt
4** SPDX-License-Identifier: MPL-2.0
5** This file is part of Antares-Simulator,
6** Adequacy and Performance assessment for interconnected energy networks.
7**
8** Antares_Simulator is free software: you can redistribute it and/or modify
9** it under the terms of the Mozilla Public Licence 2.0 as published by
10** the Mozilla Foundation, either version 2 of the License, or
11** (at your option) any later version.
12**
13** Antares_Simulator is distributed in the hope that it will be useful,
14** but WITHOUT ANY WARRANTY; without even the implied warranty of
15** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16** Mozilla Public Licence 2.0 for more details.
17**
18** You should have received a copy of the Mozilla Public Licence 2.0
19** along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
20*/
21#ifndef __SOLVER_VARIABLE_STATE_HXX__
22#define __SOLVER_VARIABLE_STATE_HXX__
23
24namespace Antares
25{
26namespace Solver
27{
28namespace Variable
29{
52
65
66inline void State::initFromAreaIndex(const unsigned int areaIndex, uint numSpace)
67{
68 area = study.areas[areaIndex];
70 thermalCluster = nullptr;
71
72 switch (simulationMode)
73 {
74 case Data::SimulationMode::Adequacy:
75 case Data::SimulationMode::Economy:
76 case Data::SimulationMode::Expansion:
77 {
78 hourlyResults = &problemeHebdo->ResultatsHoraires[areaIndex];
79 break;
80 }
81
82 case Data::SimulationMode::Unknown:
83 break;
84 }
85}
86
87} // namespace Variable
88} // namespace Solver
89} // namespace Antares
90
91#endif // __SOLVER_VARIABLE_STATE_HXX__
std::vector< AreaScratchpad > scratchpad
Scratchpad used temporary calculations (solver only)
Definition area.h:312
AreaList areas
All available areas.
Definition study.h:529
Data::Area * area
The current area.
Definition state.h:155
double optimalSolutionCost1
Sum of the weekly optimal costs over the year (first optimisation step)
Definition state.h:227
double thermalClusterPMinOfTheClusterForYear[HOURS_PER_YEAR]
Minimum power of the cluster for the whole year.
Definition state.h:192
double averageOptimizationTime2
Average time spent in second optimization over the year (ms)
Definition state.h:233
double thermalClusterOperatingCostForYear[HOURS_PER_YEAR]
Thermal operating cost for the current thermal cluster for the whole year.
Definition state.h:188
void initFromAreaIndex(const unsigned int areaIndex, uint numSpace)
Initialize some variables according an area index.
Definition state.hxx:66
void startANewYear()
Reset internal data.
Definition state.hxx:30
double averageUpdateTime
Average time spent updating the problem over the year (ms)
Definition state.h:235
PROBLEME_HEBDO * problemeHebdo
Probleme Hebdo.
Definition state.h:201
double thermalClusterProductionForYear[HOURS_PER_YEAR]
Thermal production for the current thermal cluster for the whole year.
Definition state.h:182
Data::Study & study
Reference to the original study.
Definition state.h:208
Data::ThermalCluster * thermalCluster
The current thermal cluster (used in yearEndBuildForEachThermalCluster functions)
Definition state.h:158
void yearEndResetThermal()
Reset thermal internal data for end of year calculations.
Definition state.hxx:53
unsigned int hourInTheSimulation
Current hour from the begining of the simulation.
Definition state.h:152
uint thermalClusterDispatchedUnitsCountForYear[HOURS_PER_YEAR]
Definition state.h:185
double optimalSolutionCost2
Sum of the weekly optimal costs over the year (second optimisation step)
Definition state.h:229
double thermalClusterNonProportionalCostForYear[HOURS_PER_YEAR]
Thermal NP Cost for the current thermal cluster for the whole year.
Definition state.h:190
Data::SimulationMode simulationMode
Simulation mode: economy / adequacy / expansion.
Definition state.h:204
unsigned int numSpace
Index of the state in the state vector.
Definition state.h:212
double averageOptimizationTime1
Average time spent in first optimization over the year (ms)
Definition state.h:231
Data::AreaScratchpad * scratchpad
The Scratchpad for the current area.
Definition state.h:163
Definition variable.h:25