diff --git a/src/solver/variable/adequacy/overallCost.h b/src/solver/variable/adequacy/overallCost.h index 5676e6503f..9f96635450 100644 --- a/src/solver/variable/adequacy/overallCost.h +++ b/src/solver/variable/adequacy/overallCost.h @@ -289,8 +289,8 @@ class OverallCost : public Variable::IVariable, NextT, VCardO } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/adequacy/spilledEnergy.h b/src/solver/variable/adequacy/spilledEnergy.h index b142036cfc..2d92c4185e 100644 --- a/src/solver/variable/adequacy/spilledEnergy.h +++ b/src/solver/variable/adequacy/spilledEnergy.h @@ -253,8 +253,8 @@ class SpilledEnergy : public Variable::IVariable, NextT, VC } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/area.h b/src/solver/variable/area.h index 37a071d2e9..03f7724535 100644 --- a/src/solver/variable/area.h +++ b/src/solver/variable/area.h @@ -161,17 +161,17 @@ class Areas //: public Variable::IVariable, NextT, VCardAllAreas> void weekEnd(State& state); void buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const; + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const; void buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const; - void buildDigest(SurveyResults&, int digestLevel, int dataLevel) const; + void buildDigest(SurveyResults&, Category::Digest digestLevel, Category::DataLevel dataLevel) const; void beforeYearByYearExport(uint year, uint numSpace); diff --git a/src/solver/variable/area.hxx b/src/solver/variable/area.hxx index a41b8dbf50..f5db650245 100644 --- a/src/solver/variable/area.hxx +++ b/src/solver/variable/area.hxx @@ -64,9 +64,9 @@ inline void Areas::initializeFromThermalCluster(Data::Study*, template void Areas::buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const { int count_int = count; bool linkDataLevel = dataLevel & Category::link; @@ -115,9 +115,9 @@ void Areas::buildSurveyReport(SurveyResults& results, template void Areas::buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { int count_int = count; @@ -168,7 +168,7 @@ void Areas::buildAnnualSurveyReport(SurveyResults& results, } template -void Areas::buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const +void Areas::buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { int count_int = count; if (count_int) diff --git a/src/solver/variable/bindConstraints.h b/src/solver/variable/bindConstraints.h index 00ba76e1af..6b55be1d83 100644 --- a/src/solver/variable/bindConstraints.h +++ b/src/solver/variable/bindConstraints.h @@ -145,14 +145,14 @@ class BindingConstraints void hourEnd(State& state, uint hourInTheYear); void buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const; + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const; void buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const; Yuni::uint64 memoryUsage() const; diff --git a/src/solver/variable/bindConstraints.hxx b/src/solver/variable/bindConstraints.hxx index 976bbb3bae..6fb7fb2d0e 100644 --- a/src/solver/variable/bindConstraints.hxx +++ b/src/solver/variable/bindConstraints.hxx @@ -34,9 +34,9 @@ namespace Antares::Solver::Variable { template void BindingConstraints::buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const { if (bool bcDataLevel = dataLevel & Category::bindingConstraint; !bcDataLevel) return; @@ -51,9 +51,9 @@ void BindingConstraints::buildSurveyReport(SurveyResults& results, template void BindingConstraints::buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { if (bool bcDataLevel = dataLevel & Category::bindingConstraint; !bcDataLevel) diff --git a/src/solver/variable/categories.h b/src/solver/variable/categories.h index e858b0f840..e5a5a754d2 100644 --- a/src/solver/variable/categories.h +++ b/src/solver/variable/categories.h @@ -51,10 +51,17 @@ enum DataLevel bindingConstraint = 16, //! The maximum available level maxDataLevel = 16, + //! Used for end of iterations on data levels + dataLevelsEnd = 32, + //! All data level allDataLevel = area | thermalAggregate | link | setOfAreas | bindingConstraint }; +constexpr inline Category::DataLevel nextDataLevel(Category::DataLevel dataLevel) { + return static_cast(dataLevel * 2); +} + enum File { //! Values of physical variables @@ -69,10 +76,16 @@ enum File bc = 16, //! The maximum available value maxFileLevel = 16, + //! Used for end of iterations on file levels + fileLevelsEnd = 32, //! All file level allFile = va | id | de | de_res | bc, }; +constexpr inline Category::File nextFileLevel(Category::File fileLevel) { + return static_cast(fileLevel * 2); +} + enum Precision { //! hour diff --git a/src/solver/variable/commons/hydro.h b/src/solver/variable/commons/hydro.h index 205c3598df..f60f1e196d 100644 --- a/src/solver/variable/commons/hydro.h +++ b/src/solver/variable/commons/hydro.h @@ -258,8 +258,8 @@ class TimeSeriesValuesHydro } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/commons/join.h b/src/solver/variable/commons/join.h index 4486ea979a..ac0195133b 100644 --- a/src/solver/variable/commons/join.h +++ b/src/solver/variable/commons/join.h @@ -288,9 +288,9 @@ class Join : public Variable::IVariable, Yuni::D } void buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const { LeftType::buildSurveyReport(results, dataLevel, fileLevel, precision); RightType::buildSurveyReport(results, dataLevel, fileLevel, precision); @@ -298,9 +298,9 @@ class Join : public Variable::IVariable, Yuni::D } void buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { LeftType::buildAnnualSurveyReport(results, dataLevel, fileLevel, precision, numSpace); @@ -308,7 +308,7 @@ class Join : public Variable::IVariable, Yuni::D BindConstType::buildAnnualSurveyReport(results, dataLevel, fileLevel, precision, numSpace); } - void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const + void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { // Building the digest LeftType ::buildDigest(results, digestLevel, dataLevel); diff --git a/src/solver/variable/commons/links/links.cpp.inc.hxx b/src/solver/variable/commons/links/links.cpp.inc.hxx index fd203f86d2..4c2af3020b 100644 --- a/src/solver/variable/commons/links/links.cpp.inc.hxx +++ b/src/solver/variable/commons/links/links.cpp.inc.hxx @@ -94,7 +94,7 @@ void Links::simulationEnd() } } -void Links::buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const +void Links::buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { int count_int = count; bool linkDataLevel = dataLevel & Category::link; diff --git a/src/solver/variable/commons/links/links.h.inc.hxx b/src/solver/variable/commons/links/links.h.inc.hxx index 1d68e180e6..c4e5fa9c54 100644 --- a/src/solver/variable/commons/links/links.h.inc.hxx +++ b/src/solver/variable/commons/links/links.h.inc.hxx @@ -170,21 +170,21 @@ public: void hourEnd(State& state, uint hourInTheYear); void buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const; + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const; void buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const; void beforeYearByYearExport(uint year, uint numSpace); Yuni::uint64 memoryUsage() const; - void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const; + void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const; template static void provideInformations(I& infos); diff --git a/src/solver/variable/commons/links/links.hxx.inc.hxx b/src/solver/variable/commons/links/links.hxx.inc.hxx index ee9f8820c8..5a4c81920c 100644 --- a/src/solver/variable/commons/links/links.hxx.inc.hxx +++ b/src/solver/variable/commons/links/links.hxx.inc.hxx @@ -173,9 +173,9 @@ inline void Links::hourEnd(State& state, uint hourInTheYear) } inline void Links::buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const { int count_int = count; bool link_dataLevel = (dataLevel & Category::link); @@ -219,9 +219,9 @@ inline void Links::buildSurveyReport(SurveyResults& results, } inline void Links::buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { int count_int = count; diff --git a/src/solver/variable/commons/load.h b/src/solver/variable/commons/load.h index 5499df7b28..65826285af 100644 --- a/src/solver/variable/commons/load.h +++ b/src/solver/variable/commons/load.h @@ -258,8 +258,8 @@ class TimeSeriesValuesLoad } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/commons/miscGenMinusRowPSP.h b/src/solver/variable/commons/miscGenMinusRowPSP.h index c3818b1c2e..328a76ecac 100644 --- a/src/solver/variable/commons/miscGenMinusRowPSP.h +++ b/src/solver/variable/commons/miscGenMinusRowPSP.h @@ -257,8 +257,8 @@ class MiscGenMinusRowPSP } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/commons/psp.h b/src/solver/variable/commons/psp.h index 74549d053e..b245af1dba 100644 --- a/src/solver/variable/commons/psp.h +++ b/src/solver/variable/commons/psp.h @@ -243,8 +243,8 @@ class PSP : public Variable::IVariable, NextT, VCardPSP> } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/commons/rowBalance.h b/src/solver/variable/commons/rowBalance.h index 57baaf6164..187585cd77 100644 --- a/src/solver/variable/commons/rowBalance.h +++ b/src/solver/variable/commons/rowBalance.h @@ -237,8 +237,8 @@ class RowBalance : public Variable::IVariable, NextT, VCardRow } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/commons/solar.h b/src/solver/variable/commons/solar.h index aee29de0e4..f59fc90792 100644 --- a/src/solver/variable/commons/solar.h +++ b/src/solver/variable/commons/solar.h @@ -262,8 +262,8 @@ class TimeSeriesValuesSolar } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/commons/spatial-aggregate.h b/src/solver/variable/commons/spatial-aggregate.h index 24cb77d553..7173770d94 100644 --- a/src/solver/variable/commons/spatial-aggregate.h +++ b/src/solver/variable/commons/spatial-aggregate.h @@ -327,7 +327,7 @@ class SpatialAggregate NextType::template simulationEndSpatialAggregates(allVars, set); } - inline void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const + inline void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { // Generate the Digest for the local results (districts part) if (VCardType::columnCount != 0 && (VCardType::categoryDataLevel & Category::setOfAreas)) @@ -344,8 +344,8 @@ class SpatialAggregate } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { if (VCardType::columnCount != 0 && (VCardType::categoryDataLevel & Category::setOfAreas)) diff --git a/src/solver/variable/commons/wind.h b/src/solver/variable/commons/wind.h index d3c09e40eb..2cfa0aba0f 100644 --- a/src/solver/variable/commons/wind.h +++ b/src/solver/variable/commons/wind.h @@ -256,8 +256,8 @@ class TimeSeriesValuesWind } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/container.h b/src/solver/variable/container.h index e949a4720e..a9530a8da9 100644 --- a/src/solver/variable/container.h +++ b/src/solver/variable/container.h @@ -213,14 +213,14 @@ class List : public NextT ** \brief Ask to all variables to fullfil the report */ void buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const; + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const; void buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const; /*! @@ -237,7 +237,7 @@ class List : public NextT /*! ** \brief Ask to all variables to fullfil the digest */ - void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const; + void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const; //@} //! \name Memory management diff --git a/src/solver/variable/container.hxx b/src/solver/variable/container.hxx index 76562db2b7..d161efe227 100644 --- a/src/solver/variable/container.hxx +++ b/src/solver/variable/container.hxx @@ -254,9 +254,9 @@ inline Yuni::uint64 List::memoryUsage() const template void List::buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const { // Reset results.data.columnIndex = 0; @@ -280,9 +280,9 @@ void List::buildSurveyReport(SurveyResults& results, template void List::buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Reset @@ -306,7 +306,7 @@ void List::buildAnnualSurveyReport(SurveyResults& results, } template -void List::buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const +void List::buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { // Reset results.data.columnIndex = 0; diff --git a/src/solver/variable/economy/avail-dispatchable-generation.h b/src/solver/variable/economy/avail-dispatchable-generation.h index 0ddac0dddc..78e13ef888 100644 --- a/src/solver/variable/economy/avail-dispatchable-generation.h +++ b/src/solver/variable/economy/avail-dispatchable-generation.h @@ -272,8 +272,8 @@ class AvailableDispatchGen } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/balance.h b/src/solver/variable/economy/balance.h index 6581cedfaa..a592fc37ab 100644 --- a/src/solver/variable/economy/balance.h +++ b/src/solver/variable/economy/balance.h @@ -271,8 +271,8 @@ class Balance : public Variable::IVariable, NextT, VCardBalance> } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/bindingConstraints/bindingConstraintsMarginalCost.h b/src/solver/variable/economy/bindingConstraints/bindingConstraintsMarginalCost.h index e473116252..98278db280 100644 --- a/src/solver/variable/economy/bindingConstraints/bindingConstraintsMarginalCost.h +++ b/src/solver/variable/economy/bindingConstraints/bindingConstraintsMarginalCost.h @@ -93,7 +93,7 @@ struct VCardBindingConstMarginCost Marginal cost associated to binding constraints : Suppose that the BC is hourly, - if binding constraint is not saturated (rhs is not reached) for a given hour, the value is 0; - - if binding constraint is saturated (rhs is reached), the value is the total benefit (€/MW) for + - if binding constraint is saturated (rhs is reached), the value is the total benefit (�/MW) for the system that would result in increasing the BC's rhs of 1 MW. */ template @@ -302,10 +302,10 @@ class BindingConstMarginCost } void localBuildAnnualSurveyReport( - SurveyResults& results, - int fileLevel, - int precision /* printed results : hourly, daily, weekly, ...*/, - unsigned int numSpace) const + SurveyResults& results, + Category::File fileLevel, + Category::Precision precision /* printed results : hourly, daily, weekly, ...*/, + unsigned int numSpace) const { if (!(precision & associatedBC_->filterYearByYear_)) return; @@ -323,9 +323,9 @@ class BindingConstMarginCost } void buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const { // Building syntheses results // ------------------------------ diff --git a/src/solver/variable/economy/dispatchable-generation-margin.h b/src/solver/variable/economy/dispatchable-generation-margin.h index 7a0822b337..3d3a6554d0 100644 --- a/src/solver/variable/economy/dispatchable-generation-margin.h +++ b/src/solver/variable/economy/dispatchable-generation-margin.h @@ -273,8 +273,8 @@ class DispatchableGenMargin } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/dispatchableGeneration.h b/src/solver/variable/economy/dispatchableGeneration.h index cc2288f215..f4ec2f81ec 100644 --- a/src/solver/variable/economy/dispatchableGeneration.h +++ b/src/solver/variable/economy/dispatchableGeneration.h @@ -286,8 +286,8 @@ class DispatchableGeneration } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // The current variable is actually a multiple-variable. diff --git a/src/solver/variable/economy/domesticUnsuppliedEnergy.h b/src/solver/variable/economy/domesticUnsuppliedEnergy.h index 81f60caf3f..a6a5861d7e 100644 --- a/src/solver/variable/economy/domesticUnsuppliedEnergy.h +++ b/src/solver/variable/economy/domesticUnsuppliedEnergy.h @@ -252,8 +252,8 @@ class DomesticUnsuppliedEnergy } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/dtgMarginAfterCsr.h b/src/solver/variable/economy/dtgMarginAfterCsr.h index dba1272473..2aea6b7625 100644 --- a/src/solver/variable/economy/dtgMarginAfterCsr.h +++ b/src/solver/variable/economy/dtgMarginAfterCsr.h @@ -243,8 +243,8 @@ class DtgMarginCsr : public Variable::IVariable, NextT, VCar } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/hydroCost.h b/src/solver/variable/economy/hydroCost.h index 5f3ff67ae9..54aa12e327 100644 --- a/src/solver/variable/economy/hydroCost.h +++ b/src/solver/variable/economy/hydroCost.h @@ -259,8 +259,8 @@ class HydroCost : public Variable::IVariable, NextT, VCardHydro } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/hydrostorage.h b/src/solver/variable/economy/hydrostorage.h index a804cce0f5..ced7007059 100644 --- a/src/solver/variable/economy/hydrostorage.h +++ b/src/solver/variable/economy/hydrostorage.h @@ -251,8 +251,8 @@ class HydroStorage : public Variable::IVariable, NextT, VCar } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/inflow.h b/src/solver/variable/economy/inflow.h index cd4082822a..96333cba86 100644 --- a/src/solver/variable/economy/inflow.h +++ b/src/solver/variable/economy/inflow.h @@ -252,8 +252,8 @@ class Inflows : public Variable::IVariable, NextT, VCardInflows> } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/links/congestionFee.h b/src/solver/variable/economy/links/congestionFee.h index 6b48adf3a1..1048c72650 100644 --- a/src/solver/variable/economy/links/congestionFee.h +++ b/src/solver/variable/economy/links/congestionFee.h @@ -244,7 +244,7 @@ class CongestionFee : public Variable::IVariable, NextT, VC #undef DOWNSTREAM_PRICE } - void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const + void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { // Next NextType::buildDigest(results, digestLevel, dataLevel); @@ -258,8 +258,8 @@ class CongestionFee : public Variable::IVariable, NextT, VC } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/links/congestionFeeAbs.h b/src/solver/variable/economy/links/congestionFeeAbs.h index 5dd892cbef..00322302b8 100644 --- a/src/solver/variable/economy/links/congestionFeeAbs.h +++ b/src/solver/variable/economy/links/congestionFeeAbs.h @@ -246,7 +246,7 @@ class CongestionFeeAbs #undef DOWNSTREAM_PRICE } - void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const + void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { // Next NextType::buildDigest(results, digestLevel, dataLevel); @@ -260,8 +260,8 @@ class CongestionFeeAbs } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/links/congestionProbability.h b/src/solver/variable/economy/links/congestionProbability.h index b7ec5c85bd..4d5a990028 100644 --- a/src/solver/variable/economy/links/congestionProbability.h +++ b/src/solver/variable/economy/links/congestionProbability.h @@ -327,8 +327,8 @@ class CongestionProbability } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { // The current variable is actually a multiple-variable. diff --git a/src/solver/variable/economy/links/flowLinear.h b/src/solver/variable/economy/links/flowLinear.h index e985a3628e..6eda04d898 100644 --- a/src/solver/variable/economy/links/flowLinear.h +++ b/src/solver/variable/economy/links/flowLinear.h @@ -237,7 +237,7 @@ class FlowLinear : public Variable::IVariable, NextT, VCardFlo NextType::hourForEachLink(state, numSpace); } - void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const + void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { if (dataLevel & Category::link) { @@ -264,8 +264,8 @@ class FlowLinear : public Variable::IVariable, NextT, VCardFlo } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/links/flowLinearAbs.h b/src/solver/variable/economy/links/flowLinearAbs.h index fd6a90e17e..efee70a383 100644 --- a/src/solver/variable/economy/links/flowLinearAbs.h +++ b/src/solver/variable/economy/links/flowLinearAbs.h @@ -238,7 +238,7 @@ class FlowLinearAbs : public Variable::IVariable, NextT, VC NextType::hourForEachLink(state, numSpace); } - void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const + void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { // Next NextType::buildDigest(results, digestLevel, dataLevel); @@ -252,8 +252,8 @@ class FlowLinearAbs : public Variable::IVariable, NextT, VC } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/links/flowQuad.h b/src/solver/variable/economy/links/flowQuad.h index d6852e2539..f81542ac08 100644 --- a/src/solver/variable/economy/links/flowQuad.h +++ b/src/solver/variable/economy/links/flowQuad.h @@ -228,7 +228,7 @@ class FlowQuad : public Variable::IVariable, NextT, VCardFlowQua NextType::hourForEachLink(state, numSpace); } - void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const + void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { if (dataLevel & Category::link) { @@ -254,8 +254,8 @@ class FlowQuad : public Variable::IVariable, NextT, VCardFlowQua } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, uint) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/links/hurdleCosts.h b/src/solver/variable/economy/links/hurdleCosts.h index 51cb120d96..c90b506b64 100644 --- a/src/solver/variable/economy/links/hurdleCosts.h +++ b/src/solver/variable/economy/links/hurdleCosts.h @@ -288,7 +288,7 @@ class HurdleCosts : public Variable::IVariable, NextT, VCardH NextType::hourForEachLink(state, numSpace); } - void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const + void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { // Next NextType::buildDigest(results, digestLevel, dataLevel); @@ -302,8 +302,8 @@ class HurdleCosts : public Variable::IVariable, NextT, VCardH } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/links/loopFlow.h b/src/solver/variable/economy/links/loopFlow.h index 5a4ae1bb97..ad12f5b784 100644 --- a/src/solver/variable/economy/links/loopFlow.h +++ b/src/solver/variable/economy/links/loopFlow.h @@ -237,7 +237,7 @@ class LoopFlow : public Variable::IVariable, NextT, VCardLoopFlo NextType::hourForEachLink(state, numSpace); } - void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const + void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { // Next NextType::buildDigest(results, digestLevel, dataLevel); @@ -251,8 +251,8 @@ class LoopFlow : public Variable::IVariable, NextT, VCardLoopFlo } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, uint) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/links/marginalCost.h b/src/solver/variable/economy/links/marginalCost.h index 856562faa6..b8288677d0 100644 --- a/src/solver/variable/economy/links/marginalCost.h +++ b/src/solver/variable/economy/links/marginalCost.h @@ -248,7 +248,7 @@ class MarginalCost : public Variable::IVariable, NextT, VCar NextType::hourForEachLink(state, numSpace); } - void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const + void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { // Next NextType::buildDigest(results, digestLevel, dataLevel); @@ -262,8 +262,8 @@ class MarginalCost : public Variable::IVariable, NextT, VCar } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/localMatchingRuleViolations.h b/src/solver/variable/economy/localMatchingRuleViolations.h index deb0e17d26..07adc63c1a 100644 --- a/src/solver/variable/economy/localMatchingRuleViolations.h +++ b/src/solver/variable/economy/localMatchingRuleViolations.h @@ -240,8 +240,8 @@ class LMRViolations : public Variable::IVariable, NextT, VC } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/lold.h b/src/solver/variable/economy/lold.h index b854cba31b..ab482c8478 100644 --- a/src/solver/variable/economy/lold.h +++ b/src/solver/variable/economy/lold.h @@ -249,8 +249,8 @@ class LOLD : public Variable::IVariable, NextT, VCardLOLD> } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/lolp.h b/src/solver/variable/economy/lolp.h index fb36bdd3b6..7abd141aec 100644 --- a/src/solver/variable/economy/lolp.h +++ b/src/solver/variable/economy/lolp.h @@ -246,8 +246,8 @@ class LOLP : public Variable::IVariable, NextT, VCardLOLP> } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/max-mrg.h b/src/solver/variable/economy/max-mrg.h index f21bfb4927..0d6fdef786 100644 --- a/src/solver/variable/economy/max-mrg.h +++ b/src/solver/variable/economy/max-mrg.h @@ -261,8 +261,8 @@ class Marge : public Variable::IVariable, NextT, VCardMARGE> } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/nbOfDispatchedUnits.h b/src/solver/variable/economy/nbOfDispatchedUnits.h index 152d7cdb27..9e6989a055 100644 --- a/src/solver/variable/economy/nbOfDispatchedUnits.h +++ b/src/solver/variable/economy/nbOfDispatchedUnits.h @@ -263,8 +263,8 @@ class NbOfDispatchedUnits } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/nbOfDispatchedUnitsByPlant.h b/src/solver/variable/economy/nbOfDispatchedUnitsByPlant.h index 022d09f4f2..2a707709be 100644 --- a/src/solver/variable/economy/nbOfDispatchedUnitsByPlant.h +++ b/src/solver/variable/economy/nbOfDispatchedUnitsByPlant.h @@ -341,8 +341,8 @@ class NbOfDispatchedUnitsByPlant : public Variable::IVariable, NextT, VC } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/overallCost.h b/src/solver/variable/economy/overallCost.h index fcf88d4172..15ecbc239c 100644 --- a/src/solver/variable/economy/overallCost.h +++ b/src/solver/variable/economy/overallCost.h @@ -292,8 +292,8 @@ class OverallCost : public Variable::IVariable, NextT, VCardO } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/overflow.h b/src/solver/variable/economy/overflow.h index 2383f86e6b..313c14d7a6 100644 --- a/src/solver/variable/economy/overflow.h +++ b/src/solver/variable/economy/overflow.h @@ -249,8 +249,8 @@ class Overflows : public Variable::IVariable, NextT, VCardOverf } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/price.h b/src/solver/variable/economy/price.h index aacef33b45..2a0b13818a 100644 --- a/src/solver/variable/economy/price.h +++ b/src/solver/variable/economy/price.h @@ -249,8 +249,8 @@ class Price : public Variable::IVariable, NextT, VCardPrice> } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/productionByDispatchablePlant.h b/src/solver/variable/economy/productionByDispatchablePlant.h index 744e2536d5..883f9ada1a 100644 --- a/src/solver/variable/economy/productionByDispatchablePlant.h +++ b/src/solver/variable/economy/productionByDispatchablePlant.h @@ -354,7 +354,7 @@ class ProductionByDispatchablePlant NextType::hourForEachThermalCluster(state, numSpace); } - inline void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const + inline void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { // Ask to build the digest to the next variable NextType::buildDigest(results, digestLevel, dataLevel); @@ -377,8 +377,8 @@ class ProductionByDispatchablePlant } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/productionByRenewablePlant.h b/src/solver/variable/economy/productionByRenewablePlant.h index 57293b34d9..d77f1c3d74 100644 --- a/src/solver/variable/economy/productionByRenewablePlant.h +++ b/src/solver/variable/economy/productionByRenewablePlant.h @@ -315,7 +315,7 @@ class ProductionByRenewablePlant : public Variable::IVariable, NextT, VC } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/pumping.h b/src/solver/variable/economy/pumping.h index 441b5d9882..ba7cb6f67c 100644 --- a/src/solver/variable/economy/pumping.h +++ b/src/solver/variable/economy/pumping.h @@ -251,8 +251,8 @@ class Pumping : public Variable::IVariable, NextT, VCardPumping> } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/renewableGeneration.h b/src/solver/variable/economy/renewableGeneration.h index d371e48411..e8790c11ca 100644 --- a/src/solver/variable/economy/renewableGeneration.h +++ b/src/solver/variable/economy/renewableGeneration.h @@ -283,8 +283,8 @@ class RenewableGeneration } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // The current variable is actually a multiple-variable. diff --git a/src/solver/variable/economy/reservoirlevel.h b/src/solver/variable/economy/reservoirlevel.h index a801e79f6d..4eaf2590c3 100644 --- a/src/solver/variable/economy/reservoirlevel.h +++ b/src/solver/variable/economy/reservoirlevel.h @@ -249,8 +249,8 @@ class ReservoirLevel : public Variable::IVariable, NextT, } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/spilledEnergy.h b/src/solver/variable/economy/spilledEnergy.h index 7003c56ccd..e46834e46b 100644 --- a/src/solver/variable/economy/spilledEnergy.h +++ b/src/solver/variable/economy/spilledEnergy.h @@ -252,8 +252,8 @@ class SpilledEnergy : public Variable::IVariable, NextT, VC } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/spilledEnergyAfterCSR.h b/src/solver/variable/economy/spilledEnergyAfterCSR.h index 83e25ee8b7..1997faf6f5 100644 --- a/src/solver/variable/economy/spilledEnergyAfterCSR.h +++ b/src/solver/variable/economy/spilledEnergyAfterCSR.h @@ -245,8 +245,8 @@ class SpilledEnergyAfterCSR } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/thermalAirPollutantEmissions.h b/src/solver/variable/economy/thermalAirPollutantEmissions.h index 96329a4aa4..45b516ae28 100644 --- a/src/solver/variable/economy/thermalAirPollutantEmissions.h +++ b/src/solver/variable/economy/thermalAirPollutantEmissions.h @@ -264,8 +264,8 @@ class ThermalAirPollutantEmissions } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // The current variable is actually a multiple-variable. diff --git a/src/solver/variable/economy/unsupliedEnergy.h b/src/solver/variable/economy/unsupliedEnergy.h index 649a404ebc..1fb18874e5 100644 --- a/src/solver/variable/economy/unsupliedEnergy.h +++ b/src/solver/variable/economy/unsupliedEnergy.h @@ -252,8 +252,8 @@ class UnsupliedEnergy } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/economy/waterValue.h b/src/solver/variable/economy/waterValue.h index 977240b2af..a525a340b0 100644 --- a/src/solver/variable/economy/waterValue.h +++ b/src/solver/variable/economy/waterValue.h @@ -249,8 +249,8 @@ class WaterValue : public Variable::IVariable, NextT, VCardWat } void localBuildAnnualSurveyReport(SurveyResults& results, - int fileLevel, - int precision, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const { // Initializing external pointer on current variable non applicable status diff --git a/src/solver/variable/setofareas.h b/src/solver/variable/setofareas.h index d0ef4d0989..dab594f167 100644 --- a/src/solver/variable/setofareas.h +++ b/src/solver/variable/setofareas.h @@ -29,6 +29,7 @@ #include "state.h" #include +#include "categories.h" namespace Antares { @@ -158,17 +159,17 @@ class SetsOfAreas void weekEnd(State&); void buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const; + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const; void buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, unsigned int numSpace) const; - void buildDigest(SurveyResults&, int digestLevel, int dataLevel) const; + void buildDigest(SurveyResults&, Category::Digest digestLevel, Category::DataLevel dataLevel) const; void beforeYearByYearExport(uint year, uint numSpace); diff --git a/src/solver/variable/setofareas.hxx b/src/solver/variable/setofareas.hxx index 4971d283fb..ebe5c99491 100644 --- a/src/solver/variable/setofareas.hxx +++ b/src/solver/variable/setofareas.hxx @@ -216,9 +216,9 @@ inline void SetsOfAreas::hourEnd(State& state, uint hourInTheYear) template inline void SetsOfAreas::buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const { int count_int = count; bool setOfAreasDataLevel = dataLevel & Category::setOfAreas; @@ -231,9 +231,9 @@ inline void SetsOfAreas::buildSurveyReport(SurveyResults& results, template inline void SetsOfAreas::buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { int count_int = count; @@ -246,7 +246,7 @@ inline void SetsOfAreas::buildAnnualSurveyReport(SurveyResults& results, } template -void SetsOfAreas::buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const +void SetsOfAreas::buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const { int count_int = count; bool setOfAreasDataLevel = dataLevel & Category::setOfAreas; diff --git a/src/solver/variable/surveyresults/reportbuilder.hxx b/src/solver/variable/surveyresults/reportbuilder.hxx index 76c4228da9..fb91ec06b7 100644 --- a/src/solver/variable/surveyresults/reportbuilder.hxx +++ b/src/solver/variable/surveyresults/reportbuilder.hxx @@ -118,7 +118,7 @@ struct BrowseAllVariables } }; -template +template class SurveyReportBuilderFile { public: @@ -127,8 +127,6 @@ public: { //! A non-zero value to write down the results for the simulation globalResults = (GlobalT) ? 1 : 0, - //! The next level - nextFileLevel = CFile * 2, }; static void Run(const ListType& list, SurveyResults& results, unsigned int numSpace) @@ -145,6 +143,9 @@ public: } private: + //! The next level + static const Category::File nextFileLevel = Category::nextFileLevel(CFile); + static void RunGlobalResults(const ListType& list, SurveyResults& results) { // All hours @@ -176,8 +177,8 @@ private: }; // class SurveyReportBuilderFile // Specialization for the final state (dummy) -template -class SurveyReportBuilderFile +template +class SurveyReportBuilderFile { public: using ListType = NextT; @@ -187,16 +188,14 @@ public: } }; -template +template class SurveyReportBuilder { public: //! List using ListType = NextT; - enum - { - nextDataLevel = CDataLevel * 2, - }; + + static const Category::DataLevel nextDataLevel = Category::nextDataLevel(CDataLevel); static void Run(const ListType& list, SurveyResults& results, unsigned int numSpace = 9999) { @@ -449,7 +448,7 @@ private: }; // class SurveyReportBuilder template -class SurveyReportBuilder +class SurveyReportBuilder { public: using ListType = NextT; diff --git a/src/solver/variable/surveyresults/surveyresults.cpp b/src/solver/variable/surveyresults/surveyresults.cpp index c6a7059bbc..89bdf53906 100644 --- a/src/solver/variable/surveyresults/surveyresults.cpp +++ b/src/solver/variable/surveyresults/surveyresults.cpp @@ -688,7 +688,7 @@ void SurveyResults::exportDigestMatrix(const char* title, std::string& buffer) Private::InternalExportDigestLinksMatrix(data.study, title, buffer, data.matrix); } -void SurveyResults::saveToFile(int dataLevel, int fileLevel, int precisionLevel) +void SurveyResults::saveToFile(Category::DataLevel dataLevel, Category::File fileLevel, Category::Precision precisionLevel) { logs.debug() << " :: survey writing `" << data.filename << "`"; diff --git a/src/solver/variable/surveyresults/surveyresults.h b/src/solver/variable/surveyresults/surveyresults.h index e355087e04..8e813c38e2 100644 --- a/src/solver/variable/surveyresults/surveyresults.h +++ b/src/solver/variable/surveyresults/surveyresults.h @@ -83,7 +83,7 @@ class SurveyResults /*! ** \brief Write the data into a file */ - void saveToFile(int dataLevel, int fileLevel, int precisionLevel); + void saveToFile(Category::DataLevel dataLevel, Category::File fileLevel, Category::Precision precisionLevel); /*! ** \brief Export informations about the current study diff --git a/src/solver/variable/variable.h b/src/solver/variable/variable.h index 17ac4a1cfb..2ee887576a 100644 --- a/src/solver/variable/variable.h +++ b/src/solver/variable/variable.h @@ -272,17 +272,17 @@ class IVariable : protected NextT //! \name User Reports //@{ void buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const; + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const; void buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const; - void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const; + void buildDigest(SurveyResults& results, Category::Digest digestLevel, Category::DataLevel dataLevel) const; /*! ** \brief Event triggered before exporting a year-by-year survey report diff --git a/src/solver/variable/variable.hxx b/src/solver/variable/variable.hxx index fa003b8007..ff1ee7fd2a 100644 --- a/src/solver/variable/variable.hxx +++ b/src/solver/variable/variable.hxx @@ -366,9 +366,9 @@ inline void IVariable::weekEnd(State& state) template inline void IVariable::buildSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision) const + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision) const { // Generating value for the area // Only if there are some results to export... @@ -394,9 +394,9 @@ inline void IVariable::buildSurveyReport(SurveyResults& r template inline void IVariable::buildAnnualSurveyReport(SurveyResults& results, - int dataLevel, - int fileLevel, - int precision, + Category::DataLevel dataLevel, + Category::File fileLevel, + Category::Precision precision, uint numSpace) const { // Generating value for the area @@ -420,8 +420,8 @@ inline void IVariable::buildAnnualSurveyReport(SurveyResu template inline void IVariable::buildDigest(SurveyResults& results, - int digestLevel, - int dataLevel) const + Category::Digest digestLevel, + Category::DataLevel dataLevel) const { // Generate the Digest for the local results (areas part) if (VCardType::columnCount != 0