From 8f705e3db5c16158454a310c476581db61b814b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20Mar=C3=A9chal?= <45510813+JasonMarechal25@users.noreply.github.com> Date: Thu, 25 Jul 2024 17:17:35 +0200 Subject: [PATCH] [API]Use antares lib (#825) Properly use antares in CI for new API mode --- .github/workflows/build_centos7.yml | 12 +++- .github/workflows/build_oracle8.yml | 16 +++-- .github/workflows/build_ubuntu.yml | 12 +++- .github/workflows/build_windows.yml | 26 +++++++- .../action.yml | 30 ++++++--- .../action.yml | 30 +++++++-- .github/workflows/sonarcloud.yml | 10 ++- .../workflows/ubuntu-system-deps-build.yml | 3 +- CMakeLists.txt | 65 ++++++++++--------- antares-version.json | 2 +- cmake/dependencies/CMakeLists.txt.in | 2 +- .../lp/master_last_basis.bss | 6 +- .../output/simulation/README.md | 3 + .../reference_lp/problem-1-1--optim-nb-1.mps | 48 ++++++++++++++ ports/coin-or-cbc/portfile.cmake | 4 +- ports/coin-or-cgl/portfile.cmake | 4 +- ports/coin-or-clp/portfile.cmake | 4 +- ports/coin-or-osi/portfile.cmake | 4 +- ports/coinutils/portfile.cmake | 4 +- src/cpp/benders/benders_core/WorkerMaster.cpp | 4 +- .../benders_core/include/WorkerMaster.h | 12 ++-- src/cpp/helpers/ArchiveReader.cpp | 1 + src/cpp/helpers/ArchiveWriter.cpp | 16 ++++- src/cpp/helpers/ArchiveWriter.h | 2 + src/cpp/lpnamer/main/ProblemGeneration.cpp | 6 +- src/cpp/lpnamer/model/ActiveLinks.cpp | 2 + src/cpp/lpnamer/model/ActiveLinks.h | 2 + ...aresProblemToXpansionProblemTranslator.cpp | 27 ++++---- ...ntaresProblemToXpansionProblemTranslator.h | 4 +- .../lpnamer/problem_modifier/CMakeLists.txt | 3 +- .../ProblemVariablesFromProblemAdapter.cpp | 8 +-- .../XpansionProblemsFromAntaresProvider.cpp | 9 +-- src/cpp/multisolver_interface/environment.cc | 7 +- .../multisolver_interface/dynamic_library.h | 2 + .../multisolver_interface/environment.h | 2 +- ...ProblemToXpansionProblemTranslatorTest.cpp | 22 +++++++ tests/cpp/lp_namer/CMakeLists.txt | 1 + 37 files changed, 300 insertions(+), 115 deletions(-) create mode 100644 data_test/tests_lpnamer/SmallTestFiveCandidates/output/simulation/README.md create mode 100644 tests/cpp/lp_namer/AntaresProblemToXpansionProblemTranslatorTest.cpp diff --git a/.github/workflows/build_centos7.yml b/.github/workflows/build_centos7.yml index b9aa848f8..26a842435 100644 --- a/.github/workflows/build_centos7.yml +++ b/.github/workflows/build_centos7.yml @@ -80,6 +80,7 @@ jobs: XPRESS_CONTAINER: ${GITHUB_WORKSPACE}/xpress/bin XPRS_LIB_Path_CONTAINER: ${GITHUB_WORKSPACE}/xpress/lib VCPKG_ROOT: ${{ github.workspace }}/vcpkg + ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools outputs: TGZ_NAME: ${{ steps.export_output.outputs.TGZ_NAME }} @@ -94,6 +95,10 @@ jobs: id: get_release uses: bruceadams/get-release@v1.3.2 + - name: Config OR-Tools URL + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_centos7_static_sirius.zip" >> $GITHUB_ENV + - uses: actions/checkout@v3 #Keep at 3 with: submodules: true @@ -130,6 +135,8 @@ jobs: antares-version: ${{needs.versions.outputs.antares-version}} os: centos7 os-full-name: CentOS-7.9.2009 + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} - name: Install dependencies run: | @@ -163,11 +170,12 @@ jobs: source /opt/rh/devtoolset-10/enable cmake -B _build -S . \ -DBUILD_TESTING=ON \ - -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/deps \ + -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/deps;${{env.ORTOOLS_DIR}}/install" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=_install \ -DBUILD_UI=ON \ -DALLOW_RUN_AS_ROOT=ON \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake - name: Build @@ -186,7 +194,7 @@ jobs: timeout-minutes: 120 shell: bash run: | - export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux/tools/openmpi/bin/:$PATH + export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux-release/tools/openmpi/bin/:$PATH export LD_LIBRARY_PATH=LD_LIBRARY_PATH:${{ env.XPRS_LIB_Path_CONTAINER }} export XPRESS=${{ env.XPRESS_CONTAINER }} cd _build diff --git a/.github/workflows/build_oracle8.yml b/.github/workflows/build_oracle8.yml index 9d563a9bf..99c55c792 100644 --- a/.github/workflows/build_oracle8.yml +++ b/.github/workflows/build_oracle8.yml @@ -54,6 +54,7 @@ jobs: XPRESSDIR_CONTAINER: ${GITHUB_WORKSPACE}/xpress XPRESS_CONTAINER: ${GITHUB_WORKSPACE}/xpress/bin XPRS_LIB_Path_CONTAINER: ${GITHUB_WORKSPACE}/xpress/lib + ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools outputs: zip_name: ${{ steps.zip_name.outputs.zip_name }} @@ -63,11 +64,15 @@ jobs: - name: Install System run: | dnf install -y epel-release git wget rpm-build redhat-lsb-core openmpi-devel - dnf install -y unzip libuuid-devel gcc-toolset-10-toolchain python3-devel zlib-devel + dnf install -y unzip libuuid-devel gcc-toolset-11 python3-devel zlib-devel #make gcc &co available system wide and "action wide" - source /opt/rh/gcc-toolset-10/enable + source /opt/rh/gcc-toolset-11/enable echo $PATH >> $GITHUB_PATH + - name: Config OR-Tools URL + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_oraclelinux-8_static_sirius.zip" >> $GITHUB_ENV + - run: | dnf module install -y nodejs:20/common @@ -103,6 +108,8 @@ jobs: antares-version: ${{needs.versions.outputs.antares-version}} os: Oracle8 os-full-name: OracleServer-8.10 + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} - name: vcpkg install run: | @@ -130,9 +137,10 @@ jobs: -DBUILD_TESTING=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=_install \ - -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/deps \ + -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/deps;${{env.ORTOOLS_DIR}}/install" \ -DBUILD_UI=OFF \ -DALLOW_RUN_AS_ROOT=ON \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake - name: Build @@ -143,7 +151,7 @@ jobs: timeout-minutes: 120 shell: bash run: | - export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux/tools/openmpi/bin/:$PATH + export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux-release/tools/openmpi/bin/:$PATH export LD_LIBRARY_PATH=LD_LIBRARY_PATH:${{ env.XPRS_LIB_Path_CONTAINER }} export XPRESS=${{ env.XPRESS_CONTAINER }} cd _build diff --git a/.github/workflows/build_ubuntu.yml b/.github/workflows/build_ubuntu.yml index efef241b2..38a17c34a 100644 --- a/.github/workflows/build_ubuntu.yml +++ b/.github/workflows/build_ubuntu.yml @@ -31,6 +31,7 @@ jobs: XPRESS: ${{ github.workspace }}/xpress/bin XPRS_LIB_Path: ${{ github.workspace }}/xpress/lib VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" + ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools outputs: TGZ_NAME: ${{ steps.export_output.outputs.TGZ_NAME }} @@ -102,12 +103,18 @@ jobs: path: 'antares-version.json' key: 'antares_xpansion_version' + - name: Config OR-Tools URL + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV + - name: Download pre-compiled librairies uses: ./.github/workflows/download-extract-precompiled-libraries-tgz with: antares-version: ${{steps.antares-version.outputs.result}} os: ${{matrix.os}} os-full-name: Ubuntu-20.04 + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} - name: vcpkg install run: | @@ -136,8 +143,9 @@ jobs: -DBUILD_TESTING=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=_install \ - -DCMAKE_PREFIX_PATH=${{ github.workspace }}/deps \ + -DCMAKE_PREFIX_PATH="${{ github.workspace }}/deps;${{env.ORTOOLS_DIR}}/install" \ -DBUILD_UI=ON \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake - name: Build @@ -146,7 +154,7 @@ jobs: - name: Test run: | - export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux/tools/openmpi/bin/:$PATH + export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux-release/tools/openmpi/bin/:$PATH cd _build ctest -C Release --output-on-failure -L "medium|unit|benders|lpnamer" diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 9125419af..d88c7d8ed 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -33,6 +33,7 @@ jobs: # Indicates the location of the vcpkg as a Git submodule of the project repository. VCPKG_ROOT: ${{ github.workspace }}/vcpkg VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" + ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools outputs: zip_name: ${{ steps.zip_name.outputs.zip_name }} @@ -41,6 +42,10 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Config OR-Tools URL + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_windows-latest_static_sirius.zip" >> $GITHUB_ENV + - name: Checkout xpressmp linux if: matrix.xprs.value == 'XPRESS-ON' uses: actions/checkout@v4 @@ -100,16 +105,33 @@ jobs: # Allows to restore a cache when deps have only partially changed (like adding a dependency) restore-keys: vcpkg-cache-windows- + - name: Config OR-Tools URL + shell: bash + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_windows-latest_static_sirius.zip" >> $GITHUB_ENV + + - run: echo ${{env.ORTOOLS_URL}} - name: Download pre-compiled librairies uses: ./.github/workflows/download-extract-precompiled-libraries-zip with: antares-version: ${{steps.antares-version.outputs.result}} os: ${{matrix.os}} + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} + - run: echo "version=$(echo ${{steps.antares-version.outputs.result}} | sed 's/-.*//')" >> $GITHUB_ENV + shell: bash - name: Configure + shell: bash run: | - $pwd=Get-Location - cmake -B _build -S . -DCMAKE_PREFIX_PATH="$pwd\rte-antares-${{steps.antares-version.outputs.result}}-installer-64bits" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_INSTALL_PREFIX=_install -DBUILD_UI=ON + cmake -B _build -S . \ + -DCMAKE_PREFIX_PATH="${{github.workspace}}/rte-antares-${{env.version}}-installer-64bits;${{env.ORTOOLS_DIR}}/install" \ + -DBUILD_TESTING=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" \ + -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \ + -DCMAKE_INSTALL_PREFIX=_install \ + -DBUILD_UI=ON - name: Build run: | diff --git a/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml b/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml index 601033d9f..b5c4e8bf0 100644 --- a/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml +++ b/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml @@ -14,19 +14,29 @@ inputs: description: 'build type' required: false default: 'Release' - variant: - description: 'extra qualifiers' - required: false - default: "" + ortools-url: + description: 'URL for OR-Tools' + required: true + ortools-dir: + description: 'Destination directory for OR-Tools' + required: true runs: using: "composite" steps: - - id: download-extract + - name: download-extract antares shell: bash run: | - export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH - export PATH=/usr/lib64/openmpi/bin:$PATH + version=$(echo ${{inputs.antares-version}} | sed 's/-.*//') mkdir deps - wget https://github.com/AntaresSimulatorTeam/Antares_Simulator/releases/download/v${{inputs.antares-version}}/antares-${{inputs.antares-version}}-${{inputs.os-full-name}}${{inputs.variant}}.tar.gz - tar -xvf antares-${{inputs.antares-version}}-${{inputs.os-full-name}}${{inputs.variant}}.tar.gz -C deps --strip-components=1 - rm -rf antares-${{inputs.antares-version}}-${{inputs.os-full-name}}${{inputs.variant}}.tar.gz + wget https://github.com/AntaresSimulatorTeam/Antares_Simulator/releases/download/v${{inputs.antares-version}}/antares-${version}-${{inputs.os-full-name}}.tar.gz + tar -xvf antares-${version}-${{inputs.os-full-name}}.tar.gz -C deps --strip-components=1 + rm -rf antares-${version}-${{inputs.os-full-name}}.tar.gz + + - name: Download & extract OR-Tools + shell: bash + run: | + mkdir -p ${{inputs.ortools-dir}} + cd ${{inputs.ortools-dir}} + wget ${{inputs.ortools-url}} -O ortools.zip + unzip ortools.zip + rm ortools.zip \ No newline at end of file diff --git a/.github/workflows/download-extract-precompiled-libraries-zip/action.yml b/.github/workflows/download-extract-precompiled-libraries-zip/action.yml index e111cd45d..90107a548 100644 --- a/.github/workflows/download-extract-precompiled-libraries-zip/action.yml +++ b/.github/workflows/download-extract-precompiled-libraries-zip/action.yml @@ -15,13 +15,29 @@ inputs: description: 'extra qualifiers' required: false default: "" + ortools-url: + description: 'URL for OR-Tools' + required: true + ortools-dir: + description: 'Destination directory for OR-Tools' + required: true runs: using: "composite" - steps: - - id: download-extract - shell: bash - run: | - wget https://github.com/AntaresSimulatorTeam/Antares_Simulator/releases/download/v${{inputs.antares-version}}/rte-antares-${{inputs.antares-version}}-installer-64bits.zip - unzip rte-antares-${{inputs.antares-version}}-installer-64bits.zip - rm -rf rte-antares-${{inputs.antares-version}}-installer-64bits.zip + steps: + - id: download-extract + shell: bash + run: | + version=$(echo ${{inputs.antares-version}} | sed 's/-.*//') + wget https://github.com/AntaresSimulatorTeam/Antares_Simulator/releases/download/v${{inputs.antares-version}}/rte-antares-${version}-installer-64bits.zip + unzip rte-antares-${version}-installer-64bits.zip + rm -rf rte-antares-${version}-installer-64bits.zip + + - name: Download & extract OR-Tools + shell: bash + run: | + mkdir "${{inputs.ortools-dir}}" + cd "${{inputs.ortools-dir}}" + wget ${{inputs.ortools-url}} -O ortools.zip + unzip ortools.zip + rm ortools.zip \ No newline at end of file diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index fa2639039..2dd9097d5 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -19,6 +19,7 @@ jobs: os: [ ubuntu-20.04 ] env: VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" + ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools steps: @@ -80,12 +81,19 @@ jobs: path: 'antares-version.json' key: 'antares_xpansion_version' + - name: Config OR-Tools URL + shell: bash + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV + - name: Download pre-compiled librairies uses: ./.github/workflows/download-extract-precompiled-libraries-tgz with: antares-version: ${{steps.antares-version.outputs.result}} os: ${{matrix.os}} os-full-name: Ubuntu-20.04 + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} - name: Init submodule run: | @@ -117,7 +125,7 @@ jobs: -DBUILD_TESTING=ON \ -DBUILD_antares_solver=OFF \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_PREFIX_PATH=${{ github.workspace }}/deps \ + -DCMAKE_PREFIX_PATH="${{ github.workspace }}/deps;${{env.ORTOOLS_DIR}}/install" \ -DCMAKE_INSTALL_PREFIX=_install \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake diff --git a/.github/workflows/ubuntu-system-deps-build.yml b/.github/workflows/ubuntu-system-deps-build.yml index cbb5ef971..b54157050 100644 --- a/.github/workflows/ubuntu-system-deps-build.yml +++ b/.github/workflows/ubuntu-system-deps-build.yml @@ -95,6 +95,7 @@ jobs: -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=_install \ -DBUILD_UI=ON \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake - name: Cache vcpkg binary dir @@ -113,7 +114,7 @@ jobs: - name: Running unit tests run: | - export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux/tools/openmpi/bin/:$PATH + export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux-release/tools/openmpi/bin/:$PATH cd _build ctest -C Release --output-on-failure -L "medium|unit|benders|lpnamer" diff --git a/CMakeLists.txt b/CMakeLists.txt index 03259f2e1..d8de86497 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,7 +111,29 @@ endif () include("cmake/utils.cmake") include("cmake/json-cmake-1.1.0/JSONParser.cmake") -#Define deps install directory +file(READ antares-version.json jsonContent) +sbeParseJson(antares_version jsonContent) + +#need to know antares solver version because antares-solver targets still refers to antares version +SET(ANTARES_VERSION ${antares_version.antares_version_executable}) +SET(ANTARES_VERSION_TAG ${antares_version.antares_version}) +SET(MINIZIP_TAG ${antares_version.minizip_ng_version}) + +sbeClearJson(antares_version) + +# Build dependencies not handled by antares-deps repository +option(BUILD_antares_solver "Build antares solver" ON) +message(STATUS "Build antares solver: ${BUILD_antares_solver}") +if (${BUILD_antares_solver}) + #check if antares_solver available before asking for sirius and ortools build + find_package(Antares QUIET) + if (NOT Antares_FOUND) + message(WARNING "Antares solver not found, will be build") + set(BUILD_sirius ON) + set(BUILD_ortools ON) + if (NOT Antares_FOUND) + message(STATUS "Antares not found, building it from source") + #Define deps install directory if (NOT DEPS_INSTALL_DIR) SET(DEPS_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../rte-antares-deps-${CMAKE_BUILD_TYPE}) else() @@ -140,35 +162,14 @@ elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug") list(APPEND CMAKE_PREFIX_PATH ${DEPS_INSTALL_DIR_ANTARES}) -endif() - -file(READ antares-version.json jsonContent) -sbeParseJson(antares_version jsonContent) - -#need to know antares solver version because antares-solver targets still refers to antares version -SET(ANTARES_VERSION ${antares_version.antares_version_executable}) -SET(ANTARES_VERSION_TAG ${antares_version.antares_version}) -SET(MINIZIP_TAG ${antares_version.minizip_ng_version}) - -sbeClearJson(antares_version) - -# Build dependencies not handled by antares-deps repository -option(BUILD_antares_solver "Build antares solver" ON) -message(STATUS "Build antares solver: ${BUILD_antares_solver}") - -if (${BUILD_antares_solver}) - #check if antares_solver available before asking for sirius and ortools build - find_package(antares-solver QUIET) - if (NOT antares-solver_FOUND) - set(BUILD_sirius ON) - set(BUILD_ortools ON) - endif() -endif() - -message(STATUS "Build type is ${CMAKE_BUILD_TYPE}") -add_subdirectory(cmake/dependencies ${CMAKE_CURRENT_BINARY_DIR}/build_deps) -find_package(antares-solver REQUIRED) + endif () + add_subdirectory(cmake/dependencies ${CMAKE_CURRENT_BINARY_DIR}/build_deps) + endif () + endif () +endif () +find_package(Antares REQUIRED) message(STATUS "Build type is ${CMAKE_BUILD_TYPE}") +set(CMAKE_FIND_DEBUG_MODE false) find_package(minizip-ng REQUIRED) # --------------------------------------------------------------------------- @@ -267,12 +268,12 @@ else() set(CURRENT_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) endif() -find_package(Antares REQUIRED) +find_package(antares-solver REQUIRED) #Default RELEASE antares-solver use -get_target_property( ANTARES_SOLVER_PATH Antares::antares-solver IMPORTED_LOCATION_RELEASE ) +get_target_property( ANTARES_SOLVER_PATH antares-solver IMPORTED_LOCATION_RELEASE ) if (NOT ANTARES_SOLVER_PATH) - get_target_property( ANTARES_SOLVER_PATH Antares::antares-solver IMPORTED_LOCATION_DEBUG ) + get_target_property( ANTARES_SOLVER_PATH antares-solver IMPORTED_LOCATION_DEBUG ) endif() get_filename_component(ANTARES_SOLVER_DIR ${ANTARES_SOLVER_PATH} DIRECTORY) diff --git a/antares-version.json b/antares-version.json index 63a8fb6b1..c5319b9b0 100644 --- a/antares-version.json +++ b/antares-version.json @@ -1,5 +1,5 @@ { - "antares_version": "9.1.0", + "antares_version": "9.1.0-api-02", "antares_version_executable": "9.1", "antares_xpansion_version": "1.3.0", "minizip_ng_version": "3.0.6" diff --git a/cmake/dependencies/CMakeLists.txt.in b/cmake/dependencies/CMakeLists.txt.in index 32440be93..543be75ae 100644 --- a/cmake/dependencies/CMakeLists.txt.in +++ b/cmake/dependencies/CMakeLists.txt.in @@ -16,7 +16,7 @@ ExternalProject_Add(${PROJECT_NAME}_project GIT_REPOSITORY "@GIT_DEP_REPOSITORY@" GIT_TAG "@GIT_DEP_TAG@" LOG_DOWNLOAD FALSE - GIT_SUBMODULES src/antares-deps + GIT_SUBMODULES vcpkg # UPDATE_COMMAND "" LOG_UPDATE FALSE diff --git a/data_test/external_loop_test/lp/master_last_basis.bss b/data_test/external_loop_test/lp/master_last_basis.bss index f632a4bee..08be28b48 100644 --- a/data_test/external_loop_test/lp/master_last_basis.bss +++ b/data_test/external_loop_test/lp/master_last_basis.bss @@ -1,5 +1,5 @@ NAME - LL G_p_max_0_0 0 - XU alpha R1 19 0 - XL alpha_0 R2 19 -19 + UL G_p_max_0_0 10 + XU alpha R1 36 0 + XL alpha_0 R5 36 -36 ENDATA diff --git a/data_test/tests_lpnamer/SmallTestFiveCandidates/output/simulation/README.md b/data_test/tests_lpnamer/SmallTestFiveCandidates/output/simulation/README.md new file mode 100644 index 000000000..908e653bd --- /dev/null +++ b/data_test/tests_lpnamer/SmallTestFiveCandidates/output/simulation/README.md @@ -0,0 +1,3 @@ +Generated with 1.3.0 ubuntu + +Manually change header. Changing "Pb" for "ClpDefau" \ No newline at end of file diff --git a/data_test/tests_lpnamer/SmallTestFiveCandidates/output/simulation/reference_lp/problem-1-1--optim-nb-1.mps b/data_test/tests_lpnamer/SmallTestFiveCandidates/output/simulation/reference_lp/problem-1-1--optim-nb-1.mps index a8fd01aad..50bb0686a 100644 --- a/data_test/tests_lpnamer/SmallTestFiveCandidates/output/simulation/reference_lp/problem-1-1--optim-nb-1.mps +++ b/data_test/tests_lpnamer/SmallTestFiveCandidates/output/simulation/reference_lp/problem-1-1--optim-nb-1.mps @@ -18878,8 +18878,10 @@ COLUMNS NTCDirect::link::hour<144> R0004496 1 NTCDirect::link::hour<144> AreaBalance::area::hour<144> 1 NTCDirect::link::hour<144> AreaBalance::area::hour<144> -1 + NTCDirect::link::hour<144> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<144> AreaBalance::area::hour<144> 1 NTCDirect::link::hour<144> AreaBalance::area::hour<144> -1 + NTCDirect::link::hour<144> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<144> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<144> AreaBalance::area::hour<144> -1 DispatchableProduction::area::ThermalCluster::hour<144> FictiveLoads::area::hour<144> -1 @@ -18973,8 +18975,10 @@ COLUMNS NTCDirect::link::hour<145> R0004498 1 NTCDirect::link::hour<145> AreaBalance::area::hour<145> 1 NTCDirect::link::hour<145> AreaBalance::area::hour<145> -1 + NTCDirect::link::hour<145> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<145> AreaBalance::area::hour<145> 1 NTCDirect::link::hour<145> AreaBalance::area::hour<145> -1 + NTCDirect::link::hour<145> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<145> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<145> AreaBalance::area::hour<145> -1 DispatchableProduction::area::ThermalCluster::hour<145> FictiveLoads::area::hour<145> -1 @@ -19068,8 +19072,10 @@ COLUMNS NTCDirect::link::hour<146> R0004500 1 NTCDirect::link::hour<146> AreaBalance::area::hour<146> 1 NTCDirect::link::hour<146> AreaBalance::area::hour<146> -1 + NTCDirect::link::hour<146> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<146> AreaBalance::area::hour<146> 1 NTCDirect::link::hour<146> AreaBalance::area::hour<146> -1 + NTCDirect::link::hour<146> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<146> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<146> AreaBalance::area::hour<146> -1 DispatchableProduction::area::ThermalCluster::hour<146> FictiveLoads::area::hour<146> -1 @@ -19163,8 +19169,10 @@ COLUMNS NTCDirect::link::hour<147> R0004502 1 NTCDirect::link::hour<147> AreaBalance::area::hour<147> 1 NTCDirect::link::hour<147> AreaBalance::area::hour<147> -1 + NTCDirect::link::hour<147> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<147> AreaBalance::area::hour<147> 1 NTCDirect::link::hour<147> AreaBalance::area::hour<147> -1 + NTCDirect::link::hour<147> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<147> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<147> AreaBalance::area::hour<147> -1 DispatchableProduction::area::ThermalCluster::hour<147> FictiveLoads::area::hour<147> -1 @@ -19258,8 +19266,10 @@ COLUMNS NTCDirect::link::hour<148> R0004504 1 NTCDirect::link::hour<148> AreaBalance::area::hour<148> 1 NTCDirect::link::hour<148> AreaBalance::area::hour<148> -1 + NTCDirect::link::hour<148> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<148> AreaBalance::area::hour<148> 1 NTCDirect::link::hour<148> AreaBalance::area::hour<148> -1 + NTCDirect::link::hour<148> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<148> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<148> AreaBalance::area::hour<148> -1 DispatchableProduction::area::ThermalCluster::hour<148> FictiveLoads::area::hour<148> -1 @@ -19353,8 +19363,10 @@ COLUMNS NTCDirect::link::hour<149> R0004506 1 NTCDirect::link::hour<149> AreaBalance::area::hour<149> 1 NTCDirect::link::hour<149> AreaBalance::area::hour<149> -1 + NTCDirect::link::hour<149> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<149> AreaBalance::area::hour<149> 1 NTCDirect::link::hour<149> AreaBalance::area::hour<149> -1 + NTCDirect::link::hour<149> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<149> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<149> AreaBalance::area::hour<149> -1 DispatchableProduction::area::ThermalCluster::hour<149> FictiveLoads::area::hour<149> -1 @@ -19448,8 +19460,10 @@ COLUMNS NTCDirect::link::hour<150> R0004508 1 NTCDirect::link::hour<150> AreaBalance::area::hour<150> 1 NTCDirect::link::hour<150> AreaBalance::area::hour<150> -1 + NTCDirect::link::hour<150> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<150> AreaBalance::area::hour<150> 1 NTCDirect::link::hour<150> AreaBalance::area::hour<150> -1 + NTCDirect::link::hour<150> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<150> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<150> AreaBalance::area::hour<150> -1 DispatchableProduction::area::ThermalCluster::hour<150> FictiveLoads::area::hour<150> -1 @@ -19543,8 +19557,10 @@ COLUMNS NTCDirect::link::hour<151> R0004510 1 NTCDirect::link::hour<151> AreaBalance::area::hour<151> 1 NTCDirect::link::hour<151> AreaBalance::area::hour<151> -1 + NTCDirect::link::hour<151> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<151> AreaBalance::area::hour<151> 1 NTCDirect::link::hour<151> AreaBalance::area::hour<151> -1 + NTCDirect::link::hour<151> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<151> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<151> AreaBalance::area::hour<151> -1 DispatchableProduction::area::ThermalCluster::hour<151> FictiveLoads::area::hour<151> -1 @@ -19638,8 +19654,10 @@ COLUMNS NTCDirect::link::hour<152> R0004512 1 NTCDirect::link::hour<152> AreaBalance::area::hour<152> 1 NTCDirect::link::hour<152> AreaBalance::area::hour<152> -1 + NTCDirect::link::hour<152> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<152> AreaBalance::area::hour<152> 1 NTCDirect::link::hour<152> AreaBalance::area::hour<152> -1 + NTCDirect::link::hour<152> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<152> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<152> AreaBalance::area::hour<152> -1 DispatchableProduction::area::ThermalCluster::hour<152> FictiveLoads::area::hour<152> -1 @@ -19733,8 +19751,10 @@ COLUMNS NTCDirect::link::hour<153> R0004514 1 NTCDirect::link::hour<153> AreaBalance::area::hour<153> 1 NTCDirect::link::hour<153> AreaBalance::area::hour<153> -1 + NTCDirect::link::hour<153> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<153> AreaBalance::area::hour<153> 1 NTCDirect::link::hour<153> AreaBalance::area::hour<153> -1 + NTCDirect::link::hour<153> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<153> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<153> AreaBalance::area::hour<153> -1 DispatchableProduction::area::ThermalCluster::hour<153> FictiveLoads::area::hour<153> -1 @@ -19828,8 +19848,10 @@ COLUMNS NTCDirect::link::hour<154> R0004516 1 NTCDirect::link::hour<154> AreaBalance::area::hour<154> 1 NTCDirect::link::hour<154> AreaBalance::area::hour<154> -1 + NTCDirect::link::hour<154> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<154> AreaBalance::area::hour<154> 1 NTCDirect::link::hour<154> AreaBalance::area::hour<154> -1 + NTCDirect::link::hour<154> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<154> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<154> AreaBalance::area::hour<154> -1 DispatchableProduction::area::ThermalCluster::hour<154> FictiveLoads::area::hour<154> -1 @@ -19923,8 +19945,10 @@ COLUMNS NTCDirect::link::hour<155> R0004518 1 NTCDirect::link::hour<155> AreaBalance::area::hour<155> 1 NTCDirect::link::hour<155> AreaBalance::area::hour<155> -1 + NTCDirect::link::hour<155> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<155> AreaBalance::area::hour<155> 1 NTCDirect::link::hour<155> AreaBalance::area::hour<155> -1 + NTCDirect::link::hour<155> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<155> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<155> AreaBalance::area::hour<155> -1 DispatchableProduction::area::ThermalCluster::hour<155> FictiveLoads::area::hour<155> -1 @@ -20018,8 +20042,10 @@ COLUMNS NTCDirect::link::hour<156> R0004520 1 NTCDirect::link::hour<156> AreaBalance::area::hour<156> 1 NTCDirect::link::hour<156> AreaBalance::area::hour<156> -1 + NTCDirect::link::hour<156> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<156> AreaBalance::area::hour<156> 1 NTCDirect::link::hour<156> AreaBalance::area::hour<156> -1 + NTCDirect::link::hour<156> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<156> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<156> AreaBalance::area::hour<156> -1 DispatchableProduction::area::ThermalCluster::hour<156> FictiveLoads::area::hour<156> -1 @@ -20113,8 +20139,10 @@ COLUMNS NTCDirect::link::hour<157> R0004522 1 NTCDirect::link::hour<157> AreaBalance::area::hour<157> 1 NTCDirect::link::hour<157> AreaBalance::area::hour<157> -1 + NTCDirect::link::hour<157> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<157> AreaBalance::area::hour<157> 1 NTCDirect::link::hour<157> AreaBalance::area::hour<157> -1 + NTCDirect::link::hour<157> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<157> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<157> AreaBalance::area::hour<157> -1 DispatchableProduction::area::ThermalCluster::hour<157> FictiveLoads::area::hour<157> -1 @@ -20208,8 +20236,10 @@ COLUMNS NTCDirect::link::hour<158> R0004524 1 NTCDirect::link::hour<158> AreaBalance::area::hour<158> 1 NTCDirect::link::hour<158> AreaBalance::area::hour<158> -1 + NTCDirect::link::hour<158> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<158> AreaBalance::area::hour<158> 1 NTCDirect::link::hour<158> AreaBalance::area::hour<158> -1 + NTCDirect::link::hour<158> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<158> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<158> AreaBalance::area::hour<158> -1 DispatchableProduction::area::ThermalCluster::hour<158> FictiveLoads::area::hour<158> -1 @@ -20303,8 +20333,10 @@ COLUMNS NTCDirect::link::hour<159> R0004526 1 NTCDirect::link::hour<159> AreaBalance::area::hour<159> 1 NTCDirect::link::hour<159> AreaBalance::area::hour<159> -1 + NTCDirect::link::hour<159> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<159> AreaBalance::area::hour<159> 1 NTCDirect::link::hour<159> AreaBalance::area::hour<159> -1 + NTCDirect::link::hour<159> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<159> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<159> AreaBalance::area::hour<159> -1 DispatchableProduction::area::ThermalCluster::hour<159> FictiveLoads::area::hour<159> -1 @@ -20398,8 +20430,10 @@ COLUMNS NTCDirect::link::hour<160> R0004528 1 NTCDirect::link::hour<160> AreaBalance::area::hour<160> 1 NTCDirect::link::hour<160> AreaBalance::area::hour<160> -1 + NTCDirect::link::hour<160> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<160> AreaBalance::area::hour<160> 1 NTCDirect::link::hour<160> AreaBalance::area::hour<160> -1 + NTCDirect::link::hour<160> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<160> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<160> AreaBalance::area::hour<160> -1 DispatchableProduction::area::ThermalCluster::hour<160> FictiveLoads::area::hour<160> -1 @@ -20493,8 +20527,10 @@ COLUMNS NTCDirect::link::hour<161> R0004530 1 NTCDirect::link::hour<161> AreaBalance::area::hour<161> 1 NTCDirect::link::hour<161> AreaBalance::area::hour<161> -1 + NTCDirect::link::hour<161> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<161> AreaBalance::area::hour<161> 1 NTCDirect::link::hour<161> AreaBalance::area::hour<161> -1 + NTCDirect::link::hour<161> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<161> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<161> AreaBalance::area::hour<161> -1 DispatchableProduction::area::ThermalCluster::hour<161> FictiveLoads::area::hour<161> -1 @@ -20588,8 +20624,10 @@ COLUMNS NTCDirect::link::hour<162> R0004532 1 NTCDirect::link::hour<162> AreaBalance::area::hour<162> 1 NTCDirect::link::hour<162> AreaBalance::area::hour<162> -1 + NTCDirect::link::hour<162> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<162> AreaBalance::area::hour<162> 1 NTCDirect::link::hour<162> AreaBalance::area::hour<162> -1 + NTCDirect::link::hour<162> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<162> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<162> AreaBalance::area::hour<162> -1 DispatchableProduction::area::ThermalCluster::hour<162> FictiveLoads::area::hour<162> -1 @@ -20683,8 +20721,10 @@ COLUMNS NTCDirect::link::hour<163> R0004534 1 NTCDirect::link::hour<163> AreaBalance::area::hour<163> 1 NTCDirect::link::hour<163> AreaBalance::area::hour<163> -1 + NTCDirect::link::hour<163> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<163> AreaBalance::area::hour<163> 1 NTCDirect::link::hour<163> AreaBalance::area::hour<163> -1 + NTCDirect::link::hour<163> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<163> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<163> AreaBalance::area::hour<163> -1 DispatchableProduction::area::ThermalCluster::hour<163> FictiveLoads::area::hour<163> -1 @@ -20778,8 +20818,10 @@ COLUMNS NTCDirect::link::hour<164> R0004536 1 NTCDirect::link::hour<164> AreaBalance::area::hour<164> 1 NTCDirect::link::hour<164> AreaBalance::area::hour<164> -1 + NTCDirect::link::hour<164> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<164> AreaBalance::area::hour<164> 1 NTCDirect::link::hour<164> AreaBalance::area::hour<164> -1 + NTCDirect::link::hour<164> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<164> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<164> AreaBalance::area::hour<164> -1 DispatchableProduction::area::ThermalCluster::hour<164> FictiveLoads::area::hour<164> -1 @@ -20873,8 +20915,10 @@ COLUMNS NTCDirect::link::hour<165> R0004538 1 NTCDirect::link::hour<165> AreaBalance::area::hour<165> 1 NTCDirect::link::hour<165> AreaBalance::area::hour<165> -1 + NTCDirect::link::hour<165> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<165> AreaBalance::area::hour<165> 1 NTCDirect::link::hour<165> AreaBalance::area::hour<165> -1 + NTCDirect::link::hour<165> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<165> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<165> AreaBalance::area::hour<165> -1 DispatchableProduction::area::ThermalCluster::hour<165> FictiveLoads::area::hour<165> -1 @@ -20968,8 +21012,10 @@ COLUMNS NTCDirect::link::hour<166> R0004540 1 NTCDirect::link::hour<166> AreaBalance::area::hour<166> 1 NTCDirect::link::hour<166> AreaBalance::area::hour<166> -1 + NTCDirect::link::hour<166> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<166> AreaBalance::area::hour<166> 1 NTCDirect::link::hour<166> AreaBalance::area::hour<166> -1 + NTCDirect::link::hour<166> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<166> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<166> AreaBalance::area::hour<166> -1 DispatchableProduction::area::ThermalCluster::hour<166> FictiveLoads::area::hour<166> -1 @@ -21063,8 +21109,10 @@ COLUMNS NTCDirect::link::hour<167> R0004542 1 NTCDirect::link::hour<167> AreaBalance::area::hour<167> 1 NTCDirect::link::hour<167> AreaBalance::area::hour<167> -1 + NTCDirect::link::hour<167> Storing_balance::daily::day<6> 0.8 NTCDirect::link::hour<167> AreaBalance::area::hour<167> 1 NTCDirect::link::hour<167> AreaBalance::area::hour<167> -1 + NTCDirect::link::hour<167> Storing_balance::daily::day<6> 1 DispatchableProduction::area::ThermalCluster::hour<167> OBJROW 19.9994564001 DispatchableProduction::area::ThermalCluster::hour<167> AreaBalance::area::hour<167> -1 DispatchableProduction::area::ThermalCluster::hour<167> FictiveLoads::area::hour<167> -1 diff --git a/ports/coin-or-cbc/portfile.cmake b/ports/coin-or-cbc/portfile.cmake index 144f69f75..05b74f1d1 100644 --- a/ports/coin-or-cbc/portfile.cmake +++ b/ports/coin-or-cbc/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "Mizux/Cbc" - REF "5714054827d852fae3beb7a4065f84ea56f207bb" - SHA512 d9d563b7af6102ba29c522cabf983ebde31a38f7010f578bc0dca258e63245c92b975fd0a3d5b96c7eeba886034b1e188d1399eb0d67769e0fa560c23e088ebf + REF "b01a53da39577380acdb84d8a3577911c5d91a13" #stable/2.10 + SHA512 98a0e75dc1ac8ead134391ebd442d9cead0b1182620bff4058eb59e6cc843eaa9d0f70b956d1d1202836e5b3820a95107bec9e2233354080ab0a3a56dea1b20a HEAD_REF master ) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) diff --git a/ports/coin-or-cgl/portfile.cmake b/ports/coin-or-cgl/portfile.cmake index 8bc58e0ca..18f42b66f 100644 --- a/ports/coin-or-cgl/portfile.cmake +++ b/ports/coin-or-cgl/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "Mizux/Cgl" - REF "925ad49fdd958ddb51f3ecfd87d222b0ea8d26a8" - SHA512 365c204272f6d20f881ce5e14cfa3c2c1d5b0aef1ff92a7f8a889c708b2d091105bc1ba2dfdee911b3cab876af677f5ee3e55657f9fdb9356915966379587261 + REF "59d95fba6605329d615d44ac7be0be2397210d5a" #stable/0.60 + SHA512 5667c59a632bf30f43dbb993b434d81599d6933ffff874bbee92f4850229b0e6b0c20deacabc31d30ffd5c7484d048df1835e4524e98162b838deb621e94a373 HEAD_REF master ) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) diff --git a/ports/coin-or-clp/portfile.cmake b/ports/coin-or-clp/portfile.cmake index 355bef5ec..473fb1b4e 100644 --- a/ports/coin-or-clp/portfile.cmake +++ b/ports/coin-or-clp/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "Mizux/Clp" - REF "d8cdeb5fd6d51ac7d0f50778d2b2feccaa716228" - SHA512 58e737deeb5276e4894fbebac0f60da13e8419b6cff531be381bc582320ceeab0f4688c8ec29d4e7248b6cc5256edb27b2e98496913262ce0f2960b6b6ab598c + REF "914e0af16285ab6b0514947296213a0e67e80880" #stable/1.17 + SHA512 c6a90007dc3177bb37800ae5c5c632403437df3a9ee54dfecf433e4c8b2ea403047c179ffdeef33b3aeab00c7ad2d859f4f56cca4488502dca8866889d909f1f HEAD_REF master ) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) diff --git a/ports/coin-or-osi/portfile.cmake b/ports/coin-or-osi/portfile.cmake index 737fbbeef..485830e45 100644 --- a/ports/coin-or-osi/portfile.cmake +++ b/ports/coin-or-osi/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "Mizux/Osi" - REF "d724c4a5a0d87669d63e44179c468d8a02f4f69a" - SHA512 fb173c04e3920c863e4d29e202cbaf182ee21332dc05ce293ffc39ead1b124f86f9682cc12032d216a712ea9aa3d0c98176bcbcd1b217e93afc6ce5a1ced68ed + REF "d2809dd1ab01eb5c766edce7cea2ca2c1c5ecd2a" #stable/0.108 + SHA512 0b15a823666f7d381dadf360b6443fd28e9ba1f2c4c157309e10318d0a836014ec2a37bce0f0efdd9960769d839352aca0ba60f862b9c7eeaa96fabdffb7e9ca HEAD_REF master ) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) diff --git a/ports/coinutils/portfile.cmake b/ports/coinutils/portfile.cmake index 153722282..5fc42452c 100644 --- a/ports/coinutils/portfile.cmake +++ b/ports/coinutils/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "Mizux/CoinUtils" - REF "d92accd9a2aa4cffe84e8f9a5a71eea06fb1ba87" - SHA512 addd95047c935fd3199f6951bf6f269887c0a66f285d4d9947b6290de24ab54867f459a340da1010451331272e4168d413ab167c52019fb4dbe486633f8b93d9 + REF "675cbb8e131f07705544a2e9074355cfa1a319b4" #stable 2.11 + SHA512 19e68fd43a90f3c6ba84aef90fc8b108550efee6345a3a467995791955322b531abf6e410ed656b10a353108e73d8558e9cb6e24aa93a273686e226d17381c48 HEAD_REF master ) diff --git a/src/cpp/benders/benders_core/WorkerMaster.cpp b/src/cpp/benders/benders_core/WorkerMaster.cpp index 9eec0b623..1445d134c 100644 --- a/src/cpp/benders/benders_core/WorkerMaster.cpp +++ b/src/cpp/benders/benders_core/WorkerMaster.cpp @@ -24,7 +24,7 @@ WorkerMaster::WorkerMaster( const std::string &solver_name, const int log_level, int subproblems_count, SolverLogManager&solver_log_manager, const bool mps_has_alpha, Logger logger) - : Worker(logger), + : Worker(std::move(logger)), subproblems_count(subproblems_count), _mps_has_alpha(mps_has_alpha) { _is_master = true; @@ -56,7 +56,7 @@ void WorkerMaster::get(Point &x_out, double &overall_subpb_cost_under_approx, if (_solver->get_n_integer_vars() > 0) { _solver->get_mip_sol(ptr.data()); } else { - _solver->get_lp_sol(ptr.data(), NULL, NULL); + _solver->get_lp_sol(ptr.data(), nullptr, nullptr); } assert(id_single_subpb_costs_under_approx_.back() + 1 == ptr.size()); for (auto const &kvp : _id_to_name) { diff --git a/src/cpp/benders/benders_core/include/WorkerMaster.h b/src/cpp/benders/benders_core/include/WorkerMaster.h index fa64ff561..95cac1dc6 100644 --- a/src/cpp/benders/benders_core/include/WorkerMaster.h +++ b/src/cpp/benders/benders_core/include/WorkerMaster.h @@ -14,19 +14,19 @@ class WorkerMaster : public Worker { explicit WorkerMaster(Logger logger); WorkerMaster(VariableMap const &variable_map, const std::filesystem::path &path_to_mps, - const std::string &solver_name, const int log_level, + const std::string &solver_name, int log_level, int subproblems_count, SolverLogManager&solver_log_manager, bool mps_has_alpha, Logger logger); - virtual ~WorkerMaster() = default; + ~WorkerMaster() override = default; void get(Point &x0, double &overall_subpb_cost_under_approx, DblVector &single_subpb_costs_under_approx); void get_dual_values(std::vector &dual) const; - int get_number_constraint() const; + [[nodiscard]] int get_number_constraint() const; void add_cut(Point const &s, Point const &x0, double const &rhs) const; - void add_cut_by_iter(int const i, Point const &s, double const &sx0, + void add_cut_by_iter(int i, Point const &s, double const &sx0, double const &rhs) const; void add_dynamic_cut(Point const &s, double const &sx0, double const &rhs) const; @@ -36,7 +36,7 @@ class WorkerMaster : public Worker { virtual void DeactivateIntegrityConstraints() const; virtual void ActivateIntegrityConstraints() const; - virtual std::vector get_id_nb_units() const { return _id_nb_units; }; + [[nodiscard]] virtual std::vector get_id_nb_units() const { return _id_nb_units; }; private: std::vector _id_nb_units; @@ -54,7 +54,7 @@ class WorkerMaster : public Worker { void define_rhs_from_sx0(const double &sx0, const double &rhs, std::vector &rowrhs) const; - void define_matval_mclind_for_index(const int i, const Point &s, + void define_matval_mclind_for_index(int i, const Point &s, std::vector &matval, std::vector &mclind) const; void _set_upper_bounds() const; diff --git a/src/cpp/helpers/ArchiveReader.cpp b/src/cpp/helpers/ArchiveReader.cpp index eb8491d6d..8631ba51b 100644 --- a/src/cpp/helpers/ArchiveReader.cpp +++ b/src/cpp/helpers/ArchiveReader.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include diff --git a/src/cpp/helpers/ArchiveWriter.cpp b/src/cpp/helpers/ArchiveWriter.cpp index 23c78b5a9..ad1a78063 100644 --- a/src/cpp/helpers/ArchiveWriter.cpp +++ b/src/cpp/helpers/ArchiveWriter.cpp @@ -3,6 +3,7 @@ #include #include +#include #include #include "LogUtils.h" @@ -26,12 +27,13 @@ void ArchiveWriter::InitFileInfo() { } int32_t ArchiveWriter::Open() { // disk-spanning is disabled, meaning that only one file is created + std::unique_lock lock(mutex_); const auto err = mz_zip_writer_open_file( pmz_zip_writer_instance_, ArchivePath().string().c_str(), 0 /* disk-spanning disabled */, 1 /* append */); if (err != MZ_OK) { - Close(); - Delete(); + CloseGuarded(); + DeleteGuarded(); std::stringstream errMsg; errMsg << "Open Archive: " << ArchivePath().string() << std::endl; throw ArchiveIOGeneralException(err, errMsg.str(), LOGLOCATION); @@ -125,6 +127,16 @@ int32_t ArchiveWriter::CloseInternal() { return MZ_OK; } +int32_t ArchiveWriter::CloseGuarded() { + if (pmz_zip_writer_instance_) { + return mz_zip_writer_close(pmz_zip_writer_instance_); + } + return MZ_OK; +} +void ArchiveWriter::DeleteGuarded() { + return mz_zip_writer_delete(&pmz_zip_writer_instance_); +} + void ArchiveWriter::DeleteInternal() { std::unique_lock lock(mutex_); return mz_zip_writer_delete(&pmz_zip_writer_instance_); diff --git a/src/cpp/helpers/ArchiveWriter.h b/src/cpp/helpers/ArchiveWriter.h index d44da2d4f..4f6337531 100644 --- a/src/cpp/helpers/ArchiveWriter.h +++ b/src/cpp/helpers/ArchiveWriter.h @@ -22,6 +22,8 @@ class ArchiveWriter : public ArchiveIO { int32_t Close() override; void Delete() override; + int32_t CloseGuarded(); + void DeleteGuarded(); int Open() override; void InitFileInfo(); diff --git a/src/cpp/lpnamer/main/ProblemGeneration.cpp b/src/cpp/lpnamer/main/ProblemGeneration.cpp index 58519728c..8c29947e0 100644 --- a/src/cpp/lpnamer/main/ProblemGeneration.cpp +++ b/src/cpp/lpnamer/main/ProblemGeneration.cpp @@ -61,6 +61,10 @@ std::filesystem::path ProblemGeneration::performAntaresSimulation() { //Add parallel //Handle errors + if (results.error) { + std::cerr << "Error: " << results.error->reason << std::endl; + exit(1); + } lps_ = std::move(results.antares_problems); return {results.simulationPath}; @@ -253,7 +257,7 @@ void ProblemGeneration::RunProblemGeneration( /* Main stuff */ std::vector> xpansion_problems = getXpansionProblems(solver_log_manager, solver_name, mpsList, lpDir_, - reader, !antares_archive_path.empty()); + reader, !antares_archive_path.empty(), lps_); std::vector, ProblemData>> problems_and_data; diff --git a/src/cpp/lpnamer/model/ActiveLinks.cpp b/src/cpp/lpnamer/model/ActiveLinks.cpp index c5eed1024..ff9a12e42 100644 --- a/src/cpp/lpnamer/model/ActiveLinks.cpp +++ b/src/cpp/lpnamer/model/ActiveLinks.cpp @@ -244,8 +244,10 @@ double ActiveLink::get_already_installed_capacity() const { } std::string ActiveLink::get_linkor() const { return _linkor; } +const std::string& ActiveLink::linkor() const { return _linkor; } std::string ActiveLink::get_linkex() const { return _linkex; } +const std::string& ActiveLink::linkex() const { return _linkex; } unsigned long ActiveLink::number_of_chronicles() const { // We don't check for correctness of the number of chronicles across profiles diff --git a/src/cpp/lpnamer/model/ActiveLinks.h b/src/cpp/lpnamer/model/ActiveLinks.h index 35781b983..f45045f33 100644 --- a/src/cpp/lpnamer/model/ActiveLinks.h +++ b/src/cpp/lpnamer/model/ActiveLinks.h @@ -41,7 +41,9 @@ class ActiveLink { [[nodiscard]] unsigned get_idLink() const; [[nodiscard]] LinkName get_LinkName() const; [[nodiscard]] std::string get_linkor() const; + [[nodiscard]] const std::string& linkor() const; [[nodiscard]] std::string get_linkex() const; + [[nodiscard]] const std::string& linkex() const; [[nodiscard]] double get_already_installed_capacity() const; [[nodiscard]] std::map McYearToChronicle() const { diff --git a/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.cpp b/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.cpp index 3d32d61dc..cf50277e7 100644 --- a/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.cpp +++ b/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.cpp @@ -45,10 +45,12 @@ AntaresProblemToXpansionProblemTranslator::translateToXpansionProblem( problem->add_cols(constant.VariablesCount, 0, hebdo.LinearCost.data(), tmp.data(), {}, {}, hebdo.Xmin.data(), hebdo.Xmax.data()); + std::span signs(hebdo.Direction.data(), hebdo.Direction.size()); + auto LEG_vector = convertSignToLEG(signs); problem->add_rows( constant.ConstraintesCount, constant.CoeffCount, - convertSignToLEG(hebdo.Direction.data()).data(), hebdo.RHS.data(), - {}, reinterpret_cast(constant.Mdeb.data()), reinterpret_cast(constant.ColumnIndexes.data()), + convertSignToLEG(signs).data(), hebdo.RHS.data(), + nullptr, reinterpret_cast(constant.Mdeb.data()), reinterpret_cast(constant.ColumnIndexes.data()), constant.ConstraintsMatrixCoeff.data(), {}); for (int i = 0; i < constant.VariablesCount; ++i) { problem->chg_col_name(i, hebdo.variables[i]); @@ -64,26 +66,21 @@ AntaresProblemToXpansionProblemTranslator::translateToXpansionProblem( // définissant une autre implémentation de IProblemVariablesProviderPort return problem; } + std::vector AntaresProblemToXpansionProblemTranslator::convertSignToLEG( - char* data) { + std::span data) { std::vector LEG_vector; - char c = *data; - while (c != '\0') { + //Exclude final '\0' character + std::ranges::transform(data, std::back_inserter(LEG_vector), [](char c) { if ('=' == c) { - LEG_vector.push_back('E'); - c = *++data; - continue; + return 'E'; } else if ('<' == c) { - LEG_vector.push_back('L'); - c = *++data; - continue; + return 'L'; } else if ('>' == c) { - LEG_vector.push_back('G'); - c = *++data; - continue; + return 'G'; } else { throw std::runtime_error(LOGLOCATION + "Bad character parsing " + c); } - } + }); return LEG_vector; } diff --git a/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h b/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h index c05f5ea55..7011739f9 100644 --- a/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h +++ b/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h @@ -6,6 +6,8 @@ #include +#include + #include "../model/Problem.h" class AntaresProblemToXpansionProblemTranslator { @@ -13,5 +15,5 @@ class AntaresProblemToXpansionProblemTranslator { [[nodiscard]] static std::shared_ptr translateToXpansionProblem( const Antares::Solver::LpsFromAntares& lps, unsigned int year, unsigned int week, const std::string& solver_name, SolverLogManager& solver_log_manager); - static std::vector convertSignToLEG(char* data); + static std::vector convertSignToLEG(std::span data); }; diff --git a/src/cpp/lpnamer/problem_modifier/CMakeLists.txt b/src/cpp/lpnamer/problem_modifier/CMakeLists.txt index 2f4b339ef..559ac001e 100644 --- a/src/cpp/lpnamer/problem_modifier/CMakeLists.txt +++ b/src/cpp/lpnamer/problem_modifier/CMakeLists.txt @@ -47,7 +47,7 @@ add_library(lp_namer_problem_modifier STATIC ${CMAKE_CURRENT_SOURCE_DIR}/FileProblemsProviderAdapter.h ${CMAKE_CURRENT_SOURCE_DIR}/FileProblemProviderAdapter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/FileProblemProviderAdapter.h - ) +) target_include_directories (lp_namer_problem_modifier PUBLIC @@ -61,6 +61,7 @@ target_link_libraries (lp_namer_problem_modifier lp_namer_helper helpers solvers + Antares::antares-solver-simulation ) add_library (${PROJECT_NAME}::lp_namer_problem_modifier ALIAS lp_namer_problem_modifier) diff --git a/src/cpp/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.cpp b/src/cpp/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.cpp index d0685e1c5..cbf7fe4c9 100644 --- a/src/cpp/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.cpp +++ b/src/cpp/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.cpp @@ -41,15 +41,15 @@ int ReadTimeStep(const std::string& input) { } void updateMapColumn(const std::vector& links, - const std::string& link_origin, - const std::string& link_destination, colId id, + const std::string_view link_origin, + const std::string_view link_destination, colId id, int time_step, std::map& mapColumn) { auto it = std::find_if(links.begin(), links.end(), [&link_origin, &link_destination](const ActiveLink& link) { - return link.get_linkor() == link_origin && - link.get_linkex() == link_destination; + return link.linkor() == link_origin && + link.linkex() == link_destination; }); if (it != links.end()) { diff --git a/src/cpp/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.cpp b/src/cpp/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.cpp index 91a79884b..36808eeb3 100644 --- a/src/cpp/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.cpp +++ b/src/cpp/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.cpp @@ -16,15 +16,16 @@ XpansionProblemsFromAntaresProvider::XpansionProblemsFromAntaresProvider( std::vector> XpansionProblemsFromAntaresProvider::provideProblems( const std::string& solver_name, - SolverLogManager& solver_log_manager) const { + SolverLogManager& solver_log_manager) const +{ std::vector> xpansion_problems; xpansion_problems.reserve( - XpansionProblemsFromAntaresProvider::antares_hebdo_problems.weekCount()); + antares_hebdo_problems.weekCount()); for (const auto& [problem_id, hebdo_data] : - XpansionProblemsFromAntaresProvider::antares_hebdo_problems.weeklyProblems) { + antares_hebdo_problems.weeklyProblems) { xpansion_problems.push_back( AntaresProblemToXpansionProblemTranslator::translateToXpansionProblem( - XpansionProblemsFromAntaresProvider::antares_hebdo_problems, + antares_hebdo_problems, problem_id.year, problem_id.week, solver_name, solver_log_manager)); } return xpansion_problems; diff --git a/src/cpp/multisolver_interface/environment.cc b/src/cpp/multisolver_interface/environment.cc index b8e65003f..86c157e4c 100644 --- a/src/cpp/multisolver_interface/environment.cc +++ b/src/cpp/multisolver_interface/environment.cc @@ -21,6 +21,9 @@ #include #include +namespace Solver { +class DynamicLibrary; +} namespace LoadXpress { #define STRINGIFY2(X) #X @@ -141,7 +144,7 @@ std::function XPRSgetintattrib = XpressLoader::XpressLoader(std::shared_ptr logger) : logger_(std::move(logger)) {} -bool XpressLoader::LoadXpressFunctions(DynamicLibrary* xpress_dynamic_library) { +bool XpressLoader::LoadXpressFunctions(Solver::DynamicLibrary* xpress_dynamic_library) { // This was generated with the parse_header_xpress.py script. // See the comment at the top of the script. @@ -299,7 +302,7 @@ bool XpressLoader::LoadXpressDynamicLibrary(std::string& xpresspath) { static std::string xpress_lib_path; static std::once_flag xpress_loading_done; static bool ret; - static DynamicLibrary xpress_library; + static Solver::DynamicLibrary xpress_library; // static std::mutex mutex; // mutex.lock(); diff --git a/src/cpp/multisolver_interface/include/multisolver_interface/dynamic_library.h b/src/cpp/multisolver_interface/include/multisolver_interface/dynamic_library.h index fd5909995..a333a86c5 100644 --- a/src/cpp/multisolver_interface/include/multisolver_interface/dynamic_library.h +++ b/src/cpp/multisolver_interface/include/multisolver_interface/dynamic_library.h @@ -26,6 +26,7 @@ #include #endif +namespace Solver { class DynamicLibrary { static constexpr size_t kMaxFunctionsNotFound = 10; @@ -111,5 +112,6 @@ class DynamicLibrary { } }; }; +} #endif // OR_TOOLS_BASE_DYNAMIC_LIBRARY_H_ diff --git a/src/cpp/multisolver_interface/include/multisolver_interface/environment.h b/src/cpp/multisolver_interface/include/multisolver_interface/environment.h index 022e8cfc5..fc9041d01 100644 --- a/src/cpp/multisolver_interface/include/multisolver_interface/environment.h +++ b/src/cpp/multisolver_interface/include/multisolver_interface/environment.h @@ -59,7 +59,7 @@ class XpressLoader { std::vector XpressDynamicLibraryPotentialPaths(); std::string GetXpressVarFromEnvironmentVariables(const char* XPRESS_var, bool verbose = true); - bool LoadXpressFunctions(DynamicLibrary* xpress_dynamic_library); + bool LoadXpressFunctions(Solver::DynamicLibrary* xpress_dynamic_library); int loadLicence(const std::string& lib_path, bool verbose); }; diff --git a/tests/cpp/lp_namer/AntaresProblemToXpansionProblemTranslatorTest.cpp b/tests/cpp/lp_namer/AntaresProblemToXpansionProblemTranslatorTest.cpp new file mode 100644 index 000000000..3be3ad649 --- /dev/null +++ b/tests/cpp/lp_namer/AntaresProblemToXpansionProblemTranslatorTest.cpp @@ -0,0 +1,22 @@ +#include "gtest/gtest.h" + +#include "AntaresProblemToXpansionProblemTranslator.h" + +TEST(AntaresProblemToXpansionProblemTranslatorTest, convertSignToLEGSpan) { + std::vector signs = {'<', '=', '>'}; + std::vector expected = {'L', 'E', 'G'}; + std::vector result = AntaresProblemToXpansionProblemTranslator::convertSignToLEG(std::span(signs.data(), signs.size())); + ASSERT_EQ(result, expected); +} + +//Fail test +TEST(AntaresProblemToXpansionProblemTranslatorTest, convertSignToLEGSpanFailWithInvalidChar) { + std::vector signs = {'<', '=', 'a'}; + ASSERT_THROW(AntaresProblemToXpansionProblemTranslator::convertSignToLEG(std::span(signs.data(), signs.size())), std::runtime_error); +} + +//'\0' in vector is error +TEST(AntaresProblemToXpansionProblemTranslatorTest, NullCharIsInvalid) { + std::vector signs = {'<', '=', '\0'}; + ASSERT_THROW(AntaresProblemToXpansionProblemTranslator::convertSignToLEG(std::span(signs.data(), signs.size())), std::runtime_error); +} \ No newline at end of file diff --git a/tests/cpp/lp_namer/CMakeLists.txt b/tests/cpp/lp_namer/CMakeLists.txt index 989289c3d..2a450cf08 100644 --- a/tests/cpp/lp_namer/CMakeLists.txt +++ b/tests/cpp/lp_namer/CMakeLists.txt @@ -36,6 +36,7 @@ add_executable (lp_namer_tests WeightsFileReaderTest.cpp LpFilesExtractorTest.cpp MpsTxtWriterTest.cpp + AntaresProblemToXpansionProblemTranslatorTest.cpp ) target_link_libraries (lp_namer_tests PRIVATE