Skip to content

Commit

Permalink
move implementation details
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Oct 5, 2023
1 parent 29fe61a commit d3dd1cc
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void ConsistenceNumberOfDispatchableUnits::add(int pays,
}
else
{
nbTermesContraintesPourLesCoutsDeDemarrage += 4;
problemeHebdo->NbTermesContraintesPourLesCoutsDeDemarrage += 4;
problemeHebdo->ProblemeAResoudre->NombreDeContraintes++;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
2 changes: 1 addition & 1 deletion src/solver/optimisation/constraints/MinDownTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down
1 change: 0 additions & 1 deletion src/solver/optimisation/constraints/MinDownTime.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void NbDispUnitsMinBoundSinceMinUpTime::add(int pays,
}
else
{
nbTermesContraintesPourLesCoutsDeDemarrage
problemeHebdo->NbTermesContraintesPourLesCoutsDeDemarrage
+= 1 + 2 * DureeMinimaleDeMarcheDUnGroupeDuPalierThermique;
problemeHebdo->ProblemeAResoudre->NombreDeContraintes++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void NbUnitsOutageLessThanNbUnitsStop::add(int pays,
}
else
{
nbTermesContraintesPourLesCoutsDeDemarrage += 2;
problemeHebdo->NbTermesContraintesPourLesCoutsDeDemarrage += 2;
problemeHebdo->ProblemeAResoudre->NombreDeContraintes++;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void PMaxDispatchableGeneration::add(int pays,
}
else
{
nbTermesContraintesPourLesCoutsDeDemarrage += 2;
problemeHebdo->NbTermesContraintesPourLesCoutsDeDemarrage += 2;
problemeHebdo->ProblemeAResoudre->NombreDeContraintes++;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void PMinDispatchableGeneration::add(int pays,
}
else
{
nbTermesContraintesPourLesCoutsDeDemarrage += 2;
problemeHebdo->ProblemeAResoudre->NombreDeContraintes++;
problemeHebdo->NbTermesContraintesPourLesCoutsDeDemarrage += 2;
problemeHebdo->ProblemeAResoudre->NombreDeContraintes++;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
}
}
Expand All @@ -94,10 +86,6 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage(
ConsistenceNumberOfDispatchableUnits consistenceNumberOfDispatchableUnits(
problemeHebdo);
consistenceNumberOfDispatchableUnits.add(pays, palier, index, pdt, Simulation);
nbTermesContraintesPourLesCoutsDeDemarrage
+= consistenceNumberOfDispatchableUnits
.nbTermesContraintesPourLesCoutsDeDemarrage;
consistenceNumberOfDispatchableUnits.nbTermesContraintesPourLesCoutsDeDemarrage=0;
}
}
}
Expand All @@ -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;
}
}
}
Expand All @@ -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;
}
}
}
Expand All @@ -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;
}

0 comments on commit d3dd1cc

Please sign in to comment.