Linear Programming (LP) and Mixed-Integer Programming (MIP) have been standard Optimization business tools for several decades now. While some major players in the field are always seeking new applications, FICO has a solid understanding of what LP and MIP are good at. Therefore, we are focused on how to use these tools to reap the most benefits.
Since LP and MIP are precisely described by their mathematical definition, there is a narrow specification of the functionality of an LP/MIP solver. The aspects mentioned below bring many advantages for users of LP and MIP solver software:
- MIP solvers are here to stay. Xpress, the most sustainable player on the field, has been around for more than 35 years. Throughout this time, Xpress has continuously delivered state-of-the-art optimization software.
- MIP solver speed has increased to be 30,000x faster over the last twenty years due to performance enhancements in solver development.
- The existing basic APIs of Xpress (and other solvers) hardly ever change, making it convenient to learn and use. Of course, as more functionality is being added, the advanced API capabilities continue to grow over time.
- As a result of the precise specification, the APIs of the leading solvers are quite similar.
Given the similarities in APIs, it is remarkably easy to change your existing LP or MIP applications from IBM llog Cplex or Gurobi to FICO Xpress. Once you have moved over, you can benefit from the advanced features of the Xpress API, such as the built-in concept of goal programming. This provides a much richer set of callbacks. FICO also has a larger number of user controls to fine-tune the solver experience for your company's needs. FICO Xpress Optimization has the widest breadth of industry-leading optimization algorithms and technologies, including constraint programming and (mixed-integer) nonlinear programming.
The easiest way to evaluate Xpress as an alternative for any other solver is to export your model in MPS format. All three major vendors, smaller vendors, and academic solvers support this format. This enables you to evaluate Xpress on your favorite optimization model in just minutes.
If you should choose to change solvers based on this evaluation, completely exchanging the underlying MIP solver of your application is not complicated. Assuming you have an application that is using the Gurobi C API, the following outlines the basic steps of transitioning to Xpress.
Creating your problem data structure
The first step is to initialize your Xpress instance and create a problem. This is the equivalent step to loading an environment and creating a model in Gurobi. In Xpress, you need to call XPRSinit() and XPRScreateprob(),where in Gurobi you call GRBloadenv() and GRBnewmodel(), respectively. You need to call XPRSdestroyprob() and XPRSfree instead of GRBfreemodel() and GRBfreeenv(), respectively.
Modifying your problem instance
Xpress provides a set of routines for manipulating the problem data. These include a set of routines for adding and deleting problem rows and columns. Rows and columns can be added to the problem together with their linear coefficients using XPRSaddrows() and XPRSaddcols(), respectively. A call to XPRSaddrows() corresponds to a call of GRBaddconstrs(). A call to XPRSaddcols() corresponds to a call of GRBaddvars().
Running the optimization algorithms
The two main commands to run the optimization algorithms on a problem are XPRSmipoptimize() and XPRSlpoptimize(), depending on whether the problem needs to be solved with or without respecting integrality requirements on the variables. This is akin to the usage of GRBoptimize() which covers both continuous and discrete models, but might require you to change variable type attributes if the user wants to solve the continuous relaxation independently of the full model.
Processing the optimization results
FICO Xpress provides several functions for accessing solution information. You may access the current LP solution information via memory using XPRSgetlpsol(). By calling XPRSgetlpsol(), the user can obtain copies of the double precision values of the decision variables, slack variables, dual values and reduced costs. Further, you can obtain the last MIP solution information with the XPRSgetmipsol() function. In Gurobi, these functionalities are covered by diverse attributes, foremost GRB_DBL_ATTR_X for the actual solution.
A more detailed walk-through for a migration from IBM llog Cplex or Gurobi to Xpress is given in white papers referenced below. There, we also cover user controls, problem attributes and callbacks. Further, we explain how Python applications can be ported from Gurobi to Xpress, and how C++, Java and .NET applications can be migrated from IBM llog Cplex to Xpress. Let us know in the comments if there are other languages you would like to see a similar document for.
And hey, there's no reason to stop here! Once your application works with the Xpress-Optimizer libraries, you might want to learn about the other convenient tools in our portfolio such as Xpress Workbench, Xpress Executor, Xpress Solver and Xpress Insight.
One of our more popular tools is Xpress Insight. This software enables businesses to rapidly deploy optimization models as powerful applications. It lets teams work in a collaborative environment with interactive visualization and an interface designed for business users to work with models in easy-to-understand terms and account for trade-offs and sensitivities implicit in the business problem. Xpress Workbench integrates with Xpress Insight for seamless development and deployment of complete optimization solutions. It includes Xpress Mosel, the market leading analytic orchestration, optimization modeling and programming language.
Find more detailed instructions in these technical guides: How to Migrate from Gurobi to Xpress and How to Migrate from IBM Ilog Cplex to FICO Xpress. Learn more about all FICO Xpress Optimization has to offer in our community and user forum and follow us on Twitter @FICO_Xpress.