Skip to content

Commit

Permalink
Release 8.5.0 (#1168)
Browse files Browse the repository at this point in the history
* unit test for CSR-calculateAreaFlowBalance

* small refacto

* unit test bug fix

* 4. remove unused

* 6.1 MemAllocMemset

* 5. remove return

* 3. remove debug log

* 2. move to csr

* 1. refacto

* 6.2 hide column

* 6.2

* 3. move log

* 3. move log..

* clean

* small fix year count

* hot start

* relax var bounds

* remove ENS <= densNew constraint, set as var bound

* remove set values to NaN if csr solver fails

* relax bining constrains for csr solver

* make csr crash log more expressive

* clean some logs

* beta 3 -> beta 4

* wrong relaxation of bc - bug fix

* logg out triggered csr hours

* refacto 1e-3

* logg out csr warnings - refacto

* update antares output dens value

* more expressive log

* update dens and use it as pto

* dont include linear cost coeff - temporary beta6 only

* beta5->beta6

* 10. bring back type of var to origin quad solver - mistake

* 2. remove default values for the solver accuracy

* change function  name to ADQ_PATCH_CSR

* 6. remove comments

* 7. remove nused transport cost

* 9. remove comments

* 11. refacto - int NumberOfVariables

* 8. remove NomDeLaContrainte

* bring back linear hurdle costs

* set to zero ENS & spillage if below threshold (avoid LOLP=100% dummy values)

* small refacto

* 4. make subfunction CSR_DEBUG_BLAH

* 1. move csr problem functions to separate directory

* 12. Add "Include hurdle cost" false/true button

* refacto avoid bugs

* refacto avoid bugs

* refacto bugs

* Fix build

Rename LinkCapacityForAdequacyPatchFirstStep -> ntcSetToZeroStatus_AdqPatchStep1

* 1. Make NumberOfVariables a reference var

* change function name CSR_DEBUG_

* 3. test Probleme.ExistenceDUneSolution directly

* 2. Slightly clearer version

* 4. make hoursRequiringCurtailmentSharing const var

* 5. avoid cast sumENS[i] to int!

* 17. move default thresholds to adequacy_patch.h

* 20. use A.size() in addArray function

* 19. create dedicated method solveCSR

* 7. name change

* 8. make methods of AdequacyPatchOptimization private

* 11. 14. 16 delete unused logs

* 9.  delete forward declaration of HOURLY_CSR_PROBLEM

* 15. remove Double definition.

* 12. 13 update copyright & Authors for adq-patch files

* make solveCSR private method

* use auto instead of std::unique_ptr<PROBLEME_POINT_INTERIEUR>

* float->double

* remove saveIntermediateResults

* code smells parameters.cpp

* critical-CodeSmell-adequacy_patch.cpp

* critical-codeSmells- set_problem_cost.cpp

* info-CodeSmell - remove todo-s

* CodeSmells - global var should be const

* NULL->nullptr

* use default destructor

* protected->private in adq-patch-area-grid.h

* use default constructor in adequacy-patch-areas

* Add the "explicit" keyword to AdequacyPatchAreas constructor

* NULL->nullptr in adequacy-patch-options.cpp

* = default, AdequacyPatchOptions

* Add the "explicit" keyword to AdequacyPatchOptions constructor

* Remove these useless parentheses

* Remove these useless parentheses

* Remove the unused parameter "weekNb",

* Move these 4 #include directives to the top of the file

* declaration shadows a local variable

* Value stored to 'ProblemeAResoudre' is never read

* function should be declared "const"

* Use "std::make_unique" to construct "std::unique_ptr

* Value stored to 'out' during its initialization is never read

* major-CodeSmells-adequacy-patch-options.cpp

* remove "never read" variables

* const& buttonType in updateButton

* Replace this "enum" with "enum class"  AdqPatchPTO

* double*->const double* in addArray

* MinorCodeSmell-s construct_LHS

* MinorCodeSmell-s construct_RHS

* MinorCodeSmell-s construct_variables

* MinorCodeSmell-s cost_function

* MinorCodeSmell-s set_var_bounds

* MinorCodeSmell-s solve_problem

* MinorCodeSmell-s economy.cpp

* Remove redundant public  access specifier

* Remove this redundant access specifier

* MinorCodeSmell-s adq-patch-unit-tests

* Concatenate  namespace with the nested ones.

* Use "override" or "final" instead of "virtual".

* Remove public redundant access specifier;

* MinorCodeSmell-s adequacy-patch-areas.h

* Concatenate namespace with the nested ones.

* Make the type of auto& study ; a reference-to-const

* MinorCodeSmell-s AdequacyPatchOptions

* "not"-> "!" , "and"-> "&&"

* Add adequacy-patch CSR study format changes (#817)

* beta 7

* create GUI for csr var relax button

* connect GUI to logic

* threshold e-3 >e-5

* fix (GUI wont pass smaller than 10^-6)

* Value stored to 'PaliersThermiquesDuPays' is never read

* "std::string" -> "std::string_view"

* make getHoursRequiringCurtailmentSharing const method

* remove unused var

* assign ProblemeAResoudre properly

* Reporting of DENS_new in GUI result for all hours

* Check CSR cost-fun-value prior&after CSR-opt - GUI

* refacto due to pre-calculating dens_new for all hours prior to csr optim

* add "SpilledenergyAfterCSR" column

* TODO: densNewValues

* Correction of MRG.PRICE Price Cap in hours LOLE>0.5 after CSR

* refacto "DENS_new" parameter calc, same thing at the end!?

* add DTG. MRG INT/FIN columns to GUI

* copy-paste spilled Energy values into spilled Energy values after CSR prior to CSR

* Check CSR cost value prior to and after - UNTESTED

* refacto on DTG MRG CSR columns GUI

* change log to info in "Check CSR cost value"

* test implementation csr fun cost prior/after

* refacto LMR violations according to the agreement with Daniel + clean

* csr-postProcess - adjust ENS value and calc dtgMrgCsr

* small refacto

* refacto - adjust mrgPrice after caclulating dtgMrgCsr and new Ens

* log update

* refacto setToZeroIfBelowThreshold

* update/refacto log csr-solver

* refacto logs @ solve_problem.cpp

* typo

* beta7 -> beta8

* add prefix [adq-patch] to info logs

* move adqPatchPostProcess after HydroRemix

* refactor + change -  storeOrDisregardInteriorPointResults

* beta 9.1

* refactor solveCSR

* add "- dtgMrg" to densNew formula

* beta 10

* fix error

* update 13-file-format.md for adq-patch CSR

* update 14-adequacy-patch.md for adq-patch CSR

* change CSR objective function (Elia)

* change CSR objective function (Elia) - doc update

* beta11

* change CSR objective function (Elia) - doc update

* 14-adq-patch-doc-bug fix (unrecognized characters)

* 14-adq-patch-doc-bug fix (unrecognized characters)-2

* Fix build (linking KO b/c of missing functions)

* Fix build

* Apply clang-format

* [UI] Fix build

* Fix code smells reported as bugs

* Use BOOST_CHECK_EQUAL to check equality (#1056)

To display a more expressive error message in case of failure, for example

src/tests/src/solver/optimisation/adequacy_patch.cpp(481): error: in "calculateAreaFlowBalanceForOneTimeStep_outside_inside_IncludeOut_negativeFlow_initEnsEqualTo0": check densNew == 0.1 has failed [0 != 0.10000000000000001]

* Adequacy patch refactoring (#962)

* [FIX] Refactored var names

* [REFAC] Changed class and var names in economy.h/cpp

* [REFAC] More correction of PR 903

* Fix build after rebase

Co-authored-by: Florian OMNES <florian.omnes@rte-france.com>

* Refactor adq patch (part 2) (#964)

* [FIX] Refactored var names

* [REFAC] Changed class and var names in economy.h/cpp

* [REFAC] More correction of PR 903

* Fix build after rebase

* Refactor adq patch (by gp) : lowering the solvers dependence to "state"

* Refactor adq patch (by gp) : lowering the solvers dependence to "state" (part 2)

* Refactor adq patch (by gp) : remove solveCSR from classic optimization problem

* Restore function setBoundsAdqPatch

* Fix build

Co-authored-by: Vincent Payet <vincent.payet@rte-france.com>
Co-authored-by: Florian OMNES <florian.omnes@rte-france.com>

* Adequacy patch : refactor economy (weekly optimization) (#968)

* [FIX] Refactored var names

* [REFAC] Changed class and var names in economy.h/cpp

* [REFAC] More correction of PR 903

* Fix build after rebase

* Refactor adq patch (by gp) : lowering the solvers dependence to "state"

* Refactor adq patch (by gp) : lowering the solvers dependence to "state" (part 2)

* Refactor adq patch (by gp) : remove solveCSR from classic optimization problem

* Refactor adq patch (by gp) : correction after merge (to get compilation done)

* adq patch - refactor economy : renaming

* adq patch - refactor economy : define a weekyOptimization for each problemeHebdo

* solveCSR => implementation in separate file

* adq patch - refactor economy : correction to avoid conflict in the next merge

* adq patch - refactor economy : move declaration of class interfaceWeeklyOptimization in a new file

* adq patch - refactor economy : extract weekly optimization classes in separate source files

* adq patch - refactor economy : correction due to review

* adq patch - refactor economy : remove useless function arguments due to sonar review

* Fix build

* Restore function setBoundsAdqPatch

* Add virtual dtors

* Remove useless return statement

* Nested namespaces, formatting

* Make protected members const

Co-authored-by: Vincent Payet <vincent.payet@rte-france.com>
Co-authored-by: Florian OMNES <florian.omnes@rte-france.com>

* Adequacy patch :  refactor curtailment sharing (#971)

* Adequacy patch CSR - final (#958)

* change origin/extremityAreaType to AreaMode

* refacto function SetNTCForAdequacyFirstStep

* LinkCapacityForAdqPatchFirstStepFromAreaOutsideToAreaInsideAdq name change

* name change for LinkCapacityForAdequacyPatchFirstStep

* remove returnNTC form adq functions.

* remove unnecessary break

* make readAdqPatchMode function

* make ini file more expressive

* remove additional check for ini file

* refacto

* make version 8.3.0

* Revert "make version 8.3.0"

* fix

* fix

* synchronize names setToZeroNTCfrom..

* synchronize names pBtn...

* synchronize adequacy-patch-options.cpp

* synchronize names adqm..

* synchronize names AreaType to AreaMode

* synchronize names LinkCapacity..

* synchronize name physicalAreaInsideAdqPatch

* 1. do not modify Yuni library

* 3. AdequacyPatchPTO name change

* 3. update

* 2-8. replace seeds with two thresholds

* 9. resetAdqPatchParameters

* 10. re-name lmrViolations.h

* 25-26. re-name AdequacyPatchConfigure to AdequacyPatchOptions

* 27. cellValue change

* 28. is already implemented + small refacto

* small refacto

* 29. updateButton function

* 13. renaming

* 14. refactoring

* 15. remove redundancy

* 16. refactoring

* 20. separate LHS to functions

* 20. separate RHS to functions

* clean

* 23. separate Costs into functions

* 22. separate Bounds into functions

* 21. separate Construction of variables into functions

* 19. separate quad-solver into sub-functions

* 11. separate getHoursRequiringCurtailmentSharing into two sub-functions

* 17+18+24. make OPT_ functions private methods and make public run method

* clean

* clean

* clean

* 0 as a default value, and (value > threshold)

* 4. add else if for AdqPatchPTO::isDens

* bring back some debugg logs for easy result check

* 2. make calculateCsrParameters method of HOURLY_CSR_PROBLEM

* clean

* 1. use std::vector for sumENS

* 9. repack CSR ui input data in parameters.h

* 8. placing all functions inside adequacy_patch.h to namespace Adequcy patch

* 7. re-pack CSR run into weeklyOptProblem->solve method

* adopt RTE syntax for switch/case

* remove comments

* change RC number

* change beta release number

* unit test for CSR-calculateAreaFlowBalance

* small refacto

* unit test bug fix

* 4. remove unused

* 6.1 MemAllocMemset

* 5. remove return

* 3. remove debug log

* 2. move to csr

* 1. refacto

* 6.2 hide column

* 6.2

* 3. move log

* 3. move log..

* clean

* small fix year count

* hot start

* relax var bounds

* remove ENS <= densNew constraint, set as var bound

* remove set values to NaN if csr solver fails

* relax bining constrains for csr solver

* make csr crash log more expressive

* clean some logs

* beta 3 -> beta 4

* wrong relaxation of bc - bug fix

* logg out triggered csr hours

* refacto 1e-3

* logg out csr warnings - refacto

* update antares output dens value

* more expressive log

* update dens and use it as pto

* dont include linear cost coeff - temporary beta6 only

* beta5->beta6

* 10. bring back type of var to origin quad solver - mistake

* 2. remove default values for the solver accuracy

* change function  name to ADQ_PATCH_CSR

* 6. remove comments

* 7. remove nused transport cost

* 9. remove comments

* 11. refacto - int NumberOfVariables

* 8. remove NomDeLaContrainte

* bring back linear hurdle costs

* set to zero ENS & spillage if below threshold (avoid LOLP=100% dummy values)

* small refacto

* 4. make subfunction CSR_DEBUG_BLAH

* 1. move csr problem functions to separate directory

* 12. Add "Include hurdle cost" false/true button

* refacto avoid bugs

* refacto avoid bugs

* refacto bugs

* Fix build

Rename LinkCapacityForAdequacyPatchFirstStep -> ntcSetToZeroStatus_AdqPatchStep1

* 1. Make NumberOfVariables a reference var

* change function name CSR_DEBUG_

* 3. test Probleme.ExistenceDUneSolution directly

* 2. Slightly clearer version

* 4. make hoursRequiringCurtailmentSharing const var

* 5. avoid cast sumENS[i] to int!

* 17. move default thresholds to adequacy_patch.h

* 20. use A.size() in addArray function

* 19. create dedicated method solveCSR

* 7. name change

* 8. make methods of AdequacyPatchOptimization private

* 11. 14. 16 delete unused logs

* 9.  delete forward declaration of HOURLY_CSR_PROBLEM

* 15. remove Double definition.

* 12. 13 update copyright & Authors for adq-patch files

* make solveCSR private method

* use auto instead of std::unique_ptr<PROBLEME_POINT_INTERIEUR>

* float->double

* remove saveIntermediateResults

* code smells parameters.cpp

* critical-CodeSmell-adequacy_patch.cpp

* critical-codeSmells- set_problem_cost.cpp

* info-CodeSmell - remove todo-s

* CodeSmells - global var should be const

* NULL->nullptr

* use default destructor

* protected->private in adq-patch-area-grid.h

* use default constructor in adequacy-patch-areas

* Add the "explicit" keyword to AdequacyPatchAreas constructor

* NULL->nullptr in adequacy-patch-options.cpp

* = default, AdequacyPatchOptions

* Add the "explicit" keyword to AdequacyPatchOptions constructor

* Remove these useless parentheses

* Remove these useless parentheses

* Remove the unused parameter "weekNb",

* Move these 4 #include directives to the top of the file

* declaration shadows a local variable

* Value stored to 'ProblemeAResoudre' is never read

* function should be declared "const"

* Use "std::make_unique" to construct "std::unique_ptr

* Value stored to 'out' during its initialization is never read

* major-CodeSmells-adequacy-patch-options.cpp

* remove "never read" variables

* const& buttonType in updateButton

* Replace this "enum" with "enum class"  AdqPatchPTO

* double*->const double* in addArray

* MinorCodeSmell-s construct_LHS

* MinorCodeSmell-s construct_RHS

* MinorCodeSmell-s construct_variables

* MinorCodeSmell-s cost_function

* MinorCodeSmell-s set_var_bounds

* MinorCodeSmell-s solve_problem

* MinorCodeSmell-s economy.cpp

* Remove redundant public  access specifier

* Remove this redundant access specifier

* MinorCodeSmell-s adq-patch-unit-tests

* Concatenate  namespace with the nested ones.

* Use "override" or "final" instead of "virtual".

* Remove public redundant access specifier;

* MinorCodeSmell-s adequacy-patch-areas.h

* Concatenate namespace with the nested ones.

* Make the type of auto& study ; a reference-to-const

* MinorCodeSmell-s AdequacyPatchOptions

* "not"-> "!" , "and"-> "&&"

* beta 7

* create GUI for csr var relax button

* connect GUI to logic

* threshold e-3 >e-5

* fix (GUI wont pass smaller than 10^-6)

* Value stored to 'PaliersThermiquesDuPays' is never read

* "std::string" -> "std::string_view"

* make getHoursRequiringCurtailmentSharing const method

* remove unused var

* assign ProblemeAResoudre properly

* Reporting of DENS_new in GUI result for all hours

* Check CSR cost-fun-value prior&after CSR-opt - GUI

* refacto due to pre-calculating dens_new for all hours prior to csr optim

* add "SpilledenergyAfterCSR" column

* TODO: densNewValues

* Correction of MRG.PRICE Price Cap in hours LOLE>0.5 after CSR

* refacto "DENS_new" parameter calc, same thing at the end!?

* add DTG. MRG INT/FIN columns to GUI

* copy-paste spilled Energy values into spilled Energy values after CSR prior to CSR

* Check CSR cost value prior to and after - UNTESTED

* refacto on DTG MRG CSR columns GUI

* change log to info in "Check CSR cost value"

* test implementation csr fun cost prior/after

* refacto LMR violations according to the agreement with Daniel + clean

* csr-postProcess - adjust ENS value and calc dtgMrgCsr

* small refacto

* refacto - adjust mrgPrice after caclulating dtgMrgCsr and new Ens

* log update

* refacto setToZeroIfBelowThreshold

* update/refacto log csr-solver

* refacto logs @ solve_problem.cpp

* typo

* beta7 -> beta8

* add prefix [adq-patch] to info logs

* move adqPatchPostProcess after HydroRemix

* refactor + change -  storeOrDisregardInteriorPointResults

* beta 9.1

* refactor solveCSR

* add "- dtgMrg" to densNew formula

* beta 10

Co-authored-by: hugo-antoine-rtei <73881097+hugo-antoine-rtei@users.noreply.github.com>
Co-authored-by: rtei-pw <rtei-pw@rte-international.com>
Co-authored-by: rtei-pw <rtei-pw@github.com>
Co-authored-by: Florian OMNES <florian.omnes@rte-france.com>
Co-authored-by: Hugo ANTOINE (RTEi) <hugo.antoine@rte-international.com>

* [FIX] FIx compile error

* [FIX] Refactored var names

* [REFAC] Changed class and var names in economy.h/cpp

* [REFAC] More correction of PR 903

* Refactor adq patch (by gp) : lowering the solvers dependence to "state"

* Refactor adq patch (by gp) : lowering the solvers dependence to "state" (part 2)

* Refactor adq patch (by gp) : correction after merge (to get compilation done)

* adq patch - refactor economy : renaming

* Refactor adq patch (by gp) : remove solveCSR from classic optimization problem

* adq patch - refactor economy : define a weekyOptimization for each problemeHebdo

* adq patch - refactor economy : correction to avoid conflict in the next merge

* adq patch - refactor economy : move declaration of class interfaceWeeklyOptimization in a new file

* adq patch - refactor economy : extract weekly optimization classes in separate source files

* adq patch - refactor economy : correction due to review

* adq patch - refactor economy : remove useless function arguments due to sonar review

* adq patch - refactor csr : simplify and remove useless things

* adq patch - refactor csr : split adequacy_patch.h/.cpp into local matching and curtailment sharing sources files

* Clean up headers

Co-authored-by: Milos <97689304+Milos-RTEi@users.noreply.github.com>
Co-authored-by: hugo-antoine-rtei <73881097+hugo-antoine-rtei@users.noreply.github.com>
Co-authored-by: rtei-pw <rtei-pw@rte-international.com>
Co-authored-by: rtei-pw <rtei-pw@github.com>
Co-authored-by: Florian OMNES <florian.omnes@rte-france.com>
Co-authored-by: Hugo ANTOINE (RTEi) <hugo.antoine@rte-international.com>
Co-authored-by: Vincent Payet <vincent.payet@rte-france.com>

* Adequacy patch vincent final (#1087)

* [FIX] Namespace concatenation in src/solver/simulation/

* [DEV] Moved reset csr and lm in dedicated structs

* [DEV] Create class CsrQuadraticProblem and moved functions in

* [DEV] Refactored functions in CsrQuadraticProblem class

* [DEV] FIx reference

* Pass hourlyCsrProblem.hourInWeekTriggeredCsr, not hourlyCsrProblem

* Nested namespaces

* Fix build, use non-const ref in class `CsrQuadraticProblem`

* [DEV] Concatenate namespace before merge

Co-authored-by: Florian OMNES <florian.omnes@rte-france.com>

* Remove state from interpolateWaterValue

* [DEV] Concatenate namespace done (#1094)

* Check for incompatible hurdle cost options (#1096)

* [DEV] Add rte banner in files missing it (#1097)

* [FIX] Adequacy code smells (#1100)

* [FIX] First batch of code smell

* [FIX] More smell fixes

* [FIX] Fix nested if and fort

* [FIX] Remove using Antares::Data::AdequacyPatch and solved compiles errors related

* [FIX] More code smells

* [FIX] Compile errors

* [FIX] Clarify condition

* [CSR] Clarify implicit var convention (#1095)

* CSR : clarify implicit convention on variable numbers for links

* CSR: clarify debug logs

* Renaming after PR remarks

* Pass hour instead of hourlyCsrProblem (#1098)

* Pass hour instead of hourlyCsrProblem

* Pass int for hour instead of a struct containing it

* move calculation of LMR violations from CSR source file to adq patch weekly problem (#1102)

* Move var declaration to right scope (#1103)

* [FIX] Move var declaration to right scope

* Fix infinite loop, possible other bug (#1107)

* Preparatory refactor to use own instance of PROBLEME_A_RESOUDRE (#1099)

* Simplify UtiliserLaToleranceDAdmissibiliteParDefaut, etc.

* Use PROBLEME_POINT_INTERIEUR for calculateCsrCostFunctionValue

* Pass hour instead of HOURLY_CSR_PROBLEM&

* Use PROBLEME_POINT_INTERIEUR for CSR_DEBUG_HANDLE, handleInteriorPointError

* PR remarks (use ref on object, not unique_ptr)

* Rename HOURLY_CSR_PROBLEM -> HourlyCSRProblem

* Apply clang-format

* Move files

* Move csr_quadratic_problem.h,cpp

* Remove unused fwd declaration

* Don't instantiate HourlyCSRProblem for every hour, setHour instead

* Rename OPT_ConstruireLaMatriceDesContraintesDuProblemeQuadratique_CSR

* Use std::vector::data instead of malloc/free

* Some renaming

* Add forgotten '{'

* Use our own instance of `PROBLEME_ANTARES_A_RESOUDRE` (#1105)

* Simplify UtiliserLaToleranceDAdmissibiliteParDefaut, etc.

* Use PROBLEME_POINT_INTERIEUR for calculateCsrCostFunctionValue

* Pass hour instead of HOURLY_CSR_PROBLEM&

* Use PROBLEME_POINT_INTERIEUR for CSR_DEBUG_HANDLE, handleInteriorPointError

* PR remarks (use ref on object, not unique_ptr)

* Rename HOURLY_CSR_PROBLEM -> HourlyCSRProblem

* Apply clang-format

* Move files

* Move csr_quadratic_problem.h,cpp

* Remove unused fwd declaration

* Don't instantiate HourlyCSRProblem for every hour, setHour instead

* Rename OPT_ConstruireLaMatriceDesContraintesDuProblemeQuadratique_CSR

* Use std::vector::data instead of malloc/free

* Some renaming

* Use our own instance of PROBLEME_ANTARES_A_RESOUDRE

* Refactor 2 more functions

OPT_InitialiserLeSecondMembreDuProblemeQuadratique_CSR
OPT_ConstruireLaListeDesVariablesOptimiseesDuProblemeQuadratique_CSR

* Use reference instead of raw pointer

* Extract allocation function for PROBLEME_ANTARES_A_RESOUDRE

* Use std::fill_n instead of memset

* PR remark

* Extract OPT_FreeOptimizationData

* Handle memory allocation/deallocation

* UpperCamelCase for some classes, move sources to adequacy_patch_csr (#1108)

* [FIX] UpperCamelCase for some classes

* [FIX] Moved csr files in adequacy_patch_csr/

* [FIX] Swap DefaultWeeklyOptimization WeeklyOptimization names

* [FIX] Add Antares::Data::Optimization namespace

* Remove `OPT_*_CSR` functions (#1111)

* Remove OPT_*_CSR functions

* Rename hourInWeekTriggeredCsr -> triggeredHour

* Fix regression related to while loop and unitialized quadratic costs (#1112)

* Fix regression related to while loop

* Fix 2nd regression related to unitialized quadratic cost

* Fix build after merge

* Fix a few more code smells (#1113)

* Fix a few code smells

* Apply clang-format

* Remove unused function ResetButtonSpecify

* Code smells  (#1114)

* [FIX] Code smells

* Temporarily disable all release tests

* Use simtest v8.5.0b

* Version++, RC=1

* Fix version 8.5

* Add TODO in changelog

* Move "older versions" comment

* Update VCPKG cache key

* Update version here and there

* RC=2

* Update changelog

* Remove useless file

* Remove useless file (bis)

* RC=3

* Fix tests

* Update changelog

* RC=0

* Fix LateX doc

---------

Co-authored-by: Milos <97689304+Milos-RTEi@users.noreply.github.com>
Co-authored-by: Milos A <milos.andjelkovic@redstork-solutions.com>
Co-authored-by: rtei-pw <rtei-pw@github.com>
Co-authored-by: Hugo ANTOINE (RTEi) <hugo.antoine@rte-international.com>
Co-authored-by: hugo-antoine-rtei <73881097+hugo-antoine-rtei@users.noreply.github.com>
Co-authored-by: payetvin <113102157+payetvin@users.noreply.github.com>
Co-authored-by: guilpier-code <62292552+guilpier-code@users.noreply.github.com>
Co-authored-by: Vincent Payet <vincent.payet@rte-france.com>
Co-authored-by: rtei-pw <rtei-pw@rte-international.com>
  • Loading branch information
10 people authored Feb 16, 2023
1 parent 8b8fcfa commit 15377ba
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
os: ${{ matrix.test-platform }}

- name: Run tests for adequacy patch (CSR)
if: ${{ env.IS_PUSH == 'true' }}
if: ${{ env.IS_RELEASE == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ jobs:
path: 'simtest.json'
prop_path: 'version'

- name: Run tests for adequacy patch (CSR)
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: adequacy-patch-CSR
os: ${{ matrix.test-platform }}

- name: Run medium-tests
uses: ./.github/workflows/run-tests
with:
Expand Down
25 changes: 14 additions & 11 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
Antares Changelog
=================

v8.5.0 (01/2022)
v8.5.0 (02/2022)
--------------------
* Fix examples studies (invalid v8.3.0 -> v8.5.0)

v8.5.0-rc2 (01/2022)
--------------------
* Re-publish of v8.5.0-rc1.

v8.5.0-rc1 (01/2022)
--------------------
## New features
* Hydraulic patch (#697)
* Curtailment sharing rule for Adequacy Patch (#1062)
* Curtailment Sharing Rule for Adequacy Patch #1062, including a scaling coefficient in hurdle costs #1155. This feature was contributed by RTE-i with support from RTE, ELIA and APG.

## Bugfix
* Hydraulic patch #697
* Fix link path error in Kirchhoff constraint builder #1157

## For developers
* Fix build on Ubuntu 22.04 #1160
* Cleaning #1142, 1146, #1149

## Examples & documentation
* Update docs to include CSR #1156
* Fix examples studies (invalid v8.3.0 -> v8.5.0) #1136

v8.4.2 (01/2022)
--------------------
Expand All @@ -26,7 +29,7 @@ v8.4.2 (01/2022)
## GUI
* Allow more than 100 thermal clusters #1011
* Remove status bar count. The sum was sometimes wrong #1029
* Remove unused "District marginal prices" button from Advanced Parameters (#1067)
* Remove unused "District marginal prices" button from Advanced Parameters #1067

## Bugfix
* Fix overwritten MPS files when optimization/simplex-range=day #1041
Expand Down
16 changes: 8 additions & 8 deletions docs/reference-guide/14-adequacy-patch.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ The value of “net_position (node A)” is deduced from “flow” variable as

- **Constraint induced by Local matching rule:**

- ENS (node A) $\le$ DENS_new(node A)
- ENS (node A) $\le DENS_{new}(node~A)$

- **Positivity constraints:**

Expand All @@ -183,26 +183,26 @@ _**Notes**_
- _Spillage results after curtailment sharing rule quadratic optimization are presented in the separate column inside Antares output, titled “SPIL. ENRG. CSR” so the user has access to the spillage results both prior to and after CSR optimization._

- _In order to avoid solver issues, lower and upper boundaries of the ENS and Spillage variables can be relaxed using GUI option “Relax CSR variable boundaries”. Following relaxations can be imposed:_
- $-10^{-m} \le ENS~(node~~A) \le DENS \textunderscore new~(node~A) + 10^{-m}$
- $-10^{-m} \le spillage~(node~A) \le + \infty$
- $-10^{-m} \le ENS(node~A) \le DENS_{new} (node~A) + 10^{-m}$
- $-10^{-m} \le spillage(node~A) \le + \infty$

Where $m$ is an integer defined by the user.

### Objective function

- Minimize $\left[ \sum\frac{ENS^2}{PTO} + \sum \frac{1}{M} \left( hurdle \textunderscore cost \textunderscore direct \times flow \textunderscore direct \right) + \sum \frac{1}{M} \left( hurdle \textunderscore cost \textunderscore indirect \times flow_\textunderscore indirect \right) \right]$
- Minimize $\left[ \sum\frac{ENS^2}{PTO} + \sum \frac{1}{M} \left( hurdle cost direct \times flow direct \right) + \sum \frac{1}{M} \left( hurdle cost indirect \times flow_ indirect \right) \right]$

The 2 latest terms are introduced to minimize loop flows in the considering domain, and $M$ is the highest curtailment cost between a links's origin and destination nodes, used to adapt the scale of hurdle costs to this new objective (in practice, those tend to be the same for all nodes, typically 3000€/MW or 10000€/MW).
In order to assess the quality of the CSR solution additional verification can be imposed by activating GUI option “Check CSR cost function value prior and after CSR optimization”. Values of the objective function prior to and after quadratic optimization will be calculated and compared. If the objective function value after the quadratic optimization has decreased, the new CSR solution will be accepted and presented in the Antares output. However, if after quadratic optimization the objective function value has increased (or stayed the same), LMR solution will be adopted as the final one and warning will be logged out with the appropriate information (year, hour cost prior to quad optimization, cost after quadratic optimization).

- $QUAD \textunderscore 0 = \left[ \sum \frac{ENS \textunderscore init^2}{PTO} + \sum \frac{1}{M} \left( hurdle \textunderscore cost \textunderscore direct \times flow \textunderscore direct \textunderscore init \right) + \sum \frac{1}{M} \left( hurdle \textunderscore cost \textunderscore indirect \times flow \textunderscore indirect \textunderscore init \right) \right]$
- $QUAD \textunderscore 1 = \left[ \sum \frac{ENS \textunderscore final^2}{PTO} + \sum \frac{1}{M} \left( hurdle \textunderscore cost \textunderscore direct \times flow \textunderscore direct \textunderscore final \right) + \sum \frac{1}{M} \left( hurdle \textunderscore cost \textunderscore indirect \times flow \textunderscore indirect \textunderscore final \right) \right]$
- $QUAD 0 = \left[ \sum \frac{ENS init^2}{PTO} + \sum \frac{1}{M} \left( hurdle cost direct \times flow direct init \right) + \sum \frac{1}{M} \left( hurdle cost indirect \times flow indirect init \right) \right]$
- $QUAD 1 = \left[ \sum \frac{ENS final^2}{PTO} + \sum \frac{1}{M} \left( hurdle cost direct \times flow direct final \right) + \sum \frac{1}{M} \left( hurdle cost indirect \times flow indirect final \right) \right]$

If:

- $QUAD \textunderscore 0 \le QUAD \textunderscore 1$
- $QUAD 0 \le QUAD 1$
(CSR does not improve QUAD) then the “_init” solution is kept and the CSR solution is hence disregarded.
- $QUAD \textunderscore 0 > QUAD \textunderscore 1$
- $QUAD 0 > QUAD 1$
(CSR does improve QUAD) then the “CSR” solution is kept as final result updating the “_init” solution as stated above.

### Post-optimization process
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(ANTARES_ONLINE_DOC "https://antares-simulator.readthedocs.io/")

# Beta release
set(ANTARES_BETA 0)
set(ANTARES_RC 3)
set(ANTARES_RC 0)

# OR-Tools tag
file(READ "../ortools_tag" ORTOOLS_TAG)
Expand Down

0 comments on commit 15377ba

Please sign in to comment.