Skip to main content

passagemath: Convex polyhedra in arbitrary dimension, mixed integer linear optimization

Project description

About SageMath

“Creating a Viable Open Source Alternative to

Magma, Maple, Mathematica, and MATLAB”

Copyright (C) 2005-2024 The Sage Development Team

https://www.sagemath.org

SageMath fully supports all major Linux distributions, recent versions of macOS, and Windows (Windows Subsystem for Linux).

See https://doc.sagemath.org/html/en/installation/index.html for general installation instructions.

About this pip-installable source distribution

This pip-installable source distribution passagemath-polyhedra is a distribution of a part of the Sage Library. It provides a small subset of the modules of the Sage library (“sagelib”, passagemath-standard), sufficient for computations with convex polyhedra in arbitrary dimension (in exact rational arithmetic), and linear and mixed integer linear optimization (in floating point arithmetic).

What is included

Examples

A quick way to try it out interactively:

$ pipx run --pip-args="--prefer-binary" --spec "passagemath-polyhedra[test]" ipython

In [1]: from sage.all__sagemath_polyhedra import *

Available as extras, from other distributions

Additional features:

pip install “passagemath-polyhedra[graphs]”

Face lattices, combinatorial polyhedra, graph-theoretic constructions

pip install “passagemath-polyhedra[groups]”

Constructing symmetric polyhedra, computing automorphisms, lattice point counting modulo group actions

pip install “passagemath-polyhedra[toric]”

Toric Varieties

Other backends for polyhedral computations can be installed:

pip install “passagemath-polyhedra[normaliz]”

Normaliz, via PyNormaliz, provides very fast computations in particular for polyhedra with data in algebraic number fields.

$ pipx run --pip-args="--prefer-binary" --spec "passagemath-polyhedra[normaliz,test]" ipython

In [1]: from sage.all__sagemath_polyhedra import *

In [2]: gap_norm = polytopes.grand_antiprism(backend='normaliz'); gap_norm

In [3]: gap_norm.f_vector()
pip install “passagemath-polyhedra[cddlib]”

cddlib provides support for computations with polyhedra in floating-point arithmetic.

passagemath-polyhedra also provides integration with other packages for additional functionality:

pip install “passagemath-polyhedra[latte]” installs LattE integrale for lattice point counting and volume computation using generating functions.

$ pipx run --pip-args="--prefer-binary" --spec "passagemath-polyhedra[latte,test]" ipython

In [1]: from sage.all__sagemath_polyhedra import *

In [2]: P = polytopes.cube()

In [3]: P.integral_points_count()
Out[3]:
27

In [4]: (1000000000*P).integral_points_count(verbose=True)
This is LattE integrale...
...
Total time:...
Out[4]:
8000000012000000006000000001
pip install “passagemath-polyhedra[polymake]”

Polymake, via JuPyMake

lrslib

Optional backends for optimization:

pip install “passagemath-polyhedra[cbc]”

COIN/OR CBC Mixed Integer Linear Optimization solver, via sage_numerical_backends_coin

pip install “passagemath-polyhedra[cplex]”

CPLEX Mixed Integer Optimization solver (proprietary; requires licensed installation), via sage_numerical_backends_cplex

pip install “passagemath-polyhedra[cvxpy]”

CVXPy as middle-end for various backends

pip install “passagemath-polyhedra[gurobi]”

Gurobi Mixed Integer Optimization solver (proprietary; requires licensed installation), via sage_numerical_backends_gurobi

pip install “passagemath-polyhedra[scip]”

SCIP Mixed Integer Optimization solver, via PySCIPOpt

Development

$ git clone --origin passagemath https://github.com/passagemath/passagemath.git
$ cd passagemath
passagemath $ ./bootstrap
passagemath $ python3 -m venv polyhedra-venv
passagemath $ source polyhedra-venv/bin/activate
(polyhedra-venv) passagemath $ pip install -v -e pkgs/sagemath-polyhedra

Project details


Download files

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

Source Distribution

passagemath_polyhedra-10.4.56.tar.gz (986.1 kB view details)

Uploaded Source

Built Distributions

passagemath_polyhedra-10.4.56-cp312-cp312-musllinux_1_2_x86_64.whl (13.3 MB view details)

Uploaded CPython 3.12 musllinux: musl 1.2+ x86-64

passagemath_polyhedra-10.4.56-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

passagemath_polyhedra-10.4.56-cp312-cp312-macosx_14_0_arm64.whl (6.9 MB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

passagemath_polyhedra-10.4.56-cp312-cp312-macosx_13_0_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.12 macOS 13.0+ x86-64

passagemath_polyhedra-10.4.56-cp311-cp311-musllinux_1_2_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

passagemath_polyhedra-10.4.56-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

passagemath_polyhedra-10.4.56-cp311-cp311-macosx_14_0_arm64.whl (6.9 MB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

passagemath_polyhedra-10.4.56-cp311-cp311-macosx_13_0_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.11 macOS 13.0+ x86-64

passagemath_polyhedra-10.4.56-cp310-cp310-musllinux_1_2_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

passagemath_polyhedra-10.4.56-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

passagemath_polyhedra-10.4.56-cp310-cp310-macosx_14_0_arm64.whl (6.9 MB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

passagemath_polyhedra-10.4.56-cp310-cp310-macosx_13_0_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10 macOS 13.0+ x86-64

passagemath_polyhedra-10.4.56-cp39-cp39-musllinux_1_2_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.2+ x86-64

passagemath_polyhedra-10.4.56-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

passagemath_polyhedra-10.4.56-cp39-cp39-macosx_14_0_arm64.whl (6.9 MB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

passagemath_polyhedra-10.4.56-cp39-cp39-macosx_13_0_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.9 macOS 13.0+ x86-64

File details

Details for the file passagemath_polyhedra-10.4.56.tar.gz.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56.tar.gz
Algorithm Hash digest
SHA256 49f3da0a7c3979e1458aa59589ac33fc46c51c7c6288dd6d4ef8776b75e77a82
MD5 eed36efdb2198053f0860887a32f494c
BLAKE2b-256 bfeec48a69336a0ea003b8819b4d802645869163aa016bbda508a0dc1414fd41

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8317929de40f6fc8f41b4029dd9ee113b0686d1f435552e3dd2bb98c54e436bc
MD5 500c9f73829e6fbdb34233047bfbb7aa
BLAKE2b-256 35d3465499434c1ab201ab5386dfab245be15b9a4924a386f33bda53ccc2121f

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8c04f8fbdfe736f00357ac80200da86e14262d5159f45e6fd608afe4a8a7b483
MD5 244cd8ba0fff4b791b9dc26a0614ca69
BLAKE2b-256 a58af2d76e773108b2afc62922a4fc257a6fda5c44e5ac09a6ded21d7b00b20c

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b277e71eadd826cc9a22ab344fbdd6f8ce038854e02e96277ba7972c0f0c9e2e
MD5 ab574eb5c65f0d140f5c098e04ced54f
BLAKE2b-256 b45de557e32d9a81f5657147d6304535c7757dbb8b57c17e96bc87edad9572eb

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 c9fdb0ad711451a0910776c263dd2ba7ab85e5325af094627146ec35ed3f87f6
MD5 db4e64bb6215a3353bdb96b6b3c9c27f
BLAKE2b-256 092da97a09a957aae87ec1c3b7e4be312e4fa510a06c77329376bcadc3e93b61

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 29aa9777e0920f80cfbf9b76442b57ab90a230a4180ddf3f815a6ba6dfb3b0c5
MD5 0dac0d7489b15e64f45df7b31c90c138
BLAKE2b-256 2a6ddbf29ec497a2ab550fd5f0258e23fed3edb6756c471cb44180f75381d15e

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01cae47f455ff793320449bce440a6afdea9811afe90276a392dda774e3a90fa
MD5 473f40170a04249f9f35125a3ad80e87
BLAKE2b-256 3be49311a244327082278d27ad91040ee118a32b80af1241588bc50dc1a4d58f

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d7e136c305c3cab78ffa680af23b4a5fd3d9639e32c492bc46f29d9fb4c09525
MD5 8914b2a81922dc204dc680bcca12ff3e
BLAKE2b-256 5761504369c70a451d3880154e66612ad9319d86b576bac08731b0e2850dfcd2

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 0e2e5d79f36e151059a71a413264452833a9f63458bafd3182ceea4fddc55d2a
MD5 bd5d5685dd5933f6c041c9f71d094438
BLAKE2b-256 b3402e027a171d9ed4048d37f034ac770a2ee4625d78d83eaf78f1be684abca3

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5681a1dea67e076af8d351c1e3ad62a2dd14d63507af6e8c5a0be442c1b6feaf
MD5 52a18dbd278b3d804f75e13605128ea5
BLAKE2b-256 035615371bc3243fc8eccc6873589c2e3fd8327867476559ded37faf825c019c

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5d6be60477cea968c2589482f5c7d0a60f79724d85f1c7733f8a803486cab290
MD5 97dcbacae57e7765e394dbd553055aaf
BLAKE2b-256 0c27e0c16092a1db4e1ff829acdd659d82ce504c0358c8d6fa37d3392cb85ccc

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 6b46a22360cae8838ec99b2819ae462e9de0a28d89490e5b08f3eb75b92a038e
MD5 f267c50904522249d85a8a54fa308de1
BLAKE2b-256 b713a8433ee56e16a3ffeba7976df7de5e1121f7cc8028b03ed5079f46c9853b

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp310-cp310-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 5e4bbd9d712b5b1873a0c0f504b9bd7a95445aecbdbf68295759a7616dee308d
MD5 8176429e4b776e149c07fac23810e5ea
BLAKE2b-256 97f176b36641f409a2cbffd2dbd0a614db0a465ef9c1c10a7d6faf1f049fd542

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 549af32e3af663082a714b606c3bf7a2272f6f9836c35595343c845c347f4096
MD5 4e2cf206c555da836dcb005e3b1240ef
BLAKE2b-256 fc5db1d51f4c01318c152d9602c03d6d4b7419ea75c67bc5cd1dd2c4b2633a4c

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9d41ee955c29d95b9005c34d835d721df2ccb4262310834ac1d3742299a0f2f6
MD5 64c19355d7a79c83ebb67240bbb2933b
BLAKE2b-256 9560739be3c7bcbbb34dac48d0ef297b94af1ded016525a972b679ac3522b676

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 6523372acfa9640a3190d8a44d4b2333ed6cd3d0b9eb3773633a2397cef8ed77
MD5 e45a9534adb97f005aee56e5c3f53764
BLAKE2b-256 ec529a6700c2ca47dd942564cfa799f5bbe0ae63a71538d5481f0ecded4e8ddb

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.4.56-cp39-cp39-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.4.56-cp39-cp39-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 37d24fc9fea94a711a98b5076557af321317fb36694990bb8620534cbb914eb6
MD5 5eaef2d306cd333df680472e50c2fa81
BLAKE2b-256 e3f8829e14be9e7c5b90e45de535cd53cbb65751672a139d3ad1557d2bd5eac5

See more details on using hashes here.

Supported by

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