-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create opt problem formulation structure files
- Loading branch information
1 parent
492d8c8
commit be54e64
Showing
9 changed files
with
216 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/solver/ts-generator/optimized-thermal-generator/CreateVariables.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// Created by milos on 14/11/23. | ||
// | ||
|
||
#include "OptimizedGenerator.h" | ||
|
||
namespace Antares::Solver::TSGenerator | ||
{ | ||
void OptimizedThermalGenerator::buildProblemVariables() | ||
{ | ||
countVariables(); | ||
buildEnsAndSpillageVariables(); | ||
buildUnitPowerOutputVariables(); | ||
buildStartEndMntVariables(); | ||
} | ||
|
||
void OptimizedThermalGenerator::countVariables() | ||
{ | ||
return; | ||
} | ||
|
||
// create VARIABLES per day - ENS[t], Spill[t] | ||
void OptimizedThermalGenerator::buildEnsAndSpillageVariables() | ||
{ | ||
return; | ||
} | ||
|
||
// create VARIABLES per day and per cluster-unit - P[t][u] | ||
void OptimizedThermalGenerator::buildUnitPowerOutputVariables() | ||
{ | ||
return; | ||
} | ||
|
||
// create VARIABLES per day, per cluster-unit and per maintenance - s[t][u][m] & e[t][u][m] | ||
void OptimizedThermalGenerator::buildStartEndMntVariables() | ||
{ | ||
return; | ||
} | ||
|
||
} // namespace Antares::Solver::TSGenerator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/solver/ts-generator/optimized-thermal-generator/ResetProblem.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// Created by milos on 14/11/23. | ||
// | ||
|
||
#include "OptimizedGenerator.h" | ||
|
||
namespace Antares::Solver::TSGenerator | ||
{ | ||
void OptimizedThermalGenerator::resetProblem() | ||
{ | ||
return; | ||
} | ||
|
||
} // namespace Antares::Solver::TSGenerator |
33 changes: 33 additions & 0 deletions
33
src/solver/ts-generator/optimized-thermal-generator/SetProblemConstraints.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// Created by milos on 14/11/23. | ||
// | ||
|
||
#include "OptimizedGenerator.h" | ||
|
||
namespace Antares::Solver::TSGenerator | ||
{ | ||
void OptimizedThermalGenerator::buildProblemConstraints() | ||
{ | ||
buildLoadBalanceConstraints(); | ||
setStartEndMntLogicConstraints(); | ||
setMaxUnitOutputConstraints(); | ||
} | ||
|
||
// load balance CONSTRAINTS - constraint-per-each-day[t] - we have sum through [u] inside of it | ||
void OptimizedThermalGenerator::buildLoadBalanceConstraints() | ||
{ | ||
return; | ||
} | ||
|
||
// CONSTRAINTS per days, per units and per maintenance - constraint-per-each-day+unit+mnt[t][u][m] | ||
void OptimizedThermalGenerator::setStartEndMntLogicConstraints() | ||
{ | ||
return; | ||
} | ||
// CONSTRAINTS per days and per units - constraint-per-each-day+unit[t][u][m-sum per m] | ||
void OptimizedThermalGenerator::setMaxUnitOutputConstraints() | ||
{ | ||
return; | ||
} | ||
|
||
} // namespace Antares::Solver::TSGenerator |
15 changes: 15 additions & 0 deletions
15
src/solver/ts-generator/optimized-thermal-generator/SetProblemCost.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// Created by milos on 14/11/23. | ||
// | ||
|
||
#include "OptimizedGenerator.h" | ||
|
||
namespace Antares::Solver::TSGenerator | ||
{ | ||
// create OBJECTIVE FUNCTION - sum through [t] and sum through [u] | ||
void OptimizedThermalGenerator::setProblemCost() | ||
{ | ||
return; | ||
} | ||
|
||
} // namespace Antares::Solver::TSGenerator |
58 changes: 58 additions & 0 deletions
58
src/solver/ts-generator/optimized-thermal-generator/SetVariableBounds.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// | ||
// Created by milos on 14/11/23. | ||
// | ||
|
||
#include "OptimizedGenerator.h" | ||
|
||
namespace Antares::Solver::TSGenerator | ||
{ | ||
void OptimizedThermalGenerator::setVariableBounds() | ||
{ | ||
setEnsAndSpillageBounds(); | ||
setUnitPowerOutputBounds(); | ||
setStartEndMntBounds(); | ||
setFirstMntStartBounds(); | ||
setAllMntMustStartBounds(); | ||
} | ||
|
||
// BOUNDS per each day - bounds-per-each-day[t] - ENS[t] >= 0, Spill[t] >= 0 | ||
void OptimizedThermalGenerator::setEnsAndSpillageBounds() | ||
{ | ||
return; | ||
} | ||
|
||
// BOUNDS per day and per each unit - bounds-per-each-day+unit[t][u] - P[t][u] >= 0 | ||
void OptimizedThermalGenerator::setUnitPowerOutputBounds() | ||
{ | ||
return; | ||
} | ||
|
||
// BOUNDS per day, per each unit and per each mnt - bounds-per-each-day+unit+mnt[t][u][m] | ||
// - s[t][u][m]-> [0, 1] and e[t][u][m]-> [0, 1] | ||
void OptimizedThermalGenerator::setStartEndMntBounds() | ||
{ | ||
return; | ||
} | ||
|
||
// TODO CR27: see if to make this bound or constraint - | ||
// it is definitely easier to do set it as a fix bound - | ||
// but the solver might go crazy - as for adq.patch | ||
|
||
// BOUNDS/CONSTRAINTS per units - constraint-per-each-unit[t-fixed][u][m-fixed] | ||
// first maintenance must start between tauLower and tauUpper | ||
// start[tauLower-1][u][1] = 0 | ||
// start[tauUpper][u][1] = 1 | ||
void OptimizedThermalGenerator::setFirstMntStartBounds() | ||
{ | ||
return; | ||
} | ||
|
||
// BOUNDS/CONSTRAINTS per units and per maintenance - constraint-per-each-unit+mnt[t-fixed=0/T][u][m] | ||
// end[0][u][q] = 0 // no maintenance can end in first day | ||
// start[T][u][q] = 1 // T - end Day (simulation end) // all maintenance must start till last day | ||
void OptimizedThermalGenerator::setAllMntMustStartBounds() | ||
{ | ||
return; | ||
} | ||
|
||
} // namespace Antares::Solver::TSGenerator |
25 changes: 25 additions & 0 deletions
25
src/solver/ts-generator/optimized-thermal-generator/SolveProbem.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// Created by milos on 14/11/23. | ||
// | ||
|
||
#include "OptimizedGenerator.h" | ||
|
||
namespace Antares::Solver::TSGenerator | ||
{ | ||
// call all methods | ||
void OptimizedThermalGenerator::runOptimizationProblem() | ||
{ | ||
buildProblemVariables(); | ||
setVariableBounds(); | ||
buildProblemConstraints(); | ||
setProblemCost(); | ||
solveProblem(); | ||
resetProblem(); | ||
} | ||
// retrieve and check the results if optimization was successful | ||
void OptimizedThermalGenerator::solveProblem() | ||
{ | ||
return; | ||
} | ||
|
||
} // namespace Antares::Solver::TSGenerator |