Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
intermediate.h
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_STORAGE_INTERMEDIATE_H__
22#define __SOLVER_VARIABLE_STORAGE_INTERMEDIATE_H__
23
24#include <yuni/yuni.h>
25#include <yuni/core/string.h>
26
27#include <antares/study/study.h>
28#include "antares/antares/constants.h"
29
30#include "../categories.h"
31#include "../surveyresults.h"
32
33namespace Antares
34{
35namespace Solver
36{
37namespace Variable
38{
46{
47public:
49 typedef double Type;
50
51public:
53
54
61
62 void initializeFromStudy(Data::Study& study);
63
67 void reset();
68
73
78
83
84 // Compute averages for the current year from a particular time division results :
85 // For instances :
86 // - compute averages daily to yearly, from hourly results
87 // - compute averages monthly to yearly, from weekly results
88 void computeAveragesForCurrentYearFromHourlyResults();
89 void computeAveragesForCurrentYearFromDailyResults();
90 void computeAveragesForCurrentYearFromWeeklyResults();
91
96
101
106
108
109 template<class VCardT>
110 void buildAnnualSurveyReport(SurveyResults& report, int fileLevel, int precision) const;
112
114
115
118 Type& operator[](const uint index);
119 const Type& operator[](const uint index) const;
121
128
130 Type month[MONTHS_PER_YEAR];
132 Type week[WEEKS_PER_YEAR];
134 Type day[DAYS_PER_YEAR];
136 mutable Antares::Memory::Stored<Type>::Type hour;
139
140 template<uint Size, class VCardT, class A>
141 void internalExportAnnualValues(SurveyResults& report, const A& array, bool annual) const;
142
143 void computeDailyAveragesForCurrentYear();
144 void computeWeeklyAveragesForCurrentYear();
145 void computeMonthlyAveragesForCurrentYear();
146 void computeYearlyAveragesForCurrentYear();
147
148}; // class IntermediateValues
149
150} // namespace Variable
151} // namespace Solver
152} // namespace Antares
153
154#include "intermediate.hxx"
155
156#endif // __SOLVER_VARIABLE_STORAGE_INTERMEDIATE_H__
Runtime informations.
Definition runtime.h:69
Definition study.h:61
Definition date.h:180
Temporary buffer for allocating results for a single year.
Definition intermediate.h:46
Type week[WEEKS_PER_YEAR]
Values for each week.
Definition intermediate.h:132
double Type
Basic type.
Definition intermediate.h:49
Antares::Data::StudyRuntimeInfos * pRuntimeInfo
Range.
Definition intermediate.h:127
Type year
Year.
Definition intermediate.h:138
void computeStatisticsAdequacyForTheCurrentYear()
Compute statistics for the current year.
Definition intermediate.cpp:52
void adjustValuesWhenRelatedToAPrice()
Make another calculations when values are related to a price.
Definition intermediate.cpp:357
void reset()
Reset all values.
Definition intermediate.hxx:37
void computeProbabilitiesForTheCurrentYear()
Compute probabilities for the current year.
Definition intermediate.cpp:283
Antares::Memory::Stored< Type >::Type hour
Values for each hour in the year.
Definition intermediate.h:136
Antares::Date::Calendar * calendar
Calendar, from the study, but dedicated to the output (with leap year)
Definition intermediate.h:125
Type & operator[](const uint index)
Vector alias for an hour in the year.
Antares::Data::StudyRangeLimits * pRange
Range.
Definition intermediate.h:123
void computeStatisticsOrForTheCurrentYear()
Compute statistics for the current year.
Definition intermediate.cpp:126
Type month[MONTHS_PER_YEAR]
Values for each month.
Definition intermediate.h:130
IntermediateValues()
Constructor.
Definition intermediate.cpp:33
void computeStatisticsForTheCurrentYear()
Compute statistics for the current year.
Definition intermediate.cpp:70
void adjustValuesAdequacyWhenRelatedToAPrice()
Make another calculations when values are related to a price.
Definition intermediate.cpp:387
Type day[DAYS_PER_YEAR]
Values for each day in the year.
Definition intermediate.h:134
~IntermediateValues()
Destructor.
Definition intermediate.hxx:32
Class utility for building CSV results files.
Definition surveyresults.h:41
Definition variable.h:25
Definition runtime.h:44