funkelab / ilpy

Unified python wrappers for popular ILP solvers
https://funkelab.github.io/ilpy/
MIT License
3 stars 2 forks source link

support non-convex quadratic objectives/constraints in gurobi #28

Closed tlambert03 closed 1 year ago

tlambert03 commented 1 year ago

closes #27

see https://www.gurobi.com/documentation/10.0/refman/nonconvex.html for relevant gurobi docs

@funkey ... while ~this "fixes" a crash out to the terminal with non-convex quadratic objectives~, i'm not sure if we should be applying it all the time like this. let me know if you want to guard this behind some opt-in parameter setting method

edit: the crash is now fixed anyway with 037283ec7b0997ee2a452e174e15fd35f165e55d ... so this just adds potential support for non-convex solving now

funkey commented 1 year ago

I think this is fine. Can't imagine a case where someone deliberately builds a non-convex objective and doesn't want it to be solved. My guess is that Gurobi's default is for backwards compatibility, where some code might rely on Gurobi complaining if the objective is non-convex.