From ed6c830fdda6bf7c87d3082e479417365229aacf Mon Sep 17 00:00:00 2001 From: Robbie Muir Date: Sat, 24 Jan 2026 19:38:34 +0100 Subject: [PATCH 1/3] fix example notebooks --- doc/release_notes.rst | 1 + examples/create-a-model-with-coordinates.ipynb | 2 +- examples/create-a-model.ipynb | 6 +++--- examples/manipulating-models.ipynb | 14 +++++++------- examples/solve-on-oetc.ipynb | 2 +- examples/transport-tutorial.ipynb | 4 ++-- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index deed60d4..b727c22d 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -4,6 +4,7 @@ Release Notes Upcoming Version ---------------- +* Fix docs (pick highs solver) * Add the `sphinx-copybutton` to the documentation Version 0.6.1 diff --git a/examples/create-a-model-with-coordinates.ipynb b/examples/create-a-model-with-coordinates.ipynb index e05d3c30..f2b12eed 100644 --- a/examples/create-a-model-with-coordinates.ipynb +++ b/examples/create-a-model-with-coordinates.ipynb @@ -150,7 +150,7 @@ "metadata": {}, "outputs": [], "source": [ - "m.solve()" + "m.solve(solver_name=\"highs\")" ] }, { diff --git a/examples/create-a-model.ipynb b/examples/create-a-model.ipynb index cb582b13..304ef8b2 100644 --- a/examples/create-a-model.ipynb +++ b/examples/create-a-model.ipynb @@ -215,7 +215,7 @@ "metadata": {}, "outputs": [], "source": [ - "m.solve()" + "m.solve(solver_name=\"highs\")" ] }, { @@ -263,7 +263,7 @@ "lastKernelId": null }, "kernelspec": { - "display_name": "Python 3", + "display_name": ".venv", "language": "python", "name": "python3" }, @@ -277,7 +277,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.3" + "version": "3.12.10" } }, "nbformat": 4, diff --git a/examples/manipulating-models.ipynb b/examples/manipulating-models.ipynb index 9883b4de..1a35cd19 100644 --- a/examples/manipulating-models.ipynb +++ b/examples/manipulating-models.ipynb @@ -48,9 +48,9 @@ "con2 = m.add_constraints(5 * x + 2 * y >= 3 * factor, name=\"con2\")\n", "\n", "m.add_objective(x + 2 * y)\n", - "m.solve()\n", + "m.solve(solver_name=\"highs\")\n", "\n", - "m.solve()\n", + "m.solve(solver_name=\"highs\")\n", "sol = m.solution.to_dataframe()\n", "sol.plot(grid=True, ylabel=\"Optimal Value\")" ] @@ -95,7 +95,7 @@ "metadata": {}, "outputs": [], "source": [ - "m.solve()\n", + "m.solve(solver_name=\"highs\")\n", "sol = m.solution.to_dataframe()\n", "sol.plot(grid=True, ylabel=\"Optimal Value\")" ] @@ -137,7 +137,7 @@ "metadata": {}, "outputs": [], "source": [ - "m.solve()\n", + "m.solve(solver_name=\"highs\")\n", "sol = m.solution.to_dataframe()\n", "sol.plot(grid=True, ylabel=\"Optimal Value\")" ] @@ -190,7 +190,7 @@ "metadata": {}, "outputs": [], "source": [ - "m.solve()\n", + "m.solve(solver_name=\"highs\")\n", "sol = m.solution.to_dataframe()\n", "sol.plot(grid=True, ylabel=\"Optimal Value\")" ] @@ -242,7 +242,7 @@ "metadata": {}, "outputs": [], "source": [ - "m.solve()\n", + "m.solve(solver_name=\"highs\")\n", "sol = m.solution.to_dataframe()\n", "sol.plot(grid=True, ylabel=\"Optimal Value\")" ] @@ -276,7 +276,7 @@ "metadata": {}, "outputs": [], "source": [ - "m.solve()\n", + "m.solve(solver_name=\"highs\")\n", "sol = m.solution.to_dataframe()\n", "sol.plot(grid=True, ylabel=\"Optimal Value\")" ] diff --git a/examples/solve-on-oetc.ipynb b/examples/solve-on-oetc.ipynb index c940fd11..7459bdb9 100644 --- a/examples/solve-on-oetc.ipynb +++ b/examples/solve-on-oetc.ipynb @@ -169,7 +169,7 @@ "start_time = time.time()\n", "\n", "try:\n", - " status, termination_condition = m.solve(remote=oetc_handler)\n", + " status, termination_condition = m.solve(remote=oetc_handler, solver_name=\"highs\")\n", "\n", " end_time = time.time()\n", " total_time = end_time - start_time\n", diff --git a/examples/transport-tutorial.ipynb b/examples/transport-tutorial.ipynb index df104a41..b42e67e8 100644 --- a/examples/transport-tutorial.ipynb +++ b/examples/transport-tutorial.ipynb @@ -407,7 +407,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In the `solve()` function, you can specify a `solver_name`. The default solver, however, will be the first from the list we printed above." + "In the `solve()` function, you can specify a `solver_name`. The default solver, however, will be the first from the list we printed above. In this example, we will specify a solver explicitly to avoid licensing issues." ] }, { @@ -417,7 +417,7 @@ "outputs": [], "source": [ "# Solve the model\n", - "m.solve()" + "m.solve(solver_name=\"highs\")" ] }, { From df89025c2361dbc1c9ed4cefaeecdebc28c9a9a0 Mon Sep 17 00:00:00 2001 From: Robbie Muir Date: Sat, 24 Jan 2026 19:49:54 +0100 Subject: [PATCH 2/3] minor changes --- examples/create-a-model.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/create-a-model.ipynb b/examples/create-a-model.ipynb index 304ef8b2..44d189b6 100644 --- a/examples/create-a-model.ipynb +++ b/examples/create-a-model.ipynb @@ -277,7 +277,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.10" + "version": "3.11.3" } }, "nbformat": 4, From a26b4395a8b7efc62b1bd1fbf0116e59141a1169 Mon Sep 17 00:00:00 2001 From: Robbie Muir Date: Sat, 24 Jan 2026 19:52:00 +0100 Subject: [PATCH 3/3] minor changes --- examples/create-a-model.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/create-a-model.ipynb b/examples/create-a-model.ipynb index 44d189b6..a158e0cf 100644 --- a/examples/create-a-model.ipynb +++ b/examples/create-a-model.ipynb @@ -263,7 +263,7 @@ "lastKernelId": null }, "kernelspec": { - "display_name": ".venv", + "display_name": "Python 3", "language": "python", "name": "python3" },