XpressMP Java Examples

· Source: OR in an OB World · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering, Data Science & Analytics · Depth: Intermediate, quick

Summary

FICO XpressMP's Java API is undergoing a transition from an older "thin wrapper" (XPRSprob class) to a newer, more object-oriented version (XpressProblem class). This transition explains the presence of seemingly duplicate examples within the XpressMP installation, specifically in the `examples/solver/optimizer/java` directory and its `objects` subfolder. Examples in the `objects` folder utilize the recommended new API, while those in the parent directory use the older API. A key distinction between the two APIs, particularly evident in examples involving callbacks like the Traveling Salesperson Problem (TSP), lies in how they handle model modifications during the presolve stage. The older API allows direct interaction with the presolved model, requiring manual "crushing" of cuts, whereas the newer API abstracts this, allowing users to define cuts in terms of original variables, with Xpress handling the conversion.

Key takeaway

For Java developers working with FICO XpressMP, you should prioritize using the newer, object-oriented API based on the XpressProblem class. This approach simplifies handling model transformations and cuts during the presolve stage, as Xpress manages the "crushing" process automatically. Refer to the examples located in the `objects` subfolder within the XpressMP installation for guidance on implementing solutions with the recommended API, ensuring your code benefits from the streamlined design.

Key insights

FICO XpressMP's Java API is transitioning to an object-oriented design, simplifying cut management during presolve.

Principles

In practice

Topics

Best for: Software Engineer, Machine Learning Engineer, AI Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by OR in an OB World.