From 7f8054d07b0169b48be35a530e04e379abca5151 Mon Sep 17 00:00:00 2001 From: Abdoulbari ZAKIR Date: Mon, 11 Sep 2023 10:40:19 +0200 Subject: [PATCH] about objects lifetime --- ...struction_matrice_des_contraintes_cas_lineaire.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/solver/optimisation/opt_construction_matrice_des_contraintes_cas_lineaire.cpp b/src/solver/optimisation/opt_construction_matrice_des_contraintes_cas_lineaire.cpp index 7a96da2767..e18b4ecb99 100644 --- a/src/solver/optimisation/opt_construction_matrice_des_contraintes_cas_lineaire.cpp +++ b/src/solver/optimisation/opt_construction_matrice_des_contraintes_cas_lineaire.cpp @@ -71,6 +71,11 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaire(PROBLEME_HEBDO* pro ConstraintNamer constraintNamer(ProblemeAResoudre->NomDesContraintes, problemeHebdo->NamedProblems); + AreaBalance areaBalance(problemeHebdo); + FictitiousLoad fictitiousLoad(problemeHebdo); + ShortTermStorageLevel shortTermStorageLevel(problemeHebdo); + FlowDissociation flowDissociation(problemeHebdo); + BindingConstraintHour bindingConstraintHour(problemeHebdo); BindingConstraintDay bindingConstraintDay(problemeHebdo); BindingConstraintWeek bindingConstraintWeek(problemeHebdo); HydroPower hydroPower(problemeHebdo); @@ -97,12 +102,6 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaire(PROBLEME_HEBDO* pro CORRESPONDANCES_DES_CONTRAINTES& CorrespondanceCntNativesCntOptim = problemeHebdo->CorrespondanceCntNativesCntOptim[pdt]; - AreaBalance areaBalance(problemeHebdo); - FictitiousLoad fictitiousLoad(problemeHebdo); - ShortTermStorageLevel shortTermStorageLevel(problemeHebdo); - FlowDissociation flowDissociation(problemeHebdo); - BindingConstraintHour bindingConstraintHour(problemeHebdo); - for (uint32_t pays = 0; pays < problemeHebdo->NombreDePays; pays++) { areaBalance.add(pdt, pays);