The FICO Xpress Optimizer Python interface (xpress) enables users to formulate, manage, and solve a comprehensive range of mathematical optimization problems including Linear Programming (LP), Quadratic Programming (QP), Second-Order Conic Programming (SOCP), and their mixed-integer counterparts (MILP, MIQP, MIQCQP, MISOCP), along with general nonlinear and mixed-integer nonlinear problems. It offers seamless integration with numerical libraries like NumPy and supports advanced features such as callbacks for solver control. The library is currently at version 9.8.1, with frequent updates including patches and minor versions released multiple times a year.
pip install xpressVerified import paths — ran on the pinned version, not inferred.
This quickstart defines and solves a simple Linear Programming (LP) problem using the FICO Xpress Python interface. It initializes a problem, adds variables and constraints, sets an objective, and then optimizes the problem, printing the solution if optimal.
For larger problems, a commercial FICO Xpress license is necessary. Ensure the `XPRESS` environment variable points to the directory containing your `xpauth.xpr` license file.
Always check the console output or logs alongside the Python exception. The console typically contains the precise error message (e.g., 'Duplicate column names are not allowed').
Access these properties outside of callbacks or the presolve phase. If values are needed within a callback, store them in auxiliary data structures before the solve begins.
Users are advised to upgrade to Xpress 8.14.9 or a newer major release (e.g., 9.x). Archived versions may be available in the FICO Client area.
Run `pip install xpress` to install the package. Ensure your Python environment is correctly set up and activated.
Verify that your license file is valid for your current platform and that the `XPRESS` environment variable is correctly set to the directory containing `xpauth.xpr`. Obtain a platform-appropriate license if necessary.
Check the terminal or IDE console output immediately preceding this error for a more descriptive message (e.g., '1030 Error: Duplicate column names are not allowed'). Correct the modeling mistake based on the detailed console error.