1

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.

MaxImal
  • 13
  • 7
  • did you restart all processes/terminals after setting up `ipopt`? Also, I'm not familiar with using `mindtpy`... what do you get when you just ask the solver factory directly for `ipopt`? `SolverFactory('ipopt')`? – AirSquid Aug 17 '21 at 17:24
  • 1
    Thanks for your support! I just had to restart vs code. Now it is working. I also got the SCIP solver working in pyomo. The SCIPAMPL has to be downloaded here: https://www.scipopt.org/download.php?fname=scipampl-5.0.1.win.x86_64.intel.opt.spx.exe.zip Then the exe has to be added to the environmental variables. – MaxImal Aug 18 '21 at 06:57

0 Answers0