From be174510f43178107ce2a8845dc0e7b43e3a8f3c Mon Sep 17 00:00:00 2001 From: LIU ZHANWEI <50036800+Zhanwei-Liu@users.noreply.github.com> Date: Sun, 30 Jun 2024 11:35:13 +0800 Subject: [PATCH] Update patch of PyOptInterface for Highs --- config.json | 3 ++- prep-shot.yml | 3 ++- run.py | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config.json b/config.json index b0737a9..3b2856a 100644 --- a/config.json +++ b/config.json @@ -15,7 +15,8 @@ "fixed_head": true }, "solver_parameters": { - "solver": "gurobi" + "solver": "highs", + "solver_path": "" }, "data_parameters":{ "historical_capacity": { diff --git a/prep-shot.yml b/prep-shot.yml index 5aeba91..dba39c8 100644 --- a/prep-shot.yml +++ b/prep-shot.yml @@ -13,4 +13,5 @@ dependencies: - xarray==0.20.2 - pyomo==6.5.0 - gurobipy==11.0.2 - - PyOptInterface==0.2.4 \ No newline at end of file + - PyOptInterface==0.2.5 + - highsbox \ No newline at end of file diff --git a/run.py b/run.py index e25834c..447ddc7 100755 --- a/run.py +++ b/run.py @@ -117,7 +117,6 @@ def run_model(parameters, output_filename, args): model = create_model(parameters) output_filename = update_output_filename(output_filename, args) solved = solve_model(model, parameters) - exit() if solved: ds = extract_result(model, isinflow=parameters['isinflow']) ds.to_netcdf(f'{output_filename}.nc')