#ifndef CINSTANCEREDUITE_H #define CINSTANCEREDUITE_H #include #include "indices.h" #include "../tuning.h" /** @author Antoine Rozenknop */ class CInstanceReduite{ public: static void init(); #ifdef RED_MOYENNE /* demande moyenne par semaine */ protected: static void calculeMoyenneDemandeParSemaine() ; static std::vector m_DEM ; // power_demand[w] (moyenne sur les scenarii) static std::vector m_DEM_min ; // power_demande minimale sur les scenarii static std::vector m_EDEM ; // energy_demand[w] (moyenne sur les scenarii) static std::vector m_EDEM_min ; // energy_demande minimale sur les scenarii static std::vector > m_EDEM_par_scenario ; // demande par scenario et par semaine // Ajout Daniel 12/10 static std::vector m_ThProdMin ; // Production min des centrales thermiques (moy sur scenario) static std::vector m_ThProdMax ; // Production max des centrales thermiques (moy sur scenario) static std::vector m_ThCout ; // Cout moyen de production thermique // production thermique totale par scénario static std::vector > m_ThMinS ; // Production min des centrales thermiques static std::vector > m_ThMaxS ; // Production max des centrales thermiques static std::vector > m_ThCoutS ; // Cout moyen de production thermique public: static const std::vector & getDEM() { return m_DEM; } static const std::vector & getDEM_min() { return m_DEM_min; } static const std::vector & getEDEM() { return m_EDEM; } static const std::vector & getEDEM_min() { return m_EDEM_min; } public: static inline kW & DEM(week_t w) {return CInstanceReduite::m_DEM[w];} static inline kWh & EDEM(week_t w) {return CInstanceReduite::m_EDEM[w];} static inline kWh & EDEM(scenario_t s, week_t w) {return m_EDEM_par_scenario[s][w];} static inline kWh & ThProdMin(week_t w) {return m_ThProdMin[w];} // Ajout static inline kWh & ThProdMax(week_t w) {return m_ThProdMax[w];} // Ajout static inline euros_par_kWh & ThCout(week_t w) {return m_ThCout[w];} static inline kWh & ThMin(scenario_t s, week_t w) {return m_ThMinS[s][w];} static inline kWh & ThMax(scenario_t s, week_t w) {return m_ThMaxS[s][w];} static inline euros_par_kWh & ThCout(scenario_t s, week_t w) {return m_ThCoutS[s][w];} #endif // type 2 static void calculeEMAXParSemaine() ; static std::vector > m_EMAX ; static std::vector > m_PMAX ; static std::vector m_moyenne_EMAX ; static inline kWh & EMAX(powerplants2_t i, week_t w) { return m_EMAX[i][w]; } static inline kW & PMAX(powerplants2_t i, week_t w) { return m_PMAX[i][w]; } static inline kWh & EMAX(powerplants2_t i) { return m_moyenne_EMAX[i]; } // type 1 static void calculeType1ParSemaine() ; static std::vector > > m_EMIN_week ; static std::vector > > m_EMAX_week ; static std::vector > > m_C_week ; static inline kWh & EMIN(powerplants1_t j, scenario_t s, week_t h) { return m_EMIN_week[j][s][h]; } static inline kWh & EMAX(powerplants1_t j, scenario_t s, week_t h) { return m_EMAX_week[j][s][h]; } static inline euros_par_kWh & C(powerplants1_t j, scenario_t s, week_t h) { return m_C_week[j][s][h]; } static std::vector > m_EMIN_moyen ; // Production min de chaque centrale thermique (moy sur scenario) static std::vector > m_EMAX_moyen ; // Production max de chaque centrale thermique (moy sur scenario) static std::vector > m_C_moyen ; // Coût moyen de chaque centrale thermique (moy sur scenario) static inline kWh & EMIN(powerplants1_t j, week_t h) { return m_EMIN_moyen[j][h]; } static inline kWh & EMAX(powerplants1_t j, week_t h) { return m_EMAX_moyen[j][h]; } static inline euros_par_kWh & C(powerplants1_t j, week_t h) { return m_C_moyen[j][h]; } private: static heure m_week_duration ; static void calculeThProdParSemaine() ; // static void calculeThCoutParSemaine() ; }; #ifdef RED_MOYENNE static inline const kW & DEM(week_t w) {return CInstanceReduite::DEM(w);} static inline const kWh & EDEM(week_t w) {return CInstanceReduite::EDEM(w);} static inline const kWh & EDEM(scenario_t s, week_t w) {return CInstanceReduite::EDEM(s, w);} #endif static inline const kW & DEM_min(week_t w) {return CInstanceReduite::getDEM_min()[w];} static inline const kWh & EDEM_min(week_t w) {return CInstanceReduite::getEDEM_min()[w];} static inline const kWh & EMAX(powerplants2_t i, week_t w) { return CInstanceReduite::EMAX(i,w); } static inline const kW & PMAX(powerplants2_t i, week_t w) { return CInstanceReduite::PMAX(i,w); } static inline const kWh & EMAX(powerplants2_t i) { return CInstanceReduite::EMAX(i); } static inline kWh & EMIN(powerplants1_t j, scenario_t s, week_t h) { return CInstanceReduite::EMIN(j,s,h); } static inline kWh & EMAX(powerplants1_t j, scenario_t s, week_t h) { return CInstanceReduite::EMAX(j,s,h);; } static inline euros_par_kWh & C(powerplants1_t j, scenario_t s, week_t h) { return CInstanceReduite::C(j,s,h); } static inline kWh & EMIN(powerplants1_t j, week_t h) { return CInstanceReduite::EMIN(j,h); } static inline kWh & EMAX(powerplants1_t j, week_t h) { return CInstanceReduite::EMAX(j,h); } static inline euros_par_kWh & C(powerplants1_t j, week_t h) { return CInstanceReduite::C(j,h); } static inline kWh & ThMin(scenario_t s, week_t h) { return CInstanceReduite::ThMin(s,h); } static inline kWh & ThMax(scenario_t s, week_t h) { return CInstanceReduite::ThMax(s,h); } static inline euros_par_kWh & ThCout(scenario_t s, week_t h) { return CInstanceReduite::ThCout(s,h); } #endif