From a8ad3adde59766d3a41dc42a0c8d8ba103ea7d2c Mon Sep 17 00:00:00 2001 From: Nicolai Date: Thu, 26 Mar 2026 13:36:41 +0100 Subject: [PATCH] Gurobi Edit --- webapp/backend/main.py | 4 ++-- webapp/frontend/src/App.jsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/backend/main.py b/webapp/backend/main.py index 4b039a7..f05ba32 100644 --- a/webapp/backend/main.py +++ b/webapp/backend/main.py @@ -866,8 +866,8 @@ async def run( max_runtime_minutes: float = Form(10.0), ) -> dict[str, str]: solver = solver.lower().strip() - if solver != "highs": - raise HTTPException(status_code=400, detail="Only HiGHS is enabled at the moment") + if solver not in {"highs", "gurobi"}: + raise HTTPException(status_code=400, detail="Unsupported solver") availability = _get_solver_availability() if not availability.get(solver, False): raise HTTPException(status_code=400, detail=f"Solver not available: {solver}") diff --git a/webapp/frontend/src/App.jsx b/webapp/frontend/src/App.jsx index e07e6db..382db6b 100644 --- a/webapp/frontend/src/App.jsx +++ b/webapp/frontend/src/App.jsx @@ -376,7 +376,7 @@ export default function App() { const reported = data?.solvers || {}; const solvers = { highs: reported.highs !== false, - gurobi: false, + gurobi: reported.gurobi === true, }; setAvailableSolvers(solvers); if (solver === "gurobi" && !solvers.gurobi) { @@ -785,7 +785,7 @@ export default function App() { onChange={(event) => setSolver(event.target.value)} > -