Skip to main content

FICO Xpress Optimizer solver libraries

Project description

FICO® Xpress Python interface

Create and solve Mathematical Optimization problems like the following:

min  x1^2 + 2 x2
s.t. x1 + 3 x2 >= 4
     -10 <= x1 <= 10
     x1 in Z
     x2 >= 0

with just a few lines of code:

import xpress as xp
p = xp.problem(name='myexample')  # problem name (optional)
x1 = p.addVariable(vartype=xp.integer, name='x1', lb=-10, ub=10)
x2 = p.addVariable(name='x2')
p.setObjective(x1**2 + 2*x2)      # objective function
p.addConstraint(x1 + 3*x2 >= 4)   # one or more constraints
p.optimize()
print ("solution: {0} = {1}; {2} = {3}".format (x1.name, p.getSolution(x1), x2.name, p.getSolution(x2)))

With the xpress module, one can create and solve optimization problems using the Python® programming language and the FICO Xpress Optimizer library. The module allows for

  • Creating, handling, solving, and querying optimization problems;
  • Using Python numerical libraries such as NumPy to create optimization problems;
  • Setting and getting the value of parameters (controls and attributes) of a problem; and
  • Using Python functions as callbacks for the Xpress Optimizer and the Xpress Nonlinear solver.

The Xpress Python interface allows for creating, handling, and solving all problems that can be solved with the FICO-Xpress library: Linear Programming (LP), Quadratic Programming (QP), Second-Order Conic Programming (SOCP), and their mixed-integer extensions: MILP, MIQP, MIQCQP, MISOCP, together with general nonlinear and mixed-integer nonlinear.

Installation

The Xpress Python interface can be downloaded from PyPI and from Anaconda. Run

pip install xpress

to install from PyPI, and

conda install -c fico-xpress xpress

to install from the Conda repository.

The downloaded package contains: a directory examples with several examples of usages of the module, with varying degrees of difficulty, and a directory license containing the Xpress Community License The full HTML documentation for the Xpress Optimizer, including the Python interface and its examples, is available at the FICO Xpress Optimization Help page.

If you do not have any FICO Xpress license, the community license will be recognized by the module and no further action is needed. If you do have a license, for instance located in /users/johndoe/xpauth.xpr, make sure to set the global environment variable XPRESS to point to the folder containing the xpauth.xpr file, i.e. XPRESS=/user/johndoe.

For a list of supported versions and their end of support dates, please see https://www.fico.com/en/product-support/support-level-software-release. Customers can download selected older versions of the package from the Xpress client area site by clicking on the Archived Downloads link.

GPU installation guidelines for PDHG

The primal-dual hybrid gradient (PDHG) linear optimization solver can now take advantage of an NVIDIA® CUDA®-capable GPU, if present. The GPU support for PDHG is available as a beta release with Xpress 9.8. The following platforms have been tested: Linux (both x86_64 and ARM64) and Windows (x86_64).

Software requirements:

  • At least version 580 of the NVIDIA drivers must be installed. The latest version is available from https://www.nvidia.com/drivers.
  • At least version 13.0 of the NVIDIA CUDA Runtime must be installed.

When installing Xpress from PyPI, the CUDA Runtime can be specified as an optional dependency:

pip install xpress[cuda]

When installing Xpress from Conda, the CUDA Runtime can be installed using the following command:

conda install -c nvidia cuda-cudart libcusparse libcublas

Alternatively, the CUDA Runtime can be installed as part of the CUDA Toolkit, which can be downloaded from https://developer.nvidia.com/cuda-downloads.

Licensing

The Xpress software is governed by the Xpress Shrinkwrap License Agreement. When downloading the package, you accept the license terms. A copy of the Xpress Shrinkwrap License is stored in the file LICENSE.txt in the dist-info directory of the Xpress module.

This package includes the community license of Xpress, see the licensing options overview for more details.

Miscellaneous

"Python" is a registered trademark of the Python Software Foundation. "FICO" is a registered trademark of Fair Isaac Corporation in the United States and may be a registered trademark of Fair Isaac Corporation in other countries. Other product and company names herein may be trademarks of their respective owners.

Copyright (C) Fair Isaac 1983-2026

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

xpresslibs-9.8.1-cp38-abi3-win_amd64.whl (44.6 MB view details)

Uploaded CPython 3.8+Windows x86-64

xpresslibs-9.8.1-cp38-abi3-manylinux2014_aarch64.whl (18.0 MB view details)

Uploaded CPython 3.8+

xpresslibs-9.8.1-cp38-abi3-manylinux1_x86_64.whl (46.8 MB view details)

Uploaded CPython 3.8+

xpresslibs-9.8.1-cp38-abi3-macosx_14_0_x86_64.whl (46.7 MB view details)

Uploaded CPython 3.8+macOS 14.0+ x86-64

xpresslibs-9.8.1-cp38-abi3-macosx_14_0_arm64.whl (14.2 MB view details)

Uploaded CPython 3.8+macOS 14.0+ ARM64

File details

Details for the file xpresslibs-9.8.1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: xpresslibs-9.8.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 44.6 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for xpresslibs-9.8.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 7d5a675b6b096017ffda4697192599e4c87f8387679cf6f84ff6ec79542bd805
MD5 ba3dec3bd8d74686aad578b1d056e21e
BLAKE2b-256 1467fc5f378826a30d5d20518921fb20db1a3b3f0af00205f289a9013978aee2

See more details on using hashes here.

File details

Details for the file xpresslibs-9.8.1-cp38-abi3-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for xpresslibs-9.8.1-cp38-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e9b48cc44edccf71740e64832318d582f28764606f2de53e32eb61abf72d0255
MD5 2e0f9d1aebde42ac82636945cc80a9ab
BLAKE2b-256 e5cfed40f857bbf69690f105f2d49f38820e0d4501de3ec9792972d1a7657d8a

See more details on using hashes here.

File details

Details for the file xpresslibs-9.8.1-cp38-abi3-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for xpresslibs-9.8.1-cp38-abi3-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 696184b6f3ac98ec4f2f1771c29139dc1119274d04aab53a11ce9bb702e29f02
MD5 cdfa99efcca34886390647cc4d22a1e1
BLAKE2b-256 6681d0a0764f6eace020d1def0a4f8596f0ac1d92ab62ed4f31aa5d29ceb193b

See more details on using hashes here.

File details

Details for the file xpresslibs-9.8.1-cp38-abi3-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for xpresslibs-9.8.1-cp38-abi3-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 2e33357dd1af7b9e8fd487723361cebe1751dfc67be80ee0d96cc548f1e14836
MD5 3e18c1b5a197b90d6537ac64303df8cf
BLAKE2b-256 0a10b9d0d708d45d3be5426f75688d820671a19472af48ae0734be0e112d93b2

See more details on using hashes here.

File details

Details for the file xpresslibs-9.8.1-cp38-abi3-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for xpresslibs-9.8.1-cp38-abi3-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 38ba0792e7e4d0d430b387de2199ab5fde4085cfffb0ef7fa9435c7192de2c5d
MD5 c500dfd55901f01ba4cc78ca0ec06e96
BLAKE2b-256 92920916dff5494f522ef27282a43a2b432e221fef3bb4822cf9485d59bcefec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page