I have downloaded the ipopt solver and set in its path into the environmental variables. If I type in ipopt in the terminal it shows:
No stub!
usage: ipopt [options] stub [-AMPL] [<assignment> ...]
Options:
-- {end of options}
-= {show name= possibilities}
-? {show usage}
-bf {read boundsfile f}
-e {suppress echoing of assignments}
-of {write .sol file to file f}
-s {write .sol file (without -AMPL)}
-v {just show version}
It is version: Ipopt-3.14.2-win64-msvs2019-md downloaded from here.
My model in pyomo looks like that:
from pyomo.environ import minimize, ConcreteModel, Var, Objective, SolverFactory
model = ConcreteModel()
model.x = Var()
model.y = Var()
def rosenbrock(m):
return (1.0-m.x)**2 + 100.0*(m.y - m.x**2)**2
model.obj = Objective(rule=rosenbrock, sense=minimize)
SolverFactory('mindtpy').solve(model, mip_solver='cplex', nlp_solver='ipopt')
The error is:
pyomo.common.errors.ApplicationError: No executable found for solver 'ipopt'
Other solutions that have been suggested on StackOverflow could not solve my problem. I hope someone can help me.