mechmotum / cyipopt

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

Replace types deprecated by Ipopt #226

Open chrhansk opened 11 months ago

chrhansk commented 11 months ago

Certain types have been deprecated in https://github.com/coin-or/Ipopt/commit/fc44469c two years back:

Old New
Number ipnumber
Int int
Index ipindex

They are still used in the interface, causing many warnings:

warning: ‘Int’ is deprecated [-Wdeprecated-declarations]

This patch fixes these warnings by using the new types throughout the interface.

chrhansk commented 11 months ago

Edit: This seems to preclude old (< 3.14, pre 2021) versions of Ipopt...

moorepants commented 11 months ago

We currently support building against IPOPT available in Ubuntu 22.04 (even 18.04 is still technically supported). These are IPOPT=3.11. You'll need to make this PR work with both the old and new types until we drop support. Oddly the Debian Ipopt version does not seem to have been updated in many years.