From 9006de4b10ceb5d6ecded13d432dec36b94ea727 Mon Sep 17 00:00:00 2001 From: murraybj <129555910+murraybj@users.noreply.github.com> Date: Wed, 2 Oct 2024 15:42:59 -0400 Subject: [PATCH] retry adding ipopt --- .github/workflows/main.yml | 5 ++++- .../Pyomo Fundamentals/2.1 Knapsack problem with rules.ipynb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7497258d..034d6c4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,6 +28,10 @@ jobs: sudo apt update sudo apt-get install -y -qq glpk-utils sudo apt-get install -y -qq coinor-cbc + + - name: install ipopt + run: | + sudo apt update sudo pip install idaes-pse --pre idaes get-extensions --to ./solvers @@ -42,7 +46,6 @@ jobs: pip install -r requirements.txt pip install openpyxl - # (optional) Cache your executed notebooks between runs # if you have config: # execute: diff --git a/Material/Pyomo Fundamentals/2.1 Knapsack problem with rules.ipynb b/Material/Pyomo Fundamentals/2.1 Knapsack problem with rules.ipynb index fd31acfd..cd3bfc37 100644 --- a/Material/Pyomo Fundamentals/2.1 Knapsack problem with rules.ipynb +++ b/Material/Pyomo Fundamentals/2.1 Knapsack problem with rules.ipynb @@ -59,7 +59,7 @@ " return sum( w[i]*m.x[i] for i in A ) <= W_max\n", "model.weight_con = pyo.Constraint(rule=weight_con_rule)\n", "\n", - "opt = pyo.SolverFactory('glpk')\n", + "opt = pyo.SolverFactory('cbc')\n", "opt_success = opt.solve(model)\n", "\n", "model.pprint()"