97 VCardNbOfDispatchedUnitsByPlant>
118 template<
int CDataLevel,
int CFile>
140 NextType::initializeFromStudy(study);
145 pNbYearsParallel = study->maxNbYearsInParallel;
146 pValuesForTheCurrentYear.resize(pNbYearsParallel);
149 pSize = area->thermal.list.enabledCount();
153 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
155 pValuesForTheCurrentYear[numSpace].resize(pSize);
158 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
160 for (
unsigned int i = 0; i != pSize; ++i)
162 pValuesForTheCurrentYear[numSpace][i].initializeFromStudy(*study);
166 for (
unsigned int i = 0; i != pSize; ++i)
178 NextType::initializeFromArea(study, area);
181 size_t getMaxNumberColumns()
const
189 NextType::initializeFromAreaLink(study, link);
192 void simulationBegin()
195 NextType::simulationBegin();
200 NextType::simulationEnd();
203 void yearBegin(
unsigned int year,
unsigned int numSpace)
206 for (
unsigned int i = 0; i != pSize; ++i)
208 pValuesForTheCurrentYear[numSpace][i].reset();
212 NextType::yearBegin(year, numSpace);
215 void yearEndBuildPrepareDataForEachThermalCluster(
State& state,
217 unsigned int numSpace)
219 for (
unsigned int i = 0; i <= state.study.runtime.rangeLimits.hour[Data::rangeEnd]; ++i)
221 state.thermalClusterDispatchedUnitsCountForYear[i] +=
static_cast<uint
>(
222 pValuesForTheCurrentYear[numSpace][state.thermalCluster->enabledIndex].hour[i]);
226 NextType::yearEndBuildPrepareDataForEachThermalCluster(state, year, numSpace);
229 void yearEndBuildForEachThermalCluster(
State& state, uint year,
unsigned int numSpace)
232 for (
unsigned int i = state.study.runtime.rangeLimits.hour[Data::rangeBegin];
233 i <= state.study.runtime.rangeLimits.hour[Data::rangeEnd];
236 pValuesForTheCurrentYear[numSpace][state.thermalCluster->enabledIndex].hour[i]
237 = state.thermalClusterDispatchedUnitsCountForYear[i];
241 NextType::yearEndBuildForEachThermalCluster(state, year, numSpace);
244 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
247 NextType::yearEndBuild(state, year, numSpace);
250 void yearEnd(
unsigned int year,
unsigned int numSpace)
254 for (
unsigned int i = 0; i < pSize; ++i)
257 pValuesForTheCurrentYear[numSpace][i].computeStatisticsForTheCurrentYear();
261 NextType::yearEnd(year, numSpace);
264 void computeSummary(std::map<unsigned int, unsigned int>& numSpaceToYear,
265 unsigned int nbYearsForCurrentSummary)
267 for (
unsigned int numSpace = 0; numSpace < nbYearsForCurrentSummary; ++numSpace)
269 for (
unsigned int i = 0; i < pSize; ++i)
273 pValuesForTheCurrentYear[numSpace][i]);
278 NextType::computeSummary(numSpaceToYear, nbYearsForCurrentSummary);
281 void hourBegin(
unsigned int hourInTheYear)
284 NextType::hourBegin(hourInTheYear);
287 void hourForEachArea(
State& state,
unsigned int numSpace)
289 auto area = state.area;
290 auto& thermal = state.thermal;
291 for (
auto& cluster: area->thermal.list.each_enabled())
293 pValuesForTheCurrentYear[numSpace][cluster->enabledIndex].hour[state.hourInTheYear]
294 = thermal[area->index].numberOfUnitsONbyCluster[cluster->enabledIndex];
298 NextType::hourForEachArea(state, numSpace);
301 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
303 unsigned int numSpace)
const
305 return pValuesForTheCurrentYear[numSpace][0].hour;
308 void localBuildAnnualSurveyReport(SurveyResults&
results,
311 unsigned int numSpace)
const
314 results.isCurrentVarNA = AncestorType::isNonApplicable;
316 if (AncestorType::isPrinted[0])
318 assert(NULL !=
results.data.area);
319 const auto& thermal =
results.data.area->thermal;
322 for (
auto& cluster: thermal.list.each_enabled())
325 results.variableCaption = cluster->name();
327 pValuesForTheCurrentYear[numSpace][cluster->enabledIndex]
328 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
335 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
337 unsigned int pNbYearsParallel;