Integration examples for using FICO® Xpress Solver with third-party optimization modeling libraries.
| Library | Website | Language | Description |
|---|---|---|---|
| OR-Tools | developers.google.com | C++, Python | Google's Operations Research tools with Linear Solver and MathOpt interfaces |
| CVXPY | cvxpy.org | Python | Disciplined convex programming with automatic reformulation |
| Linopy | linopy.readthedocs.io | Python | Pandas-native optimization for data-driven workflows |
| PuLP | coin-or.github.io/pulp | Python | Beginner-friendly LP/MIP modeling library |
| Pyomo | pyomo.org | Python | Powerful algebraic modeling language for LP, MIP, QP, and more |
| PyOptInterface | github.com/metab0t/PyOptInterface | Python | Direct C++ bindings with callbacks and full solver control |
Note: Some library folders contain examples that are part of the "Xpress Everywhere" blog series on the FICO® Xpress Optimization Blog.
The Python library examples share a common portfolio optimization problem defined in the data/ folder. Each library demonstrates different capabilities:
| Library | QP Support | MIP | SOS | Warm Start | Callbacks |
|---|---|---|---|---|---|
| CVXPY | Yes | Yes | No | Yes | No |
| Linopy | Yes | Yes | No | No | No |
| PuLP | No (LP only) | Yes | No | Yes | No |
| Pyomo | Yes | Yes | Yes | Yes | No |
| PyOptInterface | Yes | Yes | Yes | Yes | Yes |
# Install dependencies (each library needs xpress package)
pip install xpress cvxpy pyomo pulp linopy pyoptinterface
# Run from repository root
cd xpress-3rdparty-interfaces
python cvxpy/portfolio_cvxpy.py
python linopy/portfolio_linopy.py
python pulp/portfolio_pulp.py
python pyomo/portfolio_pyomo.py
python pyoptinterface/portfolio_pyoptinterface.py- FICO® Xpress (Community Edition or full license)
- Language-specific requirements vary by example (see individual READMEs)
-
Open Codespaces and create a codespace:
- Click on the "Code" (green) button on this repository page.
- On the "Codespaces" tab, select "Create a Codespace on main". This will set up a cloud-based development environment for you.
-
Run a Python example:
-
Once the Codespace is created and the environment is ready, open the terminal.
-
Install the required library and run an example:
pip install xpress pulp python pulp/portfolio_pulp.py
-
-
Try different libraries:
- Each library folder contains a
portfolio_<library>.pyexample solving the same optimization problem. - Install the library you want to try and run its example.
- Each library folder contains a
- FICO® Xpress Documentation
- python-notebooks - FICO® Xpress Python notebook examples
- xpress-community - Community contributed Xpress examples
See source code files for copyright notices.
The examples in this repository are licensed under the Apache License, Version 2.0. See LICENSE for the full license text. The examples use FICO® Xpress software. By running it, you agree to the Community License terms of the Xpress Shrinkwrap License Agreement with respect to the FICO® Xpress software. See the licensing options overview for additional details and information about obtaining a paid license.