Antares Simulator
Power System Simulator
data.h
1 /*
2  * Copyright 2007-2025, 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_SURVEY_RESULTS_DATA_H__
22 #define __SOLVER_VARIABLE_SURVEY_RESULTS_DATA_H__
23 
24 #include <yuni/yuni.h>
25 #include <yuni/core/string.h>
26 
27 #include <antares/study/study.h>
28 #include <antares/writer/i_writer.h>
29 #include "antares/antares/constants.h"
30 
31 namespace Antares::Solver::Variable::Private
32 {
34 {
35 public:
37 
38  SurveyResultsData(const Data::Study& s, const Yuni::String& o);
40 
41  void initialize(unsigned int maxVariables);
42 
49  void exportGridInfos(IResultWriter& writer);
50 
51 public:
53  unsigned int columnIndex;
54 
55  // Output variable non applicable :
56  // Column indices related to non applicable output variables
57  // Useful to print "N/A" in output files for these variables
58  std::vector<unsigned int> nonApplicableColIdx;
59 
63  const Data::Area* area;
67  unsigned int setOfAreasIndex;
68 
72  unsigned int nbYears;
74  unsigned int effectiveNbYears;
75 
77  Yuni::String output;
79  Yuni::String filename;
81  const Yuni::String& originalOutput;
82 
84  Yuni::String::Vector rowCaptions;
85 
88 
89  unsigned int rowIndex;
90 
91  Yuni::Clob fileBuffer;
92 
93 }; // class SurveyResultsData
94 
98 void InternalExportDigestLinksMatrix(const Data::Study& study,
99  const char* title,
100  std::string& fileBuffer,
101  const Matrix<>& matrix);
102 } // namespace Antares::Solver::Variable::Private
103 
104 #endif // __SOLVER_VARIABLE_SURVEY_RESULTS_DATA_H__
Definition for a single area.
Definition: area.h:51
Definition: study.h:57
A single thermal cluster.
Definition: cluster.h:76
Definition: i_writer.h:32
unsigned int nbYears
The number of MC years.
Definition: data.h:72
void exportGridInfos(IResultWriter &writer)
Export informations about the current study.
Definition: surveyresults.cpp:217
const Data::ThermalCluster * thermalCluster
Current thermal cluster.
Definition: data.h:61
unsigned int columnIndex
The current column index.
Definition: data.h:53
unsigned int effectiveNbYears
The effective number of MC years (user's playlist)
Definition: data.h:74
const Data::Study & study
The current study.
Definition: data.h:70
const Data::AreaLink * link
Current link.
Definition: data.h:65
unsigned int setOfAreasIndex
The index for the current set of areas.
Definition: data.h:67
Matrix< double, double > matrix
A multi-purposes matrix (mainly used for the digest)
Definition: data.h:87
Yuni::String output
The folder output where to write the results.
Definition: data.h:77
Yuni::String::Vector rowCaptions
Captions for rows.
Definition: data.h:84
const Data::Area * area
Current area.
Definition: data.h:63
Yuni::String filename
The filename to use for the current report.
Definition: data.h:79