Forum Discussion

FICO's avatar
FICO
Community Manager
2 years ago

How do you get the problem status after optimizing, using the new object oriented from xpress 9.4?

Hi,

Using the old BCL, I had written this ]

prob.mipOptimize();

int status = prob.getMIPStat();

and then used logic to handle different status codes defined here https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/HTML/MIPSTATUS.html.

Struggling to figure out what is the equivalent in the new XpressProblem interface. I see a few methods that maybe make sense, but not sure which is the correct one.

On a side note, I'm struggling to find robust documentation of all of the methods for XpressProblem. https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/java_objects_ug/dhtml/GUID-36B2E410-E89D-3BFD-9EFB-C2BFB14F3F42.html is this all that exists right now?

5 Replies

  • FICO's avatar
    FICO
    Community Manager

    Ah I see a little further down in the example this

    prob.attributes().getSoltatus() == SolStatus.OPTIMAL, so I think this is my answer. (specifically to do exactly what I was doing before, it's prob.attributes().getMipStatus() )

    I am still curious about the documentation for this new interface. The javadoc for the BCL has bailed me out quite a few times. Is there going to be documentation like this for the new interfaces (or does it already exist and I can't find it)? https://www.fico.com/fico-xpress-optimization/docs/latest/bcl/dhtml/javadoc/GUID-735D57B4-9830-3809-9909-A3C24FBD1CA6.html

  • FICO's avatar
    FICO
    Community Manager

    Hi William,

    The Java interface documentation can be found here: https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/HTML/javadoc/GUID-E554886E-051D-3E41-A57F-88F4E5620FAD.html. Unfortunately it seems that the documentation for the XpressProblem class is missing - I will investigate that. Many of the functions in XpressProblem are inherited from the XPRSprob superclass, which is documented here: https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/HTML/javadoc/com/dashoptimization/XPRSprob.html.

  • FICO's avatar
    FICO
    Community Manager

    I have attached the complete solver JavaDoc here, which includes the documentation for the XpressProblem class.

  • FICO's avatar
    FICO
    Community Manager

    You may also want to look at this document, which gives a quick introduction into using the XpressProblem class.

  • FICO's avatar
    FICO
    Community Manager

    Ah I see thanks for sharing the complete solver JavaDoc and other relevant documentation.