1

I am using IPOPT solver for solving KKTs conditions (a bunch of equality constraints and complementarity conditions). For assigning the solver for the complementarity problem, I use the command line below:

solver = po.SolverFactory('mpec_nlp')

And then according to IPOPT documentation I am changing the number of maximum iteration

solver.options['max_iter']=1000

But solver doesn't listen to me and still stops at its default maximum of 3000 iterations

enter image description here

Do you have any suggestions on how to make it work?

  • 1
    I guess that max_iter will be send to the MPEC_NLP metasolver, which may just disregard the option. I don't know if there is a way to pass options to the solver that is called by MPEC_NLP. – stefan Jan 18 '22 at 04:54

1 Answers1

0

Consider creating ipopt.opt file using notepad. Write max_iter 500 into the file. Place the file into your working directory (where your code is running)

furious_bilbo
  • 176
  • 11