-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ANT-992] Add ramping for thermal clusters #1817
Draft
bencamus
wants to merge
26
commits into
AntaresSimulatorTeam:develop
Choose a base branch
from
NicolasSalmieriScalian:feature/ramping_model_scalian
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
a64625a
core implementation of the ramping model
bencamus b9c4f2b
add export/import features for the thermal ramping attributes
bencamus 624f2ce
make the ramping constraints cyclical as the evolution of the product…
bencamus 915e0c7
remove reference to Yuni in the ramping model code
bencamus f2d469e
removing of a useless header file
bencamus e78c034
improve readability of ramping model methods by naming their paramete…
bencamus b9801fe
add subclass to store and check thermal cluster ramping attributes
bencamus 09a2ca9
Small code improvement for ramping
flomnes 5ce4531
Solve build errors with a friend
flomnes 77daa36
add the possibility to enable/disable the ramping model for each cluster
bencamus 8133150
improvement of the implementation of the ON/OFF ramping model features
bencamus 134ad57
merge commit
bencamus 54ef194
add ramping costs to the output operational costs of the cluster
bencamus d8ca6aa
add dedicated output log for ramping costs
bencamus d1f983c
implementation of a new version of the ramping equations
bencamus 70ba583
fixing a bug in the definition of the ramping variables bounds + free…
bencamus 7387013
Supression of clusterRampingVariablesIndex and standardisation of the…
sylvmara ab1b701
Harmonisation of ramp checking
sylvmara 8b6ce0b
merge with Antares master
bencamus 3b17545
merge last version of ramping model with last version of Antares
bencamus 50f7a48
removing ramping files that are useless with the last version of Antares
bencamus 554455d
changing constraint equation related to power output variation of the…
bencamus 3625bd2
Temporarily enable build for CentOS7
flomnes 44f722d
changing the variable caption from RAMP COST by plant to RAMP COST BY…
bencamus e41d0b8
update the ramping constraint 18ter to remove breaking down thermal u…
bencamus 34f2531
Merge remote-tracking branch 'origin/feature/ramping_model_scalian' i…
bencamus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
types: [created] | ||
push: | ||
branches: | ||
- feature/ramping_model_scalian | ||
- develop | ||
- dependabot/* | ||
|
||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
** Copyright 2007-2024, RTE (https://www.rte-france.com) | ||
** See AUTHORS.txt | ||
** SPDX-License-Identifier: MPL-2.0 | ||
** This file is part of Antares-Simulator, | ||
** Adequacy and Performance assessment for interconnected energy networks. | ||
** | ||
** Antares_Simulator is free software: you can redistribute it and/or modify | ||
** it under the terms of the Mozilla Public Licence 2.0 as published by | ||
** the Mozilla Foundation, either version 2 of the License, or | ||
** (at your option) any later version. | ||
** | ||
** Antares_Simulator is distributed in the hope that it will be useful, | ||
** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
** Mozilla Public Licence 2.0 for more details. | ||
** | ||
** You should have received a copy of the Mozilla Public Licence 2.0 | ||
** along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>. | ||
*/ | ||
#include "antares/solver/optimisation/LinearProblemMatrixRamping.h" | ||
using namespace Antares::Data; | ||
|
||
LinearProblemMatrixRamping::LinearProblemMatrixRamping(PROBLEME_HEBDO* problemeHebdo, | ||
bool Simulation, | ||
ConstraintBuilder& builder) : | ||
ProblemMatrixEssential(problemeHebdo), | ||
simulation_(Simulation), | ||
rampingIncreaseDecreaseRateGroup_(problemeHebdo, simulation_, builder), | ||
powerOutputVariationGroup_(problemeHebdo, simulation_, builder) | ||
{ | ||
constraintgroups_ | ||
= {&rampingIncreaseDecreaseRateGroup_, &powerOutputVariationGroup_}; | ||
} |
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 |
---|---|---|
|
@@ -49,6 +49,24 @@ ConstraintBuilder& ConstraintBuilder::DispatchableProduction(unsigned int index, | |
return *this; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove debug comments There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed in commit 624f2ce |
||
} | ||
|
||
ConstraintBuilder& ConstraintBuilder::ProductionDecreaseAboveMin(unsigned int index, | ||
double coeff, | ||
int offset, | ||
int delta) | ||
{ | ||
AddVariable(variableManager_.ProductionDecreaseAboveMin(index, hourInWeek_, offset, delta), coeff); | ||
return *this; | ||
} | ||
|
||
ConstraintBuilder& ConstraintBuilder::ProductionIncreaseAboveMin(unsigned int index, | ||
double coeff, | ||
int offset, | ||
int delta) | ||
{ | ||
AddVariable(variableManager_.ProductionIncreaseAboveMin(index, hourInWeek_, offset, delta), coeff); | ||
return *this; | ||
} | ||
|
||
ConstraintBuilder& ConstraintBuilder::NumberOfDispatchableUnits(unsigned int index, double coeff) | ||
{ | ||
AddVariable(variableManager_.NumberOfDispatchableUnits(index, hourInWeek_), coeff); | ||
|
38 changes: 38 additions & 0 deletions
38
src/solver/optimisation/constraints/PowerOutputVariationDecrease.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,38 @@ | ||
#include "antares/solver/optimisation/constraints/PowerOutputVariationDecrease.h" | ||
|
||
void PowerOutputVariationDecrease::add(int pays, int index, int pdt) | ||
{ | ||
if (!data.Simulation) | ||
{ | ||
int cluster = data.PaliersThermiquesDuPays[pays] | ||
.NumeroDuPalierDansLEnsembleDesPaliersThermiques[index]; | ||
double pmaxDUnGroupeDuPalierThermique | ||
= data.PaliersThermiquesDuPays[pays].PmaxDUnGroupeDuPalierThermique[index]; | ||
// constraint : P(t) - P(t-1) + P^- + u * M^-(t) >= 0 | ||
builder.updateHourWithinWeek(pdt) | ||
.DispatchableProduction(cluster, 1.0) | ||
.DispatchableProduction( | ||
cluster, -1.0, -1, builder.data.NombreDePasDeTempsPourUneOptimisation) | ||
.ProductionDecreaseAboveMin(cluster, 1.0) | ||
.NumberStoppingDispatchableUnits(cluster, pmaxDUnGroupeDuPalierThermique) | ||
.greaterThan(); | ||
|
||
if (builder.NumberOfVariables() > 0) | ||
{ | ||
ConstraintNamer namer(builder.data.NomDesContraintes); | ||
|
||
namer.UpdateTimeStep(builder.data.weekInTheYear * 168 + pdt); | ||
namer.UpdateArea(builder.data.NomsDesPays[pays]); | ||
|
||
namer.ProductionOutputVariation( | ||
builder.data.nombreDeContraintes, | ||
data.PaliersThermiquesDuPays[pays].NomsDesPaliersThermiques[index]); | ||
} | ||
builder.build(); | ||
} | ||
else | ||
{ | ||
builder.data.NbTermesContraintesPourLesRampes += 4; | ||
builder.data.nombreDeContraintes++; | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise the temporary object is constructed and destructed immediately. In-place construction saves one Construction/Destruction, see https://en.cppreference.com/w/cpp/utility/optional/emplace