coin-or / Ipopt

COIN-OR Interior Point Optimizer IPOPT
https://coin-or.github.io/Ipopt
Other
1.41k stars 281 forks source link

First draft at integrating the leopard linear solver into Ipopt. #709

Open molysgaard opened 1 year ago

molysgaard commented 1 year ago

For the last few years I have been playing with a side project to implement a multifrontal, sparse, indefinite direct matrix factorization algorithm, in the spirit of MA57 and similar.

Now I have something that works pretty well, and have made a first release.

The solver is very well suited for optimization algorithms like Ipopt. It is able to supply the matrix inertia and naturally handles indefinite systems.

See https://github.com/molysgaard/leopard for the full project description.

It would be interesting to see Leopard integrated into Ipopt. Currently, there are not many free solvers integrated into Ipopt, and this creates friction for ad-hoc experimentation and research. My hope is that contributing the leopard solver as a free solver will do a little to democratize research and experimentation within constrained optimization.

This PR currently works with leopard on my machine, but I have yet to understand all the autotools stuff to auto-detect and properly set linker flags during the Ipopt build. I would be very thankful for any insight into how to properly integrate leopard into the Ipopt-autotools build system.

Leopard is distributed as a .deb package and contains a leopard.pc pkc-config file, so I guess one way to do it is to use autotools pkg-config integration if that exists?

I am prepared to work more to complete this integration, but I would like to first check if you would be positive to such an integration?

Regards Morten

CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

svigerske commented 1 year ago

Yes, positive on integrating another linear solver interface, especially when most of the work is already done. I'll give this a try - just cannot tell when - and can take care of the buildsystem integration.

molysgaard commented 1 year ago

@svigerske that's exciting!

I have updated the Leopard API to v0.2.0. This is a breaking change that adds support for changing settings during numerical factorization. Currently, the only setting is the pivot tolerance, but because of how the new API is structured, it is possible to add new settings in the future without breaking API compatibility.

I have tested the changes on my machine, and pushed the required changes to this PR.