Skip to content

Commit

Permalink
ipopt testing
Browse files Browse the repository at this point in the history
  • Loading branch information
murraybj committed Oct 2, 2024
1 parent 2ee9160 commit a5d6a36
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"model.obj = pyo.Objective(rule=rosenbrock, sense=pyo.minimize)\n",
"\n",
"\n",
"solver = pyo.SolverFactory('ipopt')\n",
"solver = pyo.SolverFactory('ipopt', exectuable='pyomo_jupyter_book/solvers/ipopt')\n",
"\n",
"print('x_init, y_init, x_soln, y_soln')\n",
"y_init = 5.0\n",
Expand Down
2 changes: 1 addition & 1 deletion Material/Nonlinear Exercises/1.2 Evaluation errors.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
" return m.y == pyo.sqrt(m.x - 1.0)\n",
"model.con = pyo.Constraint(rule=con_rule)\n",
"\n",
"solver = pyo.SolverFactory('ipopt')\n",
"solver = pyo.SolverFactory('ipopt', exectuable='solvers/ipopt')\n",
"solver.options['halt_on_ampl_error'] = 'yes'\n",
"solver.solve(model, tee=True)\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
" return (m.x - 1.0) / m.y == 1.0\n",
"model.con = pyo.Constraint(rule=con_rule)\n",
"\n",
"solver = pyo.SolverFactory('ipopt')\n",
"solver = pyo.SolverFactory('ipopt', exectuable='/solvers/ipopt')\n",
"solver.solve(model, tee=True)\n",
"\n",
"print(pyo.value(model.x))\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"model.cd_bal = pyo.Constraint(expr=(0 == -model.sv * model.cd \\\n",
" + k3 * model.ca ** 2.0))\n",
"\n",
"pyo.SolverFactory('ipopt').solve(model)\n",
"pyo.SolverFactory('ipopt', exectuable='/pyomo_jupyter_book/solvers/ipopt').solve(model)\n",
"model.pprint()\n"
]
}
Expand Down

0 comments on commit a5d6a36

Please sign in to comment.