22 #ifndef __SOLVER_SIMULATION_ECO_STRUCTS_H__
23 #define __SOLVER_SIMULATION_ECO_STRUCTS_H__
28 #include "antares/solver/optimisation/opt_constants.h"
29 #include "antares/solver/optimisation/opt_structure_probleme_a_resoudre.h"
30 #include "antares/solver/utils/optimization_statistics.h"
31 #include "antares/study/fwd.h"
32 #include "antares/study/study.h"
43 std::vector<int> NumeroDeVariableDeLInterconnexion;
44 std::vector<int> NumeroDeVariableCoutOrigineVersExtremiteDeLInterconnexion;
45 std::vector<int> NumeroDeVariableCoutExtremiteVersOrigineDeLInterconnexion;
47 std::vector<int> NumeroDeVariableDuPalierThermique;
49 std::vector<int> NumeroDeVariablesDeLaProdHyd;
51 std::vector<int> NumeroDeVariablesDePompage;
52 std::vector<int> NumeroDeVariablesDeNiveau;
53 std::vector<int> NumeroDeVariablesDeDebordement;
55 std::vector<int> NumeroDeVariableDefaillancePositive;
57 std::vector<int> NumeroDeVariableDefaillanceNegative;
59 std::vector<int> NumeroDeVariablesVariationHydALaBaisse;
61 std::vector<int> NumeroDeVariablesVariationHydALaHausse;
63 std::vector<int> NumeroDeVariableDuNombreDeGroupesEnMarcheDuPalierThermique;
64 std::vector<int> NumeroDeVariableDuNombreDeGroupesQuiDemarrentDuPalierThermique;
65 std::vector<int> NumeroDeVariableDuNombreDeGroupesQuiSArretentDuPalierThermique;
66 std::vector<int> NumeroDeVariableDuNombreDeGroupesQuiTombentEnPanneDuPalierThermique;
70 std::vector<int> InjectionVariable;
71 std::vector<int> WithdrawalVariable;
72 std::vector<int> LevelVariable;
73 std::vector<int> CostVariationInjection;
74 std::vector<int> CostVariationWithdrawal;
75 std::vector<int> OverflowVariable;
76 } SIM_ShortTermStorage;
86 std::vector<int> NumeroDeContrainteDesBilansPays;
87 std::vector<int> NumeroDeContraintePourEviterLesChargesFictives;
89 std::vector<int> NumeroPremiereContrainteDeReserveParZone;
90 std::vector<int> NumeroDeuxiemeContrainteDeReserveParZone;
92 std::vector<int> NumeroDeContrainteDeDissociationDeFlux;
93 std::vector<int> NumeroDeContrainteDesContraintesCouplantes;
95 std::vector<int> NumeroDeContrainteDesContraintesDeDureeMinDeMarche;
96 std::vector<int> NumeroDeContrainteDesContraintesDeDureeMinDArret;
97 std::vector<int> NumeroDeLaDeuxiemeContrainteDesContraintesDesGroupesQuiTombentEnPanne;
99 std::vector<int> NumeroDeContrainteDesNiveauxPays;
101 std::vector<int> ShortTermStorageLevelConstraint;
110 std::vector<int> NumeroDeContrainteDesContraintesCouplantes;
115 std::vector<int> NumeroDeContrainteDesContraintesCouplantes;
121 std::vector<double> ValeurDeNTCOrigineVersExtremite;
122 std::vector<double> ValeurDeNTCExtremiteVersOrigine;
123 std::vector<double> ValeurDeLoopFlowOrigineVersExtremite;
124 std::vector<double> ValeurDuFlux;
126 std::vector<double> ResistanceApparente;
131 double* TransferBoundMarketEdge;
132 double* TransferLevelMarketEdge;
137 double* TransferBoundFlexUpEdge;
138 double* TransferLevelFlexUpEdge;
143 double* TransferBoundFlexDownEdge;
144 double* TransferLevelFlexDownEdge;
149 char TypeDeContrainteCouplante;
150 char SensDeLaContrainteCouplante;
152 std::vector<double> SecondMembreDeLaContrainteCouplante;
154 int NombreDInterconnexionsDansLaContrainteCouplante;
156 std::vector<double> PoidsDeLInterconnexion;
157 std::vector<int> NumeroDeLInterconnexion;
158 std::vector<int> OffsetTemporelSurLInterco;
160 int NombreDePaliersDispatchDansLaContrainteCouplante;
162 std::vector<double> PoidsDuPalierDispatch;
163 std::vector<int> PaysDuPalierDispatch;
164 std::vector<int> NumeroDuPalierDispatch;
165 std::vector<int> OffsetTemporelSurLePalierDispatch;
167 const char* NomDeLaContrainteCouplante;
169 std::shared_ptr<Antares::Data::BindingConstraint> bindingConstraint;
174 double reservoirCapacity;
175 double injectionNominalCapacity;
176 double withdrawalNominalCapacity;
177 double injectionEfficiency;
178 double withdrawalEfficiency;
180 bool initialLevelOptim;
181 bool penalizeVariationWithdrawal;
182 bool penalizeVariationInjection;
183 bool allowOverflow{
false};
184 double overflowCost{0.0};
186 std::shared_ptr<Antares::Data::ShortTermStorage::Series> series;
187 std::vector<std::shared_ptr<Antares::Data::ShortTermStorage::AdditionalConstraints>>
188 additionalConstraints;
189 int clusterGlobalIndex;
193 using AREA_INPUT = std::vector<PROPERTIES>;
198 std::vector<double> level;
199 std::vector<double> injection;
200 std::vector<double> withdrawal;
205 double* TotalDemandOfMarketPool;
210 double* FosteredDemandOfFlexUpPool;
215 double* FosteredDemandOfFlexDownPool;
220 double* BoundFlexUpNode;
225 double* BoundFlexDownNode;
230 double* LevelFlexUpNode;
235 double* LevelFlexDownNode;
240 std::vector<double> ConsommationAbattueDuPays;
245 std::vector<double> AllMustRunGenerationOfArea;
250 std::vector<double> SoldeMoyenDuPays;
255 std::vector<double> PuissanceDisponibleDuPalierThermique;
256 std::vector<double> PuissanceDisponibleDuPalierThermiqueRef;
258 std::vector<double> PuissanceMinDuPalierThermique;
259 std::vector<double> PuissanceMinDuPalierThermiqueRef;
261 std::vector<double> CoutHoraireDeProductionDuPalierThermique;
263 std::vector<int> NombreMaxDeGroupesEnMarcheDuPalierThermique;
264 std::vector<int> NombreMinDeGroupesEnMarcheDuPalierThermique;
269 int NombreDePaliersThermiques;
271 std::vector<int> minUpDownTime;
273 std::vector<double> TailleUnitaireDUnGroupeDuPalierThermique;
274 std::vector<double> PminDuPalierThermiquePendantUneHeure;
275 std::vector<double> PminDuPalierThermiquePendantUnJour;
276 std::vector<int> NumeroDuPalierDansLEnsembleDesPaliersThermiques;
277 std::vector<PDISP_ET_COUTS_HORAIRES_PAR_PALIER> PuissanceDisponibleEtCout;
279 std::vector<double> CoutDeDemarrageDUnGroupeDuPalierThermique;
280 std::vector<double> CoutDArretDUnGroupeDuPalierThermique;
281 std::vector<double> CoutFixeDeMarcheDUnGroupeDuPalierThermique;
282 std::vector<double> pminDUnGroupeDuPalierThermique;
283 std::vector<double> PmaxDUnGroupeDuPalierThermique;
284 std::vector<int> DureeMinimaleDeMarcheDUnGroupeDuPalierThermique;
285 std::vector<int> DureeMinimaleDArretDUnGroupeDuPalierThermique;
286 std::vector<std::string> NomsDesPaliersThermiques;
291 std::vector<double> MinEnergieHydrauParIntervalleOptimise;
292 std::vector<double> MaxEnergieHydrauParIntervalleOptimise;
294 std::vector<double> CntEnergieH2OParIntervalleOptimise;
295 std::vector<double> CntEnergieH2OParJour;
297 std::vector<double> ContrainteDePmaxHydrauliqueHoraire;
298 std::vector<double> ContrainteDePmaxHydrauliqueHoraireRef;
300 std::vector<double> MaxEnergiePompageParIntervalleOptimise;
301 std::vector<double> ContrainteDePmaxPompageHoraire;
303 double MaxDesPmaxHydrauliques;
305 bool PresenceDePompageModulable;
306 bool PresenceDHydrauliqueModulable;
308 double PenalisationDeLaVariationDeProductionHydrauliqueSurSommeDesVariations;
309 double PenalisationDeLaVariationDeProductionHydrauliqueSurVariationMax;
311 double WeeklyWaterValueStateRegular;
313 bool TurbinageEntreBornes;
314 bool SansHeuristique;
315 bool SuiviNiveauHoraire;
317 std::vector<double> NiveauHoraireSup;
318 std::vector<double> NiveauHoraireInf;
320 std::vector<double> ApportNaturelHoraire;
321 std::vector<double> MingenHoraire;
322 double NiveauInitialReservoir;
323 double TailleReservoir;
326 double WeeklyGeneratingModulation;
327 double WeeklyPumpingModulation;
328 bool DirectLevelAccess;
329 bool AccurateWaterValue;
330 std::vector<double> WaterLayerValues;
332 std::vector<double> InflowForTimeInterval;
338 std::vector<double> ReserveHoraireJMoins1;
343 std::vector<double> ProductionThermiqueDuPalier;
345 std::vector<double> NombreDeGroupesEnMarcheDuPalier;
346 std::vector<double> NombreDeGroupesQuiDemarrentDuPalier;
348 std::vector<double> NombreDeGroupesQuiSArretentDuPalier;
350 std::vector<double> NombreDeGroupesQuiTombentEnPanneDuPalier;
355 std::vector<double> ValeursHorairesDeDefaillancePositive;
356 std::vector<double> ValeursHorairesDeDefaillancePositiveCSR;
357 std::vector<double> ValeursHorairesDENS;
358 std::vector<int> ValeursHorairesLmrViolations;
359 std::vector<double> ValeursHorairesDtgMrgCsr;
361 std::vector<double> ValeursHorairesDeDefaillanceNegative;
363 std::vector<double> PompageHoraire;
364 std::vector<double> TurbinageHoraire;
366 std::vector<double> niveauxHoraires;
367 std::vector<double> valeurH2oHoraire;
369 std::vector<double> debordementsHoraires;
371 std::vector<double> CoutsMarginauxHoraires;
372 std::vector<double> CoutsMarginauxHorairesCSR;
373 std::vector<PRODUCTION_THERMIQUE_OPTIMALE> ProductionThermique;
375 std::vector<::RESULTS> ShortTermStorage;
380 bool IntercoGereeAvecDesCouts;
381 bool IntercoGereeAvecLoopFlow;
382 std::vector<double> CoutDeTransportOrigineVersExtremite;
383 std::vector<double> CoutDeTransportExtremiteVersOrigine;
385 std::vector<double> CoutDeTransportOrigineVersExtremiteRef;
386 std::vector<double> CoutDeTransportExtremiteVersOrigineRef;
395 using TIME_MEASURES = std::array<TIME_MEASURE, 2>;
399 std::vector<double> VariableDualeParInterconnexion;
404 uint32_t weekInTheYear = 0;
408 bool OptimisationAuPasHebdomadaire =
false;
409 char TypeDeLissageHydraulique = PAS_DE_LISSAGE_HYDRAULIQUE;
410 bool OptimisationAvecCoutsDeDemarrage =
false;
411 bool OptimisationAvecVariablesEntieres =
false;
412 uint32_t NombreDePays = 0;
413 std::vector<const char*> NomsDesPays;
414 uint32_t NombreDePaliersThermiques = 0;
416 uint32_t NombreDInterconnexions = 0;
417 std::vector<int> PaysOrigineDeLInterconnexion;
418 std::vector<int> PaysExtremiteDeLInterconnexion;
419 std::vector<COUTS_DE_TRANSPORT> CoutDeTransport;
421 std::vector<VALEURS_DE_NTC_ET_RESISTANCES> ValeursDeNTC;
423 uint32_t NombreDePasDeTemps = 0;
424 std::vector<int32_t> NumeroDeJourDuPasDeTemps;
427 int32_t NombreDePasDeTempsPourUneOptimisation = 0;
428 std::vector<int32_t> NumeroDIntervalleOptimiseDuPasDeTemps;
429 uint32_t NombreDeJours = 0;
432 int32_t NombreDePasDeTempsDUneJournee = 0;
434 std::vector<CONSOMMATIONS_ABATTUES> ConsommationsAbattues;
436 std::vector<double> CoutDeDefaillancePositive;
437 std::vector<double> CoutDeDefaillanceNegative;
439 std::vector<double> CoutDeDebordement;
441 std::vector<PALIERS_THERMIQUES> PaliersThermiquesDuPays;
442 std::vector<ENERGIES_ET_PUISSANCES_HYDRAULIQUES> CaracteristiquesHydrauliques;
444 uint32_t NumberOfShortTermStorages = 0;
445 std::vector<::AREA_INPUT> ShortTermStorage;
448 std::vector<bool> DefaillanceNegativeUtiliserPMinThermique;
449 std::vector<bool> DefaillanceNegativeUtiliserHydro;
450 std::vector<bool> DefaillanceNegativeUtiliserConsoAbattue;
452 std::vector<std::vector<double>> BruitSurCoutHydraulique;
454 uint32_t NombreDeContraintesCouplantes = 0;
455 std::vector<CONTRAINTES_COUPLANTES> MatriceDesContraintesCouplantes;
456 std::unordered_map<std::shared_ptr<Data::BindingConstraint>, std::vector<double>>
457 ResultatsContraintesCouplantes;
459 std::vector<SOLDE_MOYEN_DES_ECHANGES> SoldeMoyenHoraire;
462 Data::mpsExportStatus ExportMPS = Data::mpsExportStatus::NO_EXPORT;
463 bool exportMPSOnError =
false;
464 bool NamedProblems =
false;
465 bool exportSolutions =
false;
467 uint32_t HeureDansLAnnee = 0;
468 bool LeProblemeADejaEteInstancie =
false;
470 std::vector<CORRESPONDANCES_DES_VARIABLES> CorrespondanceVarNativesVarOptim;
471 std::vector<CORRESPONDANCES_DES_CONTRAINTES> CorrespondanceCntNativesCntOptim;
472 std::vector<CORRESPONDANCES_DES_CONTRAINTES_JOURNALIERES>
473 CorrespondanceCntNativesCntOptimJournalieres;
476 std::vector<RESERVE_JMOINS1> ReserveJMoins1;
478 std::vector<int> IndexDebutIntercoOrigine;
479 std::vector<int> IndexSuivantIntercoOrigine;
480 std::vector<int> IndexDebutIntercoExtremite;
481 std::vector<int> IndexSuivantIntercoExtremite;
483 bool Expansion =
false;
485 std::vector<int> NumeroDeContrainteEnergieHydraulique;
486 std::vector<int> NumeroDeContrainteMinEnergieHydraulique;
487 std::vector<int> NumeroDeContrainteMaxEnergieHydraulique;
488 std::vector<int> NumeroDeContrainteMaxPompage;
489 std::vector<int> NumeroDeContrainteDeSoldeDEchange;
491 std::vector<int> NumeroDeContrainteEquivalenceStockFinal;
492 std::vector<int> NumeroDeContrainteExpressionStockFinal;
494 std::vector<int> NumeroDeVariableStockFinal;
495 std::vector<std::vector<int>> NumeroDeVariableDeTrancheDeStock;
497 bool YaDeLaReserveJmoins1 =
false;
499 std::vector<ALL_MUST_RUN_GENERATION> AllMustRunGeneration;
504 std::shared_ptr<AdequacyPatchRuntimeData> adequacyPatchRuntimeData;
507 std::vector<double> CoefficientEcretementPMaxHydraulique;
508 std::vector<double> previousSimulationFinalLevel;
511 std::vector<RESULTATS_HORAIRES> ResultatsHoraires;
512 std::vector<VARIABLES_DUALES_INTERCONNEXIONS> VariablesDualesDesContraintesDeNTC;
514 std::vector<double> coutOptimalSolution1;
515 std::vector<double> coutOptimalSolution2;
517 TIME_MEASURES timeMeasure;
521 char SecondeOptimisationRelaxee;
522 char MarketPoolActivated;
523 char FlexUpPoolActivated;
524 char FlexDownPoolActivated;
525 char ImpressionDuCritere;
526 char UnitCommitmentExact;
527 char BorneDeLaDefaillancePositive;
529 int NumberOfMarketOfferPool;
530 int NumberOfMarketDemandPool;
531 int NumberOfFlexUpOfferPool;
532 int NumberOfFlexUpDemandPool;
533 int NumberOfFlexDownOfferPool;
534 int NumberOfFlexDownDemandPool;
536 int** IsInMarketOfferPool;
537 int** IsInMarketDemandPool;
538 int** IsInFlexUpOfferPool;
539 int** IsInFlexUpDemandPool;
540 int** IsInFlexDownOfferPool;
541 int** IsInFlexDownDemandPool;
543 int NumberOfMarketEdge;
544 int* OfferPoolOfMarketEdge;
545 int* DemandPoolOfMarketEdge;
547 int* IndexFirstMarketEdgeOffer;
548 int* IndexNextMarketEdgeOffer;
549 int* IndexFirstMarketEdgeDemand;
550 int* IndexNextMarketEdgeDemand;
552 int NumberOfFlexUpEdge;
553 int* OfferPoolOfFlexUpEdge;
554 int* DemandPoolOfFlexUpEdge;
556 int* IndexFirstFlexUpEdgeOffer;
557 int* IndexNextFlexUpEdgeOffer;
558 int* IndexFirstFlexUpEdgeDemand;
559 int* IndexNextFlexUpEdgeDemand;
561 int NumberOfFlexDownEdge;
562 int* OfferPoolOfFlexDownEdge;
563 int* DemandPoolOfFlexDownEdge;
565 int* IndexFirstFlexDownEdgeOffer;
566 int* IndexNextFlexDownEdgeOffer;
567 int* IndexFirstFlexDownEdgeDemand;
568 int* IndexNextFlexDownEdgeDemand;
570 double** MarketPoolQuota;
572 double** FlexUpPoolQuota;
574 double** FlexDownPoolQuota;
588 int* MarketOfferPoolOfNode;
589 int* MarketDemandPoolOfNode;
590 int* FlexUpOfferPoolOfNode;
591 int* FlexUpDemandPoolOfNode;
592 int* FlexDownOfferPoolOfNode;
593 int* FlexDownDemandPoolOfNode;
598 std::vector<int> NbGrpCourbeGuide;
599 std::vector<int> NbGrpOpt;
601 std::unique_ptr<PROBLEME_ANTARES_A_RESOUDRE>
602 ProblemeAResoudre = std::make_unique<PROBLEME_ANTARES_A_RESOUDRE>();
Definition: adequacy_patch_runtime_data.h:32
Definition: optimization_statistics.h:29
Definition: ShortTermStorageCostVariation.h:49
Definition: ShortTermStorageCostVariation.h:63
Definition: ShortTermStorageCostVariation.h:77
Definition: ShortTermStorageCostVariation.h:91
Definition: ShortTermStorageCumulation.h:26
Definition: sim_structure_probleme_economique.h:244
Definition: sim_structure_probleme_economique.h:224
Definition: sim_structure_probleme_economique.h:219
Definition: sim_structure_probleme_economique.h:239
Definition: sim_structure_probleme_economique.h:148
Definition: sim_structure_probleme_economique.h:114
Definition: sim_structure_probleme_economique.h:109
Definition: sim_structure_probleme_economique.h:80
Definition: sim_structure_probleme_economique.h:37
Definition: sim_structure_probleme_economique.h:379
Definition: sim_structure_probleme_economique.h:214
Definition: sim_structure_probleme_economique.h:209
Definition: sim_structure_probleme_economique.h:204
Definition: sim_structure_probleme_economique.h:290
Definition: sim_structure_probleme_economique.h:234
Definition: sim_structure_probleme_economique.h:229
Definition: sim_structure_probleme_economique.h:268
Definition: sim_structure_probleme_economique.h:254
Definition: sim_structure_probleme_economique.h:403
Definition: sim_structure_probleme_economique.h:342
Definition: sim_structure_probleme_economique.h:173
Definition: sim_structure_probleme_economique.h:337
Definition: sim_structure_probleme_economique.h:354
Definition: sim_structure_probleme_economique.h:196
Definition: sim_structure_probleme_economique.h:249
Definition: sim_structure_probleme_economique.h:390
Definition: sim_structure_probleme_economique.h:142
Definition: sim_structure_probleme_economique.h:136
Definition: sim_structure_probleme_economique.h:130
Definition: sim_structure_probleme_economique.h:120
Definition: sim_structure_probleme_economique.h:398