Skip to main content

FICO Xpress Optimizer Python interface

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-2025

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.

xpress-9.8.0-cp313-cp313-win_amd64.whl (838.4 kB view details)

Uploaded CPython 3.13Windows x86-64

xpress-9.8.0-cp313-cp313-manylinux2014_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.13

xpress-9.8.0-cp313-cp313-manylinux1_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13

xpress-9.8.0-cp313-cp313-macosx_11_0_arm64.whl (953.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

xpress-9.8.0-cp313-cp313-macosx_10_13_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

xpress-9.8.0-cp312-cp312-win_amd64.whl (838.3 kB view details)

Uploaded CPython 3.12Windows x86-64

xpress-9.8.0-cp312-cp312-manylinux2014_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.12

xpress-9.8.0-cp312-cp312-manylinux1_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12

xpress-9.8.0-cp312-cp312-macosx_11_0_arm64.whl (952.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

xpress-9.8.0-cp312-cp312-macosx_10_13_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

xpress-9.8.0-cp311-cp311-win_amd64.whl (833.4 kB view details)

Uploaded CPython 3.11Windows x86-64

xpress-9.8.0-cp311-cp311-manylinux2014_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.11

xpress-9.8.0-cp311-cp311-manylinux1_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11

xpress-9.8.0-cp311-cp311-macosx_11_0_arm64.whl (952.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

xpress-9.8.0-cp311-cp311-macosx_10_13_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

xpress-9.8.0-cp310-cp310-win_amd64.whl (833.4 kB view details)

Uploaded CPython 3.10Windows x86-64

xpress-9.8.0-cp310-cp310-manylinux2014_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.10

xpress-9.8.0-cp310-cp310-manylinux1_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10

xpress-9.8.0-cp310-cp310-macosx_11_0_arm64.whl (951.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

xpress-9.8.0-cp310-cp310-macosx_10_13_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10macOS 10.13+ x86-64

xpress-9.8.0-cp39-cp39-win_amd64.whl (833.9 kB view details)

Uploaded CPython 3.9Windows x86-64

xpress-9.8.0-cp39-cp39-manylinux2014_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.9

xpress-9.8.0-cp39-cp39-manylinux1_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9

xpress-9.8.0-cp39-cp39-macosx_11_0_arm64.whl (952.0 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

xpress-9.8.0-cp39-cp39-macosx_10_13_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9macOS 10.13+ x86-64

File details

Details for the file xpress-9.8.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: xpress-9.8.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 838.4 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for xpress-9.8.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 bcdfd2a80f1fbb1679ef6927e5e35194d0d030b1b3b3dbbd2b8e26f68c0833f1
MD5 15923edf72e1fefca82a04d4f7195084
BLAKE2b-256 aac12284f3008d1145bb612e71dbc0527af9be7126cf9ecbe65c770e7cc64003

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp313-cp313-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp313-cp313-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a2fd814c78871d328604679bd80dce94007f1a0aa491674b0c2610a1f075c5ed
MD5 8b656355cb6aa0ab5d7be35b13acfa27
BLAKE2b-256 defe8710407a3e7f912c2c0db225996530e2706afbc61ca7eda4b7244832d7a9

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp313-cp313-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp313-cp313-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c28c7e15603d56c5f5c6ecf586fa6d555de9fe3ba35628af5b0bc4ba53e9d251
MD5 a1e43c04991c886b1a54878c8561f014
BLAKE2b-256 428a5ecfa59805bd2b5511e185f33cd845a6be7601d58960d0af012e5f6b3b30

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fa5fd41f5528c68da4c6d175f1230421a7e47c7daf0ed1313662e5109d944b11
MD5 ef4b8e439e78f73f1ae98be2e0702fce
BLAKE2b-256 ace5144d99d1a9553d8441a126401a1172dfee8cb2b67f3d08db7c098175cd19

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d7fd5515582b31e011780d129642aba8e505983186d1e8f681c7dc8a9ec03a76
MD5 52221d7e8f22ad279e5d78830875f454
BLAKE2b-256 a7c24c60f4810f9dda785ca38101cd8f05efc82109f0fa474450d73b8ad54651

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: xpress-9.8.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 838.3 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for xpress-9.8.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ff50bae32a9646f2abaf652450bd8b2725ffba476bfb098006813efb34086e98
MD5 28cff53ab251df24d6c43d18fe4786e6
BLAKE2b-256 7674240ea0677eaec36df190dd908ec9946732928582f822613cd4b343eb76a8

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp312-cp312-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp312-cp312-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d3d4004c87595500384ad8673b5ac27dda31e1cddaac35a22a59575aef2f0527
MD5 09d0f15e9e4c8af436d106bc698c39d3
BLAKE2b-256 cf07972999d482b4a8feb70d3efbd7d0b7a06d3e046c572f0b216dfed865ddac

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp312-cp312-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp312-cp312-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 db833e0f745de1b2b4d103d6e43d458f10ef4f883ad98f58539e75799e3f90ce
MD5 249dce6de2fdf5c7594cc1a20556ed06
BLAKE2b-256 f8292a3bd0f66d47aeb1a450c319abb1af0313cf21b1434ed957ff419fa3cd19

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2281bb19e3502693eaf937d1cfbb23339330e9dd4951161a3c685a228e9e4b5b
MD5 298a8732be38ae714ce002c360bcb6c3
BLAKE2b-256 fdcbdbabea4ae0a5c6062a8390a8775a93ec1b503e58b8119c54653a865fbc67

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b1bb1f547b87008324858e2e110ad50c062a29964012e9f849ea4dee61cf2a2a
MD5 e9d54afc647d12221488509f58fb1fad
BLAKE2b-256 6eaadc8c67004e138e4cdb6732e5a467f3da2ae3ff33a7b6ba44767ff0847703

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: xpress-9.8.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 833.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for xpress-9.8.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0c78e52555f2b539d3ad682867287305b549f75b6749df0df7daf67d856e0251
MD5 1e100ec82a8a20e3972679079e68ef55
BLAKE2b-256 85fad0b8b4b1c13de2070435deee1ccaea91a7a7e664d1507081d02283473935

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp311-cp311-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 377ab08765c3144e4ca1fe78f35065f8d6b3e224af62bd97a304666859f105e5
MD5 db9abff4195e34a284fecaac49dda9cd
BLAKE2b-256 6ca39a2e3b5978d132219b65f5cfde3e59626a4e0565e05c28b1182f4241a155

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp311-cp311-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp311-cp311-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 735d914675ad5995cc28e2736869119c284630bfc205be5cb79757d88431c4c2
MD5 f03e3c05a13cb7c032f4fd67c218741f
BLAKE2b-256 143abdc4798dc2f4c8947a04a70e1195e8e12e8e2a2ec040a0b077b717850079

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4efcfa9b8717ca0ecbe3f113540c82fb69c599c2157127364a42de323a1068ed
MD5 53403fed8743330b6c396aefae97ea9b
BLAKE2b-256 418ffd5ff7f3fdc9e6eae030436355b576cf85e99e64029dddca9c83692a5e5a

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp311-cp311-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b5372bc7ce79806de0b2f37f5fbf4cd48f0f97fa249c01c380f2705e84af727b
MD5 57b8f08a6d8c6360b538f340c514cecc
BLAKE2b-256 274acbb5690a40772fed2a6654cd6757138aa7bcb9a991b707aee3932a544916

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: xpress-9.8.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 833.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for xpress-9.8.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9768d36067d0184006278c4293a258f88d629e1046ec6597f57f1a4122d0b975
MD5 cf81976e05368e0123ff5963e12228ef
BLAKE2b-256 5fd17ded08dcf09ca0702b668f975420c1c9e9de22d647cfc3cbb67eff10b6c9

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp310-cp310-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7ac0d50dd52066147cec4a933ecee8bb3656465866e63f207947e1855079f1cc
MD5 ca673acb9eb0d83bf1809787293229a5
BLAKE2b-256 2bfc509655fbabaf7f88ad99cd1332ca75fddfc4f04eb86ec6b46418d2a542b4

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp310-cp310-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp310-cp310-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 de09efbac5a8cefc211458db2a0a5a55eecfa47a8f5f162afa3113474c8f09e7
MD5 6061b4ba31ffb8be0c7bbe20e6a6ac97
BLAKE2b-256 ed65ddc7d5d551bfb0985dcaf36e17ab7e61e176b9f2685bdf9920ec80cce44f

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f4f77424c3167af9960051ddc18f1035157dcf6072dd2c6a838b63633636fb15
MD5 18dc1793d53a0c93c1967f29b495e629
BLAKE2b-256 d10e18f17df1f2cb00bdb2b39f0b731ba4ca37d89420c7eec86ddb8bd1203cd6

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp310-cp310-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 54b8fc97fd9631b50ac09375076f18d9c52a9049114d5d0a1e7d347ae91992b4
MD5 27dc8a208254262e3e76950fc89f7c7c
BLAKE2b-256 8848a8f65f41de68d99ce51793384237abd4d848451eee07bf2b72587a82c77a

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: xpress-9.8.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 833.9 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for xpress-9.8.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 da573d7ae52bbe2c096606247044877541060ab418a7b1f795c364734b10b3f8
MD5 abd9805040e130334df7b5720b481c1f
BLAKE2b-256 11a0c22ca077d3d2ff4ca67b051be6cdf0f2fa81c80246aa479257170dbb446f

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp39-cp39-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ba9ccdffdc607d55bdf86068ce1b24ab302cb6cc19ad5f73ee2d427bb4ccdebb
MD5 cdcbbca8c5c39789ee4b8bece1b1e346
BLAKE2b-256 8233fcc2e1ff10c285af1693ed58287d444f97eb6441bc134628d93d23d5439d

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp39-cp39-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1a50b690ddc3394ac240cf4c8b02438f788cb50eb4db76a3841230767984dedb
MD5 5104738abee7df322f194a50355c946d
BLAKE2b-256 3889b087ad738064162a9d61581a87240266c51787112fd0569b115c4a60d112

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2e0779d07d9c5503c6dfc5e7bc87c50662a2bd941808704f0fd0b5c529bd79d2
MD5 5bbd910711c9a9f917167c986a822bf0
BLAKE2b-256 8daa2323aa866e966e70332d01c0cac0ea0dc93538909295823b9887ec0baa13

See more details on using hashes here.

File details

Details for the file xpress-9.8.0-cp39-cp39-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for xpress-9.8.0-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 fd6ceff644b4c2fb8e99bad0ecbef282a91fad8224c90fc990bb674b45b4ad73
MD5 05addb48a8e15ad61fe31ca53c33007e
BLAKE2b-256 22029e278ced4380ae483da02e84c399baea2b5f7d46fdf96902fe95bbec7217

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