From 0468736a638707cfc260138dbee766318b70e1e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20Mar=C3=A9chal?= <45510813+JasonMarechal25@users.noreply.github.com> Date: Fri, 15 Nov 2024 09:54:17 +0100 Subject: [PATCH] Update antares solver to 9.2-rc5 (#961) Update antares simulator to 9.2-RC5 Use or-tools with sirius support on windows. --- .github/workflows/build_windows.yml | 3 +-- antares-version.json | 2 +- .../install_from_sources/2-Dependencies-install.md | 1 + src/python/antares_xpansion/problem_generator_driver.py | 2 +- tests/end_to_end/cucumber/features/steps/steps.py | 2 +- tests/end_to_end/lpnamer/test_lpnamerEndToEnd.py | 2 +- tests/end_to_end/utils_functions.py | 1 - 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 6339c17dd..45c695e70 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -31,7 +31,7 @@ jobs: VCPKG_ROOT: ${{ github.workspace }}/vcpkg VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools - ORTOOLS_URL: "https://github.com/rte-france/or-tools-rte/releases/download/v9.11-rte1.1/ortools_cxx_windows-latest_static.zip" + ORTOOLS_URL: "https://github.com/rte-france/or-tools-rte/releases/download/v9.11-rte1.1/ortools_cxx_windows-latest_static_sirius.zip" outputs: zip_name: ${{ steps.zip_name.outputs.zip_name }} @@ -133,7 +133,6 @@ jobs: with: # feature: "features/outer_loop_tests.feature" mpi_path: /c/Program Files/Microsoft MPI/Bin - - name: Cache vcpkg binary dir if: always() diff --git a/antares-version.json b/antares-version.json index 543a1eb99..bab229319 100644 --- a/antares-version.json +++ b/antares-version.json @@ -1,5 +1,5 @@ { - "antares_version": "9.2.0-rc1", + "antares_version": "9.2.0-RC5", "antares_version_executable": "9.2", "antares_xpansion_version": "1.3.2", "minizip_ng_version": "3.0.6", diff --git a/docs/developer-guide/install_from_sources/2-Dependencies-install.md b/docs/developer-guide/install_from_sources/2-Dependencies-install.md index 80b60fef7..a03a69f72 100644 --- a/docs/developer-guide/install_from_sources/2-Dependencies-install.md +++ b/docs/developer-guide/install_from_sources/2-Dependencies-install.md @@ -60,6 +60,7 @@ Alternatively you can install openmpi yourself ## Other dependencies - Antares Simulator: either build it from source, download precompiled binaries or use the automatic build method - Or-tools: either build it from source, download precompiled binaries or use the automatic build method + - If you are downloading pre-compiled binaries of or-tools you need to select a version supporting Sirius solver ### Using pre-build dependency If using built from source or pre-built release of Simulator, Or-tools-rte or other dependency, you can specify the path to the dependency in the CMake configuration. diff --git a/src/python/antares_xpansion/problem_generator_driver.py b/src/python/antares_xpansion/problem_generator_driver.py index 1fca34eb5..64a7c13d2 100644 --- a/src/python/antares_xpansion/problem_generator_driver.py +++ b/src/python/antares_xpansion/problem_generator_driver.py @@ -130,7 +130,7 @@ def create_lp_dir(self): def lp_namer_options(self): is_relaxed = 'relaxed' if self.is_relaxed else 'integer' if self.memory: - ret = ["--study", str(self.study_path), "-f", is_relaxed] # study/output/xpansion_output_dir + ret = ["--study", str(os.path.normpath(self.study_path)), "-f", is_relaxed] # study/output/xpansion_output_dir else: ret = ["-a", str(self.output_path), "-f", is_relaxed] if self.weight_file_name_for_lp: diff --git a/tests/end_to_end/cucumber/features/steps/steps.py b/tests/end_to_end/cucumber/features/steps/steps.py index 85b876945..128e714a6 100644 --- a/tests/end_to_end/cucumber/features/steps/steps.py +++ b/tests/end_to_end/cucumber/features/steps/steps.py @@ -7,9 +7,9 @@ import subprocess import sys from pathlib import Path + import numpy as np from behave import * - from utils_functions import get_mpi_command, get_conf, read_outputs, remove_outputs diff --git a/tests/end_to_end/lpnamer/test_lpnamerEndToEnd.py b/tests/end_to_end/lpnamer/test_lpnamerEndToEnd.py index 90e1e0e92..e3918f1e8 100644 --- a/tests/end_to_end/lpnamer/test_lpnamerEndToEnd.py +++ b/tests/end_to_end/lpnamer/test_lpnamerEndToEnd.py @@ -174,7 +174,7 @@ def launch_and_compare_lp_with_reference_study(install_dir, master_mode, study_d lp_namer_exe = Path(install_dir) / "lp_namer" os.chdir(study_dir) constraint_path = get_constraint_path(study_dir) - launch_command = [str(lp_namer_exe), "--study", str(study_dir), + launch_command = [str(lp_namer_exe), "--study", study_dir, "-e", constraint_path, "-f", master_mode, "--unnamed-problems"] # when returned_l = subprocess.run(launch_command, shell=False) diff --git a/tests/end_to_end/utils_functions.py b/tests/end_to_end/utils_functions.py index 7958f4953..7a87581f2 100644 --- a/tests/end_to_end/utils_functions.py +++ b/tests/end_to_end/utils_functions.py @@ -6,7 +6,6 @@ from pathlib import Path import yaml -from dataclasses import dataclass # File CONFIG_FILE_PATH # yaml file containing executable name