Skip to content

Commit e05518d

Browse files
RobbieKiwiRobbie Muir
andauthored
Bugfix/gurobi license and docs (#556)
* fix example notebooks * minor changes * minor changes --------- Co-authored-by: Robbie Muir <robbie.muir@gmail.com>
1 parent 43239f8 commit e05518d

6 files changed

Lines changed: 13 additions & 12 deletions

doc/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Release Notes
44
Upcoming Version
55
----------------
66

7+
* Fix docs (pick highs solver)
78
* Add the `sphinx-copybutton` to the documentation
89

910
Version 0.6.1

examples/create-a-model-with-coordinates.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
"metadata": {},
151151
"outputs": [],
152152
"source": [
153-
"m.solve()"
153+
"m.solve(solver_name=\"highs\")"
154154
]
155155
},
156156
{

examples/create-a-model.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
"metadata": {},
216216
"outputs": [],
217217
"source": [
218-
"m.solve()"
218+
"m.solve(solver_name=\"highs\")"
219219
]
220220
},
221221
{

examples/manipulating-models.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
"con2 = m.add_constraints(5 * x + 2 * y >= 3 * factor, name=\"con2\")\n",
4949
"\n",
5050
"m.add_objective(x + 2 * y)\n",
51-
"m.solve()\n",
51+
"m.solve(solver_name=\"highs\")\n",
5252
"\n",
53-
"m.solve()\n",
53+
"m.solve(solver_name=\"highs\")\n",
5454
"sol = m.solution.to_dataframe()\n",
5555
"sol.plot(grid=True, ylabel=\"Optimal Value\")"
5656
]
@@ -95,7 +95,7 @@
9595
"metadata": {},
9696
"outputs": [],
9797
"source": [
98-
"m.solve()\n",
98+
"m.solve(solver_name=\"highs\")\n",
9999
"sol = m.solution.to_dataframe()\n",
100100
"sol.plot(grid=True, ylabel=\"Optimal Value\")"
101101
]
@@ -137,7 +137,7 @@
137137
"metadata": {},
138138
"outputs": [],
139139
"source": [
140-
"m.solve()\n",
140+
"m.solve(solver_name=\"highs\")\n",
141141
"sol = m.solution.to_dataframe()\n",
142142
"sol.plot(grid=True, ylabel=\"Optimal Value\")"
143143
]
@@ -190,7 +190,7 @@
190190
"metadata": {},
191191
"outputs": [],
192192
"source": [
193-
"m.solve()\n",
193+
"m.solve(solver_name=\"highs\")\n",
194194
"sol = m.solution.to_dataframe()\n",
195195
"sol.plot(grid=True, ylabel=\"Optimal Value\")"
196196
]
@@ -242,7 +242,7 @@
242242
"metadata": {},
243243
"outputs": [],
244244
"source": [
245-
"m.solve()\n",
245+
"m.solve(solver_name=\"highs\")\n",
246246
"sol = m.solution.to_dataframe()\n",
247247
"sol.plot(grid=True, ylabel=\"Optimal Value\")"
248248
]
@@ -276,7 +276,7 @@
276276
"metadata": {},
277277
"outputs": [],
278278
"source": [
279-
"m.solve()\n",
279+
"m.solve(solver_name=\"highs\")\n",
280280
"sol = m.solution.to_dataframe()\n",
281281
"sol.plot(grid=True, ylabel=\"Optimal Value\")"
282282
]

examples/solve-on-oetc.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
"start_time = time.time()\n",
170170
"\n",
171171
"try:\n",
172-
" status, termination_condition = m.solve(remote=oetc_handler)\n",
172+
" status, termination_condition = m.solve(remote=oetc_handler, solver_name=\"highs\")\n",
173173
"\n",
174174
" end_time = time.time()\n",
175175
" total_time = end_time - start_time\n",

examples/transport-tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@
407407
"cell_type": "markdown",
408408
"metadata": {},
409409
"source": [
410-
"In the `solve()` function, you can specify a `solver_name`. The default solver, however, will be the first from the list we printed above."
410+
"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."
411411
]
412412
},
413413
{
@@ -417,7 +417,7 @@
417417
"outputs": [],
418418
"source": [
419419
"# Solve the model\n",
420-
"m.solve()"
420+
"m.solve(solver_name=\"highs\")"
421421
]
422422
},
423423
{

0 commit comments

Comments
 (0)