Skip to content

Commit

Permalink
Rebase the 8.8.x branch on top of develop to take multiple fixes into…
Browse files Browse the repository at this point in the history
… account (#2512)

Co-authored-by: Jason Marechal <[email protected]>
Co-authored-by: payetvin <[email protected]>
Co-authored-by: guilpier-code <[email protected]>
Co-authored-by: Abdoulbari Zakir <[email protected]>
Co-authored-by: Vincent Payet <[email protected]>
Co-authored-by: Juliette-Gerbaux <[email protected]>
Co-authored-by: OMNES Florian <[email protected]>
Co-authored-by: Guillaume PIERRE <[email protected]>
  • Loading branch information
9 people authored Dec 19, 2024
1 parent 5b14f61 commit a570a0e
Show file tree
Hide file tree
Showing 44 changed files with 2,647 additions and 572 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,22 +170,23 @@ jobs:
run: |
cd _build
ctest -C Release --output-on-failure -L "unit|end-to-end"

- name: Upload logs for failed tests
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-log
path: ${{ github.workspace }}/_build/Testing/Temporary/LastTest.log

- name: Run tests about infinity on BCs RHS
if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{ env.SIMTEST }}
batch-name: valid-v830
os: ${{ env.os }}

- name: Run MILP with CBC
if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }}
uses: ./.github/workflows/run-tests
Expand All @@ -195,6 +196,23 @@ jobs:
variant: "milp-cbc"
os: ${{ env.os }}

- name: Run tests on adequacy patch (CSR)
if: ${{ env.RUN_SIMPLE_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: adequacy-patch-CSR
os: ${{ env.os }}

- name: Run parallel tests
if: ${{ env.RUN_EXTENDED_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-parallel
os: ${{ env.os }}
variant: "parallel"

- name: Run tests introduced in 8.6.0
if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }}
uses: ./.github/workflows/run-tests
Expand Down Expand Up @@ -248,14 +266,6 @@ jobs:
batch-name: valid-mps
os: ${{ env.os }}

- name: Run tests for adequacy patch (CSR)
if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{ env.SIMTEST }}
batch-name: adequacy-patch-CSR
os: ${{ env.os }}

- name: Run parallel tests
if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }}
uses: ./.github/workflows/run-tests
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/windows-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ jobs:
batch-name: adequacy-patch-CSR
os: ${{ env.os }}

- name: Run tests about infinity on BCs RHS
if: ${{ env.RUN_SIMPLE_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-v830
os: ${{ env.test-platform }}

- name: Run tests about infinity on BCs RHS
if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }}
uses: ./.github/workflows/run-tests
Expand Down
21 changes: 21 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
#
# 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/>.
#

sonar.projectName=Antares_Simulator
sonar.projectKey=AntaresSimulatorTeam_Antares_Simulator
sonar.organization=antaressimulatorteam
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set(ANTARES_VERSION_HI 9)
set(ANTARES_VERSION_LO 2)
set(ANTARES_VERSION_REVISION 0)


# Beta release
set(ANTARES_BETA 0)
set(ANTARES_RC 7)
Expand Down
5 changes: 2 additions & 3 deletions src/libs/antares/exception/LoadingError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ InvalidSolverSpecificParameters::InvalidSolverSpecificParameters(const std::stri
{
}

InvalidStudy::InvalidStudy(const Yuni::String& study):
LoadingError(std::string("The folder `") + study.c_str()
+ "` does not seem to be a valid study")
InvalidStudy::InvalidStudy(const std::string& study):
LoadingError(std::string("The folder `") + study + "` does not seem to be a valid study")
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class InvalidSolverSpecificParameters: public LoadingError
class InvalidStudy: public LoadingError
{
public:
explicit InvalidStudy(const Yuni::String& study);
explicit InvalidStudy(const std::string& study);
};

class NoStudyProvided: public LoadingError
Expand Down
4 changes: 4 additions & 0 deletions src/libs/antares/study/parameters/adq-patch-params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ void AdqPatchParams::addExcludedVariables(std::vector<std::string>& out) const
out.emplace_back("LMR VIOL.");
out.emplace_back("UNSP. ENRG CSR");
out.emplace_back("DTG MRG CSR");
out.emplace_back("LOLD CSR");
out.emplace_back("LOLP CSR");
out.emplace_back("MAX MRG CSR");
out.emplace_back("OV. COST CSR");
}
}

Expand Down
5 changes: 5 additions & 0 deletions src/libs/antares/study/parts/thermal/cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ void Data::ThermalCluster::calculationOfSpinning()

void Data::ThermalCluster::reverseCalculationOfSpinning()
{
if (tsGenBehavior == LocalTSGenerationBehavior::forceNoGen)
{
return;
}

// Nothing to do if the spinning is equal to zero
// because it will the same multiply all entries of the matrix by 1.
if (Utils::isZero(spinning))
Expand Down
8 changes: 4 additions & 4 deletions src/solver/misc/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ std::unique_ptr<Yuni::GetOpt::Parser> CreateParser(Settings& settings, StudyLoad
"Solver used for simulation\nAvailable solver list : "
+ availableOrToolsSolversString());

//--xpress-parameters
//--solver-parameters
parser->add(
options.optOptions.solverParameters,
' ',
"solver-parameters",
"Set xpress solver specific parameters. The specified string must be wrapped into quotes: "
"--solver-parameters=\"param1 value1 param2 value2\". The syntax of parameters is solver "
"specfic, examples are given in Antares-Simulator online documentation.");
"Set solver-specific parameters, for instance --solver-parameters=\"THREADS 1 PRESOLVE 1\""
"for XPRESS or --solver-parameters=\"parallel/maxnthreads 1, lp/presolving TRUE\" for SCIP."
"Syntax is solver-dependent, and only supported for SCIP & XPRESS.");

parser->addParagraph("\nParameters");
// --name
Expand Down
2 changes: 0 additions & 2 deletions src/solver/optimisation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ set(RTESOLVER_OPT
post_process_commands.cpp
include/antares/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h
include/antares/solver/optimisation/adequacy_patch_csr/adq_patch_post_process_list.h
include/antares/solver/optimisation/adequacy_patch_csr/post_processing.h
adequacy_patch_csr/adq_patch_post_process_list.cpp
adequacy_patch_csr/post_processing.cpp
include/antares/solver/optimisation/adequacy_patch_csr/adq_patch_curtailment_sharing.h
adequacy_patch_csr/adq_patch_curtailment_sharing.cpp
adequacy_patch_csr/solve_problem.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@

#include "antares/solver/optimisation/adequacy_patch_csr/count_constraints_variables.h"
#include "antares/solver/optimisation/adequacy_patch_csr/csr_quadratic_problem.h"
#include "antares/solver/optimisation/opt_fonctions.h"
#include "antares/solver/simulation/adequacy_patch_runtime_data.h"

#include "solve_problem.h"

using namespace Yuni;

namespace Antares::Data::AdequacyPatch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,22 @@ AdqPatchPostProcessList::AdqPatchPostProcessList(const AdqPatchParams& adqPatchP
{
post_process_list.push_back(
std::make_unique<DispatchableMarginPostProcessCmd>(problemeHebdo_, numSpace_, areas));

// Here a post process particular to adq patch
post_process_list.push_back(
std::make_unique<HydroLevelsUpdatePostProcessCmd>(problemeHebdo_, areas, false, false));
post_process_list.push_back(std::make_unique<RemixHydroPostProcessCmd>(problemeHebdo_,
areas,
sheddingPolicy,
splxOptimization,
numSpace));

// Here a post process particular to adq patch
post_process_list.push_back(std::make_unique<CurtailmentSharingPostProcessCmd>(adqPatchParams,
problemeHebdo_,
areas,
numSpace_));
// Here a post process particular to adq patch
post_process_list.push_back(
std::make_unique<DTGmarginForAdqPatchPostProcessCmd>(problemeHebdo_, areas, numSpace));
std::make_unique<UpdateMrgPriceAfterCSRcmd>(problemeHebdo_, areas, numSpace));
post_process_list.push_back(
std::make_unique<DTGnettingAfterCSRcmd>(problemeHebdo_, areas, numSpace));
post_process_list.push_back(
std::make_unique<HydroLevelsUpdatePostProcessCmd>(problemeHebdo_, areas, true, false));
post_process_list.push_back(
Expand Down
62 changes: 0 additions & 62 deletions src/solver/optimisation/adequacy_patch_csr/post_processing.cpp

This file was deleted.

14 changes: 14 additions & 0 deletions src/solver/optimisation/adequacy_patch_csr/solve_problem.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

#pragma once

#include "antares/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h"
#include "antares/solver/optimisation/opt_structure_probleme_a_resoudre.h"
#include "antares/study/parameters/adq-patch-params.h"

using namespace Antares::Data::AdequacyPatch;

bool ADQ_PATCH_CSR(PROBLEME_ANTARES_A_RESOUDRE&,
HourlyCSRProblem&,
const AdqPatchParams&,
unsigned int week,
int year);
Loading

0 comments on commit a570a0e

Please sign in to comment.