Skip to content

Commit

Permalink
fix xpress presolve
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Dec 11, 2024
1 parent 151917e commit a2110ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion antarest/launcher/adapters/local_launcher/local_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ def parse_launcher_options(self, launcher_parameters: LauncherParametersDTO) ->
if solver:
simulator_args += solver
if "presolve" in launcher_parameters.other_options:
simulator_args.append('--solver-parameters="PRESOLVE 1"')
simulator_args.append("--solver-parameters")
simulator_args.append("PRESOLVE 1")
return simulator_args, environment_variables

def create_update_log(self, job_id: str) -> Callable[[str], None]:
Expand Down
3 changes: 2 additions & 1 deletion tests/launcher/test_local_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ def test_parse_launcher_arguments(launcher_config: Config):
"--force-parallel=8",
"--use-ortools",
"--ortools-solver=xpress",
'--solver-parameters="PRESOLVE 1"',
"--solver-parameters",
"PRESOLVE 1",
]

os.environ["XPRESS_DIR"] = "fake_path_for_test"
Expand Down

0 comments on commit a2110ac

Please sign in to comment.