From 4ffd24f407c049ce9a8eb123fa25ba2790edb181 Mon Sep 17 00:00:00 2001 From: Abdoulbari ZAKIR Date: Thu, 5 Oct 2023 11:27:24 +0200 Subject: [PATCH 1/4] try fix --- .../constraints/NbUnitsOutageLessThanNbUnitsStop.cpp | 2 +- .../opt_construction_contraintes_couts_demarrage.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/solver/optimisation/constraints/NbUnitsOutageLessThanNbUnitsStop.cpp b/src/solver/optimisation/constraints/NbUnitsOutageLessThanNbUnitsStop.cpp index 1a7e0f3a7f..13c564d7db 100644 --- a/src/solver/optimisation/constraints/NbUnitsOutageLessThanNbUnitsStop.cpp +++ b/src/solver/optimisation/constraints/NbUnitsOutageLessThanNbUnitsStop.cpp @@ -35,7 +35,7 @@ void NbUnitsOutageLessThanNbUnitsStop::add(int pays, } else { - nbTermesContraintesPourLesCoutsDeDemarrage += 4; + nbTermesContraintesPourLesCoutsDeDemarrage += 2; problemeHebdo->ProblemeAResoudre->NombreDeContraintes++; } } diff --git a/src/solver/optimisation/opt_construction_contraintes_couts_demarrage.cpp b/src/solver/optimisation/opt_construction_contraintes_couts_demarrage.cpp index 600cbe71d2..5c4094e303 100644 --- a/src/solver/optimisation/opt_construction_contraintes_couts_demarrage.cpp +++ b/src/solver/optimisation/opt_construction_contraintes_couts_demarrage.cpp @@ -69,10 +69,12 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage( pMaxDispatchableGeneration.add(pays, palier, index, pdt, Simulation); nbTermesContraintesPourLesCoutsDeDemarrage += pMaxDispatchableGeneration.nbTermesContraintesPourLesCoutsDeDemarrage; - + pMaxDispatchableGeneration.nbTermesContraintesPourLesCoutsDeDemarrage = 0; + pMinDispatchableGeneration.add(pays, palier, index, pdt, Simulation); nbTermesContraintesPourLesCoutsDeDemarrage += pMinDispatchableGeneration.nbTermesContraintesPourLesCoutsDeDemarrage; + pMinDispatchableGeneration.nbTermesContraintesPourLesCoutsDeDemarrage =0; } } } @@ -95,6 +97,7 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage( nbTermesContraintesPourLesCoutsDeDemarrage += consistenceNumberOfDispatchableUnits .nbTermesContraintesPourLesCoutsDeDemarrage; + consistenceNumberOfDispatchableUnits.nbTermesContraintesPourLesCoutsDeDemarrage=0; } } } @@ -116,6 +119,7 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage( nbUnitsOutageLessThanNbUnitsStop.add(pays, palier, index, pdt, Simulation); nbTermesContraintesPourLesCoutsDeDemarrage += nbUnitsOutageLessThanNbUnitsStop.nbTermesContraintesPourLesCoutsDeDemarrage; + nbUnitsOutageLessThanNbUnitsStop.nbTermesContraintesPourLesCoutsDeDemarrage=0; } } } @@ -138,6 +142,7 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage( nbDispUnitsMinBoundSinceMinUpTime.add(pays, palier, index, pdt, Simulation); nbTermesContraintesPourLesCoutsDeDemarrage += nbDispUnitsMinBoundSinceMinUpTime.nbTermesContraintesPourLesCoutsDeDemarrage; + nbDispUnitsMinBoundSinceMinUpTime.nbTermesContraintesPourLesCoutsDeDemarrage=0; } } } @@ -157,6 +162,7 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage( minDownTime.add(pays, palier, index, pdt, Simulation); nbTermesContraintesPourLesCoutsDeDemarrage += minDownTime.nbTermesContraintesPourLesCoutsDeDemarrage; + minDownTime.nbTermesContraintesPourLesCoutsDeDemarrage=0; } } } From 29fe61aea4c8030e31bb73eaad5f5480df877d11 Mon Sep 17 00:00:00 2001 From: Abdoulbari ZAKIR Date: Thu, 5 Oct 2023 11:28:32 +0200 Subject: [PATCH 2/4] first test long test 2 --- .github/workflows/windows-vcpkg.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 3a9bc71d65..81a328f49c 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -153,6 +153,13 @@ jobs: path: 'simtest.json' prop_path: 'version' + - name: Run long-tests-2 + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: long-tests-2 + os: ${{ matrix.test-platform }} + - name: Run named mps tests uses: ./.github/workflows/run-tests with: @@ -212,13 +219,6 @@ jobs: batch-name: long-tests-1 os: ${{ matrix.test-platform }} - - name: Run long-tests-2 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-2 - os: ${{ matrix.test-platform }} - name: Run long-tests-3 if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} From d3dd1cc9eb0d61c0e21f010517c01dabe9409774 Mon Sep 17 00:00:00 2001 From: Abdoulbari ZAKIR Date: Thu, 5 Oct 2023 16:09:32 +0200 Subject: [PATCH 3/4] move implementation details --- .../ConsistenceNumberOfDispatchableUnits.cpp | 2 +- .../ConsistenceNumberOfDispatchableUnits.h | 1 - .../optimisation/constraints/MinDownTime.cpp | 2 +- .../optimisation/constraints/MinDownTime.h | 1 - .../NbDispUnitsMinBoundSinceMinUpTime.cpp | 2 +- .../NbDispUnitsMinBoundSinceMinUpTime.h | 1 - .../NbUnitsOutageLessThanNbUnitsStop.cpp | 2 +- .../NbUnitsOutageLessThanNbUnitsStop.h | 1 - .../PMaxDispatchableGeneration.cpp | 2 +- .../constraints/PMaxDispatchableGeneration.h | 1 - .../PMinDispatchableGeneration.cpp | 4 +-- .../constraints/PMinDispatchableGeneration.h | 1 - ...nstruction_contraintes_couts_demarrage.cpp | 25 ------------------- 13 files changed, 7 insertions(+), 38 deletions(-) diff --git a/src/solver/optimisation/constraints/ConsistenceNumberOfDispatchableUnits.cpp b/src/solver/optimisation/constraints/ConsistenceNumberOfDispatchableUnits.cpp index 432d84414a..03119ed030 100644 --- a/src/solver/optimisation/constraints/ConsistenceNumberOfDispatchableUnits.cpp +++ b/src/solver/optimisation/constraints/ConsistenceNumberOfDispatchableUnits.cpp @@ -41,7 +41,7 @@ void ConsistenceNumberOfDispatchableUnits::add(int pays, } else { - nbTermesContraintesPourLesCoutsDeDemarrage += 4; + problemeHebdo->NbTermesContraintesPourLesCoutsDeDemarrage += 4; problemeHebdo->ProblemeAResoudre->NombreDeContraintes++; } } diff --git a/src/solver/optimisation/constraints/ConsistenceNumberOfDispatchableUnits.h b/src/solver/optimisation/constraints/ConsistenceNumberOfDispatchableUnits.h index ae3b1341b8..43af772514 100644 --- a/src/solver/optimisation/constraints/ConsistenceNumberOfDispatchableUnits.h +++ b/src/solver/optimisation/constraints/ConsistenceNumberOfDispatchableUnits.h @@ -16,5 +16,4 @@ class ConsistenceNumberOfDispatchableUnits : private ConstraintFactory * @param Simulation : --- */ void add(int pays, int cluster, int clusterIndex, int pdt, bool Simulation); - int nbTermesContraintesPourLesCoutsDeDemarrage = 0; }; \ No newline at end of file diff --git a/src/solver/optimisation/constraints/MinDownTime.cpp b/src/solver/optimisation/constraints/MinDownTime.cpp index e70e220e54..ca4805d007 100644 --- a/src/solver/optimisation/constraints/MinDownTime.cpp +++ b/src/solver/optimisation/constraints/MinDownTime.cpp @@ -43,7 +43,7 @@ void MinDownTime::add(int pays, int cluster, int clusterIndex, int pdt, bool Sim } else { - nbTermesContraintesPourLesCoutsDeDemarrage + problemeHebdo->NbTermesContraintesPourLesCoutsDeDemarrage += 1 + DureeMinimaleDArretDUnGroupeDuPalierThermique; problemeHebdo->ProblemeAResoudre->NombreDeContraintes++; } diff --git a/src/solver/optimisation/constraints/MinDownTime.h b/src/solver/optimisation/constraints/MinDownTime.h index 5d24da5058..567a766b6d 100644 --- a/src/solver/optimisation/constraints/MinDownTime.h +++ b/src/solver/optimisation/constraints/MinDownTime.h @@ -16,5 +16,4 @@ class MinDownTime : private ConstraintFactory * @param Simulation : --- */ void add(int pays, int cluster, int clusterIndex, int pdt, bool Simulation); - int nbTermesContraintesPourLesCoutsDeDemarrage = 0; }; \ No newline at end of file diff --git a/src/solver/optimisation/constraints/NbDispUnitsMinBoundSinceMinUpTime.cpp b/src/solver/optimisation/constraints/NbDispUnitsMinBoundSinceMinUpTime.cpp index 31c23ac290..06a341f14d 100644 --- a/src/solver/optimisation/constraints/NbDispUnitsMinBoundSinceMinUpTime.cpp +++ b/src/solver/optimisation/constraints/NbDispUnitsMinBoundSinceMinUpTime.cpp @@ -52,7 +52,7 @@ void NbDispUnitsMinBoundSinceMinUpTime::add(int pays, } else { - nbTermesContraintesPourLesCoutsDeDemarrage + problemeHebdo->NbTermesContraintesPourLesCoutsDeDemarrage += 1 + 2 * DureeMinimaleDeMarcheDUnGroupeDuPalierThermique; problemeHebdo->ProblemeAResoudre->NombreDeContraintes++; } diff --git a/src/solver/optimisation/constraints/NbDispUnitsMinBoundSinceMinUpTime.h b/src/solver/optimisation/constraints/NbDispUnitsMinBoundSinceMinUpTime.h index ec0c1afd7f..ab86556a21 100644 --- a/src/solver/optimisation/constraints/NbDispUnitsMinBoundSinceMinUpTime.h +++ b/src/solver/optimisation/constraints/NbDispUnitsMinBoundSinceMinUpTime.h @@ -17,5 +17,4 @@ class NbDispUnitsMinBoundSinceMinUpTime : private ConstraintFactory * @param Simulation : --- */ void add(int pays, int cluster, int clusterIndex, int pdt, bool Simulation); - int nbTermesContraintesPourLesCoutsDeDemarrage = 0; }; \ No newline at end of file diff --git a/src/solver/optimisation/constraints/NbUnitsOutageLessThanNbUnitsStop.cpp b/src/solver/optimisation/constraints/NbUnitsOutageLessThanNbUnitsStop.cpp index 13c564d7db..472aedc323 100644 --- a/src/solver/optimisation/constraints/NbUnitsOutageLessThanNbUnitsStop.cpp +++ b/src/solver/optimisation/constraints/NbUnitsOutageLessThanNbUnitsStop.cpp @@ -35,7 +35,7 @@ void NbUnitsOutageLessThanNbUnitsStop::add(int pays, } else { - nbTermesContraintesPourLesCoutsDeDemarrage += 2; + problemeHebdo->NbTermesContraintesPourLesCoutsDeDemarrage += 2; problemeHebdo->ProblemeAResoudre->NombreDeContraintes++; } } diff --git a/src/solver/optimisation/constraints/NbUnitsOutageLessThanNbUnitsStop.h b/src/solver/optimisation/constraints/NbUnitsOutageLessThanNbUnitsStop.h index fb8035324c..79c9f714fb 100644 --- a/src/solver/optimisation/constraints/NbUnitsOutageLessThanNbUnitsStop.h +++ b/src/solver/optimisation/constraints/NbUnitsOutageLessThanNbUnitsStop.h @@ -17,5 +17,4 @@ class NbUnitsOutageLessThanNbUnitsStop : private ConstraintFactory * @param Simulation : --- */ void add(int pays, int cluster, int clusterIndex, int pdt, bool Simulation); - int nbTermesContraintesPourLesCoutsDeDemarrage = 0; }; \ No newline at end of file diff --git a/src/solver/optimisation/constraints/PMaxDispatchableGeneration.cpp b/src/solver/optimisation/constraints/PMaxDispatchableGeneration.cpp index c41448bd45..92f4d06eed 100644 --- a/src/solver/optimisation/constraints/PMaxDispatchableGeneration.cpp +++ b/src/solver/optimisation/constraints/PMaxDispatchableGeneration.cpp @@ -32,7 +32,7 @@ void PMaxDispatchableGeneration::add(int pays, } else { - nbTermesContraintesPourLesCoutsDeDemarrage += 2; + problemeHebdo->NbTermesContraintesPourLesCoutsDeDemarrage += 2; problemeHebdo->ProblemeAResoudre->NombreDeContraintes++; } } diff --git a/src/solver/optimisation/constraints/PMaxDispatchableGeneration.h b/src/solver/optimisation/constraints/PMaxDispatchableGeneration.h index 58f14c8223..b82c5dd196 100644 --- a/src/solver/optimisation/constraints/PMaxDispatchableGeneration.h +++ b/src/solver/optimisation/constraints/PMaxDispatchableGeneration.h @@ -17,5 +17,4 @@ class PMaxDispatchableGeneration : private ConstraintFactory * @param Simulation : --- */ void add(int pays, int cluster, int clusterIndex, int pdt, bool Simulation); - int nbTermesContraintesPourLesCoutsDeDemarrage = 0; }; \ No newline at end of file diff --git a/src/solver/optimisation/constraints/PMinDispatchableGeneration.cpp b/src/solver/optimisation/constraints/PMinDispatchableGeneration.cpp index faa7e53d80..c2fe75b9ea 100644 --- a/src/solver/optimisation/constraints/PMinDispatchableGeneration.cpp +++ b/src/solver/optimisation/constraints/PMinDispatchableGeneration.cpp @@ -32,7 +32,7 @@ void PMinDispatchableGeneration::add(int pays, } else { - nbTermesContraintesPourLesCoutsDeDemarrage += 2; - problemeHebdo->ProblemeAResoudre->NombreDeContraintes++; + problemeHebdo->NbTermesContraintesPourLesCoutsDeDemarrage += 2; + problemeHebdo->ProblemeAResoudre->NombreDeContraintes++; } } diff --git a/src/solver/optimisation/constraints/PMinDispatchableGeneration.h b/src/solver/optimisation/constraints/PMinDispatchableGeneration.h index 0d9acf6373..58b1f36438 100644 --- a/src/solver/optimisation/constraints/PMinDispatchableGeneration.h +++ b/src/solver/optimisation/constraints/PMinDispatchableGeneration.h @@ -17,5 +17,4 @@ class PMinDispatchableGeneration : private ConstraintFactory * @param Simulation : --- */ void add(int pays, int cluster, int clusterIndex, int pdt, bool Simulation); - int nbTermesContraintesPourLesCoutsDeDemarrage = 0; }; \ No newline at end of file diff --git a/src/solver/optimisation/opt_construction_contraintes_couts_demarrage.cpp b/src/solver/optimisation/opt_construction_contraintes_couts_demarrage.cpp index 5c4094e303..2c0c6f66b6 100644 --- a/src/solver/optimisation/opt_construction_contraintes_couts_demarrage.cpp +++ b/src/solver/optimisation/opt_construction_contraintes_couts_demarrage.cpp @@ -51,7 +51,6 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage( = problemeHebdo->NombreDePasDeTempsPourUneOptimisation; ConstraintNamer constraintNamer(ProblemeAResoudre->NomDesContraintes); - int nbTermesContraintesPourLesCoutsDeDemarrage = 0; for (uint32_t pays = 0; pays < problemeHebdo->NombreDePays; pays++) { const PALIERS_THERMIQUES& PaliersThermiquesDuPays @@ -67,14 +66,7 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage( for (int pdt = 0; pdt < nombreDePasDeTempsPourUneOptimisation; pdt++) { pMaxDispatchableGeneration.add(pays, palier, index, pdt, Simulation); - nbTermesContraintesPourLesCoutsDeDemarrage - += pMaxDispatchableGeneration.nbTermesContraintesPourLesCoutsDeDemarrage; - pMaxDispatchableGeneration.nbTermesContraintesPourLesCoutsDeDemarrage = 0; - pMinDispatchableGeneration.add(pays, palier, index, pdt, Simulation); - nbTermesContraintesPourLesCoutsDeDemarrage - += pMinDispatchableGeneration.nbTermesContraintesPourLesCoutsDeDemarrage; - pMinDispatchableGeneration.nbTermesContraintesPourLesCoutsDeDemarrage =0; } } } @@ -94,10 +86,6 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage( ConsistenceNumberOfDispatchableUnits consistenceNumberOfDispatchableUnits( problemeHebdo); consistenceNumberOfDispatchableUnits.add(pays, palier, index, pdt, Simulation); - nbTermesContraintesPourLesCoutsDeDemarrage - += consistenceNumberOfDispatchableUnits - .nbTermesContraintesPourLesCoutsDeDemarrage; - consistenceNumberOfDispatchableUnits.nbTermesContraintesPourLesCoutsDeDemarrage=0; } } } @@ -117,9 +105,6 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage( for (int pdt = 0; pdt < nombreDePasDeTempsPourUneOptimisation; pdt++) { nbUnitsOutageLessThanNbUnitsStop.add(pays, palier, index, pdt, Simulation); - nbTermesContraintesPourLesCoutsDeDemarrage - += nbUnitsOutageLessThanNbUnitsStop.nbTermesContraintesPourLesCoutsDeDemarrage; - nbUnitsOutageLessThanNbUnitsStop.nbTermesContraintesPourLesCoutsDeDemarrage=0; } } } @@ -140,9 +125,6 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage( for (int pdt = 0; pdt < nombreDePasDeTempsPourUneOptimisation; pdt++) { nbDispUnitsMinBoundSinceMinUpTime.add(pays, palier, index, pdt, Simulation); - nbTermesContraintesPourLesCoutsDeDemarrage - += nbDispUnitsMinBoundSinceMinUpTime.nbTermesContraintesPourLesCoutsDeDemarrage; - nbDispUnitsMinBoundSinceMinUpTime.nbTermesContraintesPourLesCoutsDeDemarrage=0; } } } @@ -160,16 +142,9 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage( for (int pdt = 0; pdt < nombreDePasDeTempsPourUneOptimisation; pdt++) { minDownTime.add(pays, palier, index, pdt, Simulation); - nbTermesContraintesPourLesCoutsDeDemarrage - += minDownTime.nbTermesContraintesPourLesCoutsDeDemarrage; - minDownTime.nbTermesContraintesPourLesCoutsDeDemarrage=0; } } } - if (Simulation) - problemeHebdo->NbTermesContraintesPourLesCoutsDeDemarrage - = nbTermesContraintesPourLesCoutsDeDemarrage; - return; } From 49307ee758e464a3c6bbb746eadcb0c4c01e8c58 Mon Sep 17 00:00:00 2001 From: Abdoulbari ZAKIR Date: Thu, 5 Oct 2023 17:35:55 +0200 Subject: [PATCH 4/4] restore .yml --- .github/workflows/windows-vcpkg.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 81a328f49c..3a9bc71d65 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -153,13 +153,6 @@ jobs: path: 'simtest.json' prop_path: 'version' - - name: Run long-tests-2 - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-2 - os: ${{ matrix.test-platform }} - - name: Run named mps tests uses: ./.github/workflows/run-tests with: @@ -219,6 +212,13 @@ jobs: batch-name: long-tests-1 os: ${{ matrix.test-platform }} + - name: Run long-tests-2 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: long-tests-2 + os: ${{ matrix.test-platform }} - name: Run long-tests-3 if: ${{ env.RUN_EXTENDED_TESTS == 'true' }}