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

xpress-9.8.1-cp313-cp313-win_amd64.whl (839.0 kB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13

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

Uploaded CPython 3.13

xpress-9.8.1-cp313-cp313-macosx_11_0_arm64.whl (954.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.13+ x86-64

xpress-9.8.1-cp312-cp312-win_amd64.whl (838.5 kB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12

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

Uploaded CPython 3.12

xpress-9.8.1-cp312-cp312-macosx_11_0_arm64.whl (953.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.13+ x86-64

xpress-9.8.1-cp311-cp311-win_amd64.whl (833.6 kB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11

xpress-9.8.1-cp311-cp311-macosx_11_0_arm64.whl (953.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.13+ x86-64

xpress-9.8.1-cp310-cp310-win_amd64.whl (833.5 kB view details)

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10

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

Uploaded CPython 3.10

xpress-9.8.1-cp310-cp310-macosx_11_0_arm64.whl (952.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.13+ x86-64

xpress-9.8.1-cp39-cp39-win_amd64.whl (834.1 kB view details)

Uploaded CPython 3.9Windows x86-64

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

Uploaded CPython 3.9

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

Uploaded CPython 3.9

xpress-9.8.1-cp39-cp39-macosx_11_0_arm64.whl (953.0 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

xpress-9.8.1-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.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: xpress-9.8.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 839.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for xpress-9.8.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f0801061a01e4ddcd2c17b2f9ab0652106d76b5193a8c514ac397fdc7dca142d
MD5 5a0e4128330fc848daa1422f61538a2f
BLAKE2b-256 e589e8cfb41ac79c15ef01a5f2e81416fe1c42a9818979689addff60d52ac2cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp313-cp313-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 af513ddb492a6b88475fcd50166209c78581dc3212ba250725d4ea5170a3f3ac
MD5 1aea2e932c34964e67be7853624ac5f4
BLAKE2b-256 97c3e1445f720e4687f4c46dc46752feaa36ffa576df7ce195ea5087dc42c628

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp313-cp313-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b2c3f9e3f12a93a4b6742850290cb5e50898fc6fc32f678e4276c039487871df
MD5 d5bc87d7a8dc45d3501724df56f261e3
BLAKE2b-256 c0effa662685e997078e35fb22c1d61be31b0abdbdab167cd65f0668821cfe8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7fe1a42f15c42f5ad9a4af79049323f82665257a309edb9327c5f64fbfe4ed7a
MD5 1206832bd3111d5efc0f94042c93264c
BLAKE2b-256 d13f5b2fccd724ba21e8c531ec46a07b1f2288f2ce517cd558191991d46ad18b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7831591cc74ab375073b181784d3a8a0975b957a8cc0956b7b8b3de836fcc904
MD5 0f3bf469da9ff46248bc7cc398fd92c5
BLAKE2b-256 424bf172ae6ac85e6b85c0bcf71144874a7514dc32e568b1d8eb405988a252d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xpress-9.8.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 838.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for xpress-9.8.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 873d2b10014aaa5f1dad3a8b15aa3ad7ce476c78e4c4b592de1d93b24900d5ab
MD5 a2d2561b642b56563389235eb9952ee7
BLAKE2b-256 da6d03aaea3e7400dfef2d495a55975b1864f4bde7af262368576d4b2c36aa90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp312-cp312-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 71ce192214e60189662b73cb343c81dc23e56aaaeb7a1202d1b23f7d72dff7d4
MD5 0c310cdf44585dc873355c48c5e5a155
BLAKE2b-256 8578ace7306fe6bb2100ebd65b33ce6dc1699011faefe493b10f746256efbbe9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp312-cp312-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 08865fb9422e74afcaed5257398b1adf5ce82e81376031fdb88362723d6bf302
MD5 3a3cb3bb7de2892c1d588028b1ecc5a2
BLAKE2b-256 f5858dbf402f70065f9b5b6127cc08bfcb04d97166497ec95bac908d63bc3cac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8e4c112caabddb7eb4849e823913f8c15719790510aa778f96945a6ad57a81c6
MD5 523b1214ebbc279358cd118fe4dc9f0b
BLAKE2b-256 84dbba880515caa638c96112e3660022bd3b0d0cf94c6831dbdebdedc15664b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 ed09c23c0e98efb35bd2d4bd5eb7acb72004ca5512f5c5be2018c73b7c500760
MD5 f598dfb55aa1e70b3190f2b9ac8c3f98
BLAKE2b-256 6f3077566d0041a6f123d6f475873a01096db807909160bb214bf52286f6d459

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xpress-9.8.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 833.6 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for xpress-9.8.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d4556a86919880617445566fd8177eb17781b47193d7268ffb4460f431a67f09
MD5 c11fc51816e076a6a3935168a939b36a
BLAKE2b-256 42c1d2f8dde9133720671ae7dc1d0c8de4f340789ef7e87a421a887b560eb146

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b0c1147ab4390c84927f201cd5dbcde49816889d7bb193a7ea389f15455d0e5a
MD5 6330de3002ddf7d2fe4409fbc6843a58
BLAKE2b-256 2de57bbc64d553c268662f22c9afd710b238f0174a68d8fd0fa419724439988e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp311-cp311-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 453fa50fc311aeab8f50809eccd6fcaa1f1b77fbe8a013df734c1d70dbc929a3
MD5 bba8c289883b175c1ca894bd85fd58f2
BLAKE2b-256 66e3d504237e678e19bccae5cfd74f15a9fc557034afd629991ad8dff6da7440

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5eac74e5f0013820dca0a185d438aff2aecd2029066f378c9df4141aab9bb9ba
MD5 118babdfa97d79149753c09aa86292f4
BLAKE2b-256 cef9b185202d7481e52b3eca0daa2c781f24a9e13d72ab02135a52d20510edb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 14e5f865fe26a79987d23dc9e1d4dad4f64eb789ae03b556eb450487ccab34f9
MD5 3295b9e09caed831b684c995d5b41c4e
BLAKE2b-256 4869904e2674a9f7794f92de52ad1c2fd4ad855b89a955887f2dadf349d4a8b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xpress-9.8.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 833.5 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for xpress-9.8.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c0f81e9d867b1d48f5b50b8d9d98150b3fc807e7f6d0a386a82f4d643c18384e
MD5 221d83fb4761516dcccdaf242b6dc30f
BLAKE2b-256 a63b0cce1c0bf2e1020cd1b8de8de0e67a8cdd515b1027f709dc212589d3f432

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f2224c3700bf23b90ae545338497a9e897d47fd54bbe9596bc5b4d13b3398985
MD5 18c0a75dfebbc64c884c6354662c56c7
BLAKE2b-256 9b4f444076f448917c1e19793c2a3c26bfd744a67543403c70dcf1c1f036ea73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp310-cp310-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3cf3092706498251adc5c5695551b412837d08b8b83d23f775028bafd8a57ac1
MD5 6a5d87f331d0261211b9cc45bf8ca18f
BLAKE2b-256 2a2fca49ecf69511f4bfe12d26964015a4f2280889990b632d45f808d8924824

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c4e30681575ae85b15224d7b0b6b8e1e6be95cf17cdedea0da655671f2081346
MD5 bcbbce9e325b916c2db6fe98f7746134
BLAKE2b-256 95cfa71d905fcbecb001ad3d9ddd2cbcb5a097972402aba346b991c0beea880d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 bdc1738774edfedf72be87a5bbe87c3abfc0211449ce9a66db502800aee613ad
MD5 36dc089dbcba48709fed912979bbc8ab
BLAKE2b-256 f665bfe8fd8d8947e1ccbc5fe35e67f048f62449e400438c31d8b19ff69f89e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xpress-9.8.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 834.1 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for xpress-9.8.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bc511cd5377d1aab7734e2bc4c89b30d9d5e91d1d52d92eae0b633f0b8af52bd
MD5 dd99f35473e9f293d0a971753ae1135a
BLAKE2b-256 d7ac4d1507718f6edc4f9c0c2d7a4f276b10d49e1e950e942381fbc2503dbefe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 322b0feb2c0a603aa988261efe3d2296aee7df9bb44b104dd61dd333b241a24b
MD5 78da9c48b25d21f40aab7a76880b2d09
BLAKE2b-256 df3b817c81a42f8e16d5602d8ed322a8bcdc9ec96c46914be9d448f68e94c181

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ad8cce6e494c6be4071f77f8ef1cfdd221cac265aae1544a7724e87dfc718af0
MD5 6b2f22dc699ed6fe509e6502675bd2a8
BLAKE2b-256 ee710685fadb3ba26155522faedcca1163f1cc15cc1b10f560a57dd977052afc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8edd5d63b10fd8fbe79cea3eae39352c4872a90205708269a878f8b472b1d65b
MD5 c173ca4c70b674d61a1543c59dde2d5b
BLAKE2b-256 7d5d2729309f9c16db5811e8a3332c1e069e88c3add132bc200982d1214a1d7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpress-9.8.1-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 920cf8c112d820340e0d49fa3e8afa4f015a454d160a6a45d687c3d823cec9df
MD5 8b25e4b9ae7363af233f5c6494cab106
BLAKE2b-256 0a8d1564370ebb17e58753a4928770d90218c888fcfad00ece022538ca322301

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