xuy/pyipopt

pyipopt in pyOpt

Closed this issue · 2 comments

e-dub commented

I have gotten this version of pyipopt running and now would like to get it hooked up to pyOpt (www.pyopt.org), as was done with the older version pyOpt-pyipopt (https://github.com/syarra/pyOpt-pyIPOPT).

Currently I have gotten it to run but it needs an excessive amount of system evaluations as the calls for this pyipopt and the older version (https://github.com/syarra/pyipopt) are different.

Has anyone else tried this and had success?

xuy commented

@e-dub Specifically what are those system evaluations? Do you have any examples. I don't think pyipopt itself has added any extra evaluation between versions.

e-dub commented

Thanks for the response. To solve a simple problem with 2 design variables and 2 constraints using finite differencing, 118 system evaluations, though only 13 iterations are needed. Only 42 system evaluations should be necessary!

The way IPOPT is implemented in pyOpt (https://github.com/syarra/pyOpt-pyIPOPT), it is calling the system equation twice, once to get the objective function and then again with the exact same design vector to get the constraint values. The same is true for the gradients, so everything is done double. To further the computational effort, for the gradient calculation, the design point is then calculated again, followed by the finite differencing, resulting in 2 further unnecessary evaluations!

Concretely, for this case this means per iteration IPOPT needs 8 evaluations, when only 3 would be necessary! 4 system evaluations of the exact same for the iteration values of the reference points for the finite differencing and then twice the gradient calculation (again the same design points).

Do you have any experience here? Thanks in advance!