21#ifndef __SOLVER_CONTAINER_CONTAINER_HXX__
22#define __SOLVER_CONTAINER_CONTAINER_HXX__
26#include <yuni/core/static/types.h>
28#include "antares/solver/variable/surveyresults/reportbuilder.hxx"
44 NextT::initializeFromStudy(study);
51 NextT::initializeFromArea(study, area);
58 NextT::initializeFromAreaLink(study, link);
67 NextT::initializeFromThermalCluster(study, area, cluster);
73 NextT::simulationBegin();
79 NextT::simulationEnd();
85 NextT::yearBegin(year, numSpace);
91 NextT::yearEnd(year, numSpace);
96 unsigned int nbYearsForCurrentSummary)
98 NextT::computeSummary(numSpaceToYear, nbYearsForCurrentSummary);
103inline void List<NextT>::yearEndSpatialAggregates(V& allVars,
105 unsigned int numSpace)
108 NextT::yearEndSpatialAggregates(allVars, year, numSpace);
112template<
class V,
class SetT>
113inline void List<NextT>::yearEndSpatialAggregates(V& allVars,
unsigned int year,
const SetT& set)
116 NextT::yearEndSpatialAggregates(allVars, year, set);
121inline void List<NextT>::computeSpatialAggregatesSummary(
123 std::map<unsigned int, unsigned int>& numSpaceToYear,
124 unsigned int nbYearsForCurrentSummary)
127 NextT::computeSpatialAggregatesSummary(allVars, numSpaceToYear, nbYearsForCurrentSummary);
132inline void List<NextT>::simulationEndSpatialAggregates(V& allVars)
135 NextT::simulationEndSpatialAggregates(allVars);
139template<
class V,
class SetT>
140inline void List<NextT>::simulationEndSpatialAggregates(V& allVars,
const SetT& set)
143 NextT::simulationEndSpatialAggregates(allVars, set);
149 NextT::hourBegin(hourInTheYear);
155 NextT::weekBegin(state);
159inline void List<NextT>::weekEnd(
State& state)
161 NextT::weekEnd(state);
165inline void List<NextT>::hourForEachArea(
State& state,
unsigned int numSpace)
167 NextT::hourForEachArea(state, numSpace);
171inline void List<NextT>::hourForEachLink(
State& state)
173 NextT::hourForEachLink(state);
177inline void List<NextT>::hourEnd(
State& state,
unsigned int hourInTheYear)
179 NextT::hourEnd(state, hourInTheYear);
183template<
class SearchVCardT,
class O>
184inline void List<NextT>::computeSpatialAggregateWith(O& out)
186 NextT::template computeSpatialAggregateWith<SearchVCardT, O>(out);
190template<
class SearchVCardT,
class O>
191inline void List<NextT>::computeSpatialAggregateWith(O& out,
193 unsigned int numSpace)
195 NextT::template computeSpatialAggregateWith<SearchVCardT, O>(out, area, numSpace);
199template<
class VCardToFindT>
200inline void List<NextT>::retrieveResultsForArea(
204 NextT::template retrieveResultsForArea<VCardToFindT>(result, area);
208template<
class VCardToFindT>
209inline void List<NextT>::retrieveResultsForThermalCluster(
213 NextT::template retrieveResultsForThermalCluster<VCardToFindT>(result, cluster);
217template<
class VCardToFindT>
218inline void List<NextT>::retrieveResultsForLink(
222 NextT::template retrieveResultsForLink<VCardToFindT>(result, link);
238 Category::FileLevelToStream(results.
data.
filename, fileLevel);
240 Category::PrecisionLevelToStream(results.
data.
filename, precision);
244 NextT::buildSurveyReport(results, dataLevel, fileLevel, precision);
250 results.
saveToFile(dataLevel, fileLevel, precision);
259 unsigned int numSpace)
const
268 Category::FileLevelToStream(results.
data.
filename, fileLevel);
270 Category::PrecisionLevelToStream(results.
data.
filename, precision);
274 NextT::buildAnnualSurveyReport(results, dataLevel, fileLevel, precision, numSpace);
280 results.
saveToFile(dataLevel, fileLevel, precision);
295 NextT::buildDigest(results, digestLevel, dataLevel);
300 const Yuni::String& output,
301 unsigned int numSpace,
304 using namespace Antares;
310 logs.checkpoint() <<
"Exporting the survey results...";
314 logs.info() <<
"Exporting the annual results";
325 using Builder = SurveyReportBuilder<true, ListType>;
327 Builder::Run(*
this, survey);
335 Builder::RunDigest(*
this, survey, writer);
340 using Builder = SurveyReportBuilder<false, ListType>;
342 Builder::Run(*
this, survey, numSpace);
Definition of a link between two areas (Interconnection)
Definition links.h:50
Definition for a single area.
Definition area.h:52
A single thermal cluster.
Definition cluster.h:78
Static list for all output variables.
Definition container.h:44
void simulationEnd()
Notify to all variables that the simulation has finished.
Definition container.hxx:77
void simulationBegin()
Notify to all variables that the simulation is about to begin.
Definition container.hxx:71
void yearBegin(unsigned int year, unsigned int numSpace)
Notify to all variables that a new year is about to start.
Definition container.hxx:83
void yearEnd(unsigned int year, unsigned int numSpace)
Notify to all variables that the year is now over.
Definition container.hxx:89
void initializeFromStudy(Data::Study &study)
Initialize all output variables.
Definition container.hxx:39
void initializeFromLink(Data::Study *study, Data::AreaLink *link)
Initialize all output variables according a given link.
Definition container.hxx:55
void initializeFromArea(Data::Study *study, Data::Area *area)
Initialize all output variables according a given area.
Definition container.hxx:48
void buildDigest(SurveyResults &results, int digestLevel, int dataLevel) const
Ask to all variables to fullfil the digest.
Definition container.hxx:285
void initializeFromThermalCluster(Data::Study *study, Data::Area *area, Data::ThermalCluster *cluster)
Initialize all output variables according a given thermal cluster.
Definition container.hxx:62
void hourBegin(unsigned int hourInTheYear)
Notify to all variables that a new hour is about to begin.
Definition container.hxx:147
void buildSurveyReport(SurveyResults &results, int dataLevel, int fileLevel, int precision) const
Ask to all variables to fullfil the report.
Definition container.hxx:226
void exportSurveyResults(bool global, const Yuni::String &output, unsigned int numSpace, IResultWriter &writer)
Ask to all variables to fullfil additional reports (like the digest for example)
Definition container.hxx:299
const Data::ThermalCluster * thermalCluster
Current thermal cluster.
Definition data.h:67
unsigned int columnIndex
The current column index.
Definition data.h:59
const Data::AreaLink * link
Current link.
Definition data.h:71
Yuni::String output
The folder output where to write the results.
Definition data.h:83
const Data::Area * area
Current area.
Definition data.h:69
Yuni::String filename
The filename to use for the current report.
Definition data.h:85
Class utility for building CSV results files.
Definition surveyresults.h:41
CaptionType variableCaption
Caption for the current variable.
Definition surveyresults.h:95
void exportGridInfos()
Export informations about the current study.
Definition surveyresults.cpp:814
Solver::Variable::Private::SurveyResultsData data
Data (not related to the template parameter)
Definition surveyresults.h:92
bool yearByYearResults
Flag to known if we are in the year-by-year mode.
Definition surveyresults.h:122
void saveToFile(int dataLevel, int fileLevel, int precisionLevel)
Write the data into a file.
Definition surveyresults.cpp:693
Definition cbuilder.h:120
VariableAccessor< typenameVCardT::ResultsType, VCardT::columnCount >::Type ResultsType
The true type used for the results.
Definition info.h:764