Reputation: 21
I am trying to install ipopt with anaconda on Windows10 x64.
I already installed ipopt via "conda install -c conda-forge ipopt
" in the anaconda prompt (version=3.13.4).
I built a small test-script in python to check my installation:
import pyomo.environ as pe
import pyomo.opt as po
M = pe.ConcreteModel()
M.x = pe.Var()
M.y = pe.Var(bounds=(0, None))
M.obj = pe.Objective(expr=M.x+M.y, sense=pe.minimize)
M.c1 = pe.Constraint(expr=(M.x >=4)) // this constraint expr will be replaced by M.x**2 >= 4 to test nonlinear problems
M.c2 = pe.Constraint(expr=(M.y >= M.x))
solver = po.SolverFactory('ipopt')
results = solver.solve(M, tee=True)
print(pe.value(M.x), pe.value(M.y))
Running the script, I received the following error message:
ApplicationError: No executable found for solver 'ipopt'
I could solve this problem downloading the zip-folder for 64-bit windows from https://ampl.com/products/solvers/open-source/ and extracting the files into the "Library"-folder of the anaconda environment I am working on.
Running the test script for the linear problem again, the problem is solved but I get the following information:
This is Ipopt version 3.12.13, running with linear solver mumps.
NOTE: Other linear solvers might be more efficient (see Ipopt documentation).
The nonlinear test problem, however, cannot be solved as still the linear mumps solver is applied.
EXIT: Maximum Number of Iterations Exceeded.
WARNING: Loading a SolverResults object with a warning status into
model.name="unknown";
- termination condition: maxIterations
- message from solver: Ipopt 3.12.13\x3a Maximum Number of Iterations
Exceeded.
M.x=-281240.49215541 M.y=13.01195537079578
How can I make sure that nonlinear problems are solved by ipopt as well? I am aware that there are a few similar questions on stackoverflow, but I wasn't able to solve my problem yet.
(I also tried to follow the installation guide from https://coin-or.github.io/Ipopt/INSTALL.html, but encountered the message "configure: error: no acceptable C compiler found in $PATH
""" in the MSYS2 console when I tried to install ASL or HSL, even though I installed gcc as described and included the folder which contains gcc.exe into my PATH-variable.)
Upvotes: 1
Views: 2637
Reputation: 929
Probably the conda-forge package doesn't include the AMPL interface and the ipopt executable that is required by Pyomo (at least, that is the case for https://anaconda.org/conda-forge/ipopt/3.13.4/download/win-64/ipopt-3.13.4-hf6be2e5_0.tar.bz2).
MUMPS should not be the reason if Ipopt failed to solve min x+y s.t. x>=4, y>=x. One would need to inspect the Ipopt log to see what is going wrong.
If you feel that the executable from ampl.com is too old, you can try the ones that are attached to the Ipopt releases, e.g., https://github.com/coin-or/Ipopt/releases/download/releases%2F3.14.1/Ipopt-3.14.1-win64-msvs2019-md.zip for the latest. They also include Pardiso from MKL in addition to MUMPS.
To check why the compiler check in configure failed under msys2, have a look into file config.log that is generated by configure.
Upvotes: 3