mechmotum / cyipopt

Cython interface for the interior point optimzer IPOPT
Eclipse Public License 2.0
235 stars 54 forks source link

save the model #198

Closed rlacjfjin closed 1 year ago

rlacjfjin commented 1 year ago

Hi,

Is it possible to save the model in cyipopt? Such as pyomo using lp or mps format(maybe other format in nlp). Or can cyipopt read problem from a file?

And another question: I find it can calculate hessian matrix numerically, and why it can't calculate jacobian matrix? If I only refer the obejctive function and constraints with bounds, is it can solve the problem?

Thanks. Zhe

moorepants commented 1 year ago

Hi,

I think your questions are best for pyomo, we don't know anything about pyomo here.

Your numerical calculation questions are probably best for ipopt. ipopt can calculate derivatives numerically, you'll have to see how to do that in the ipopt documentation. cyipopt is a wrapper to ipopt's c interface and we do our best to support what is available there.

rlacjfjin commented 1 year ago

Thanks, I set: nlp.add_option("gradient_approximation","finite-difference-values") nlp.add_option("jacobian_approximation","finite-difference-values") it can work well. And this helped me a lot, thanks for your reply.

Zhe