scipopt / JSCIPOpt

Java interface for the SCIP Optimization Suite
MIT License
62 stars 35 forks source link

Accessing model or solution status #37

Closed patrickguenther closed 1 year ago

patrickguenther commented 1 year ago

Is there a way to programmatically get the status of the model after Scip::solve has been called? For example, if an optimal solution has been found or if the model is unbounded or infeasible?

kkofler commented 1 year ago

As far as I can tell, no, that is still missing in the Java binding. We need to add SCIPgetStatus (https://scipopt.org/doc/html/group__GeneralSCIPMethods.php#gadfa940b47f19c0863d400b554378ef45) and the SCIP_STATUS type to scipjni.i.

patrickguenther commented 1 year ago

Interesting, is this something I can try on my own? how does this work? So this scipjni.i is the entry file for SWIG? I think there might have been some other functionality of the SCIP API that I was missing as well.

patrickguenther commented 1 year ago

I've found the corresponding README.md section https://github.com/scipopt/JSCIPOpt#how-to-extend-the-interface and I give it a try.