#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 // 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 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 double & DEM(week_t w) {return CInstanceReduite::m_DEM[w];} static inline double & EDEM(week_t w) {return CInstanceReduite::m_EDEM[w];} static inline double & ThProdMin(week_t w) {return CInstanceReduite::m_ThProdMin[w];} // Ajout static inline double & ThProdMax(week_t w) {return CInstanceReduite::m_ThProdMax[w];} // Ajout static inline double & ThCout(week_t w) {return CInstanceReduite::m_ThCout[w];} // Ajout #endif static void cacluleEMAXParSemaine() ; static std::vector > m_EMAX ; static std::vector > m_PMAX ; static inline double & EMAX(powerplants2_t i, week_t w) { return m_EMAX[i][w]; } static inline double & PMAX(powerplants2_t i, week_t w) { return m_PMAX[i][w]; } private: static int m_week_duration ; static void calculeThProdParSemaine() ; static void calculeThCoutParSemaine() ; }; #ifdef RED_MOYENNE static inline const double & DEM(week_t w) {return CInstanceReduite::DEM(w);} static inline const double & EDEM(week_t w) {return CInstanceReduite::EDEM(w);} #endif static inline const double & DEM_min(week_t w) {return CInstanceReduite::getDEM_min()[w];} static inline const double & EDEM_min(week_t w) {return CInstanceReduite::getEDEM_min()[w];} static inline const double & EMAX(powerplants2_t i, week_t w) { return CInstanceReduite::EMAX(i,w); } static inline const double & PMAX(powerplants2_t i, week_t w) { return CInstanceReduite::PMAX(i,w); } #endif