Skip to main content

A python package for rounding polytopes.

Project description

Efficient random sampling in convex polytopes relies on a ‘rounding’ preprocessing step, in which the polytope is rescaled so that the width is as uniform as possible across different dimensions. PolyRound rounds polytopes on the general form:

![equation](https://latex.codecogs.com/gif.latex?P&space;:=&space;{x&space;in&space;mathcal{R}^n:&space;A_{eq}x&space;=&space;b_{eq},&space;A_{ineq}x&space;leq&space;b_{ineq}}) with matrices ![equation](https://latex.codecogs.com/gif.latex?A_{eq}&space;in&space;mathcal{R}^{m,n}) and ![equation](https://latex.codecogs.com/gif.latex?A_{ineq}in&space;mathcal{R}^{k,n}) and vectors ![equation](https://latex.codecogs.com/gif.latex?b_{eq}&space;in&space;mathcal{R}^{m}) and ![equation](https://latex.codecogs.com/gif.latex?b_{ineq}in&space;mathcal{R}^{k}).

This formulation often arises in Systems Biology as the flux space of a metabolic network.

As output, PolyRound produces a polytope on the form ![equation](https://latex.codecogs.com/gif.latex?P^{r}&space;:=&space;{v&space;in&space;mathcal{R}^l:&space;A^{r}_{ineq}v&space;leq&space;b^{r}_{ineq}}) where ![equation](https://latex.codecogs.com/gif.latex?l&space;leq&space;n) and the zero vector is a stricly interior point. For transforming points back to the original space, it also provides a matrix ![equation](https://latex.codecogs.com/gif.latex?S&space;in&space;mathcal{R}^{n,l}) and a vector ![equation](https://latex.codecogs.com/gif.latex?t&space;in&space;mathcal{R}^{n}), so that ![equation](https://latex.codecogs.com/gif.latex?x&space;=&space;Sv&space;+&space;t).

Currently, PolyRound is supported for python 3.7 and 3.8.

PolyRound no longer depends on a Gurobi installation and uses optlang (https://github.com/opencobra/optlang) to delegate linear programs to GLPK in case Gurobi is not installed. However, PolyRound is more reliable with Gurobi. Free Gurobi licenses for academic use can be obtained at https://www.gurobi.com/. Once the license is installed, the easiest way to get gurobi to work in python is through Anaconda https://www.anaconda.com/. Installation of gurobi in a conda environment is done with “conda install -c gurobi gurobi”.

An easy example of how to get started is presented in the jupyter notebook “example_usage”.

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

PolyRound-0.1.4.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

PolyRound-0.1.4-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file PolyRound-0.1.4.tar.gz.

File metadata

  • Download URL: PolyRound-0.1.4.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5

File hashes

Hashes for PolyRound-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6b3d1ced031cbbee153d9e346ebdeb722e9fa9b8496197c5e2d66c914d96369c
MD5 14a9db228403ed37c8d3bb5a351ad118
BLAKE2b-256 983c658e32d4cc6c65e36518339fe67b9b8d4f1a775584139014921df8da48a6

See more details on using hashes here.

File details

Details for the file PolyRound-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: PolyRound-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5

File hashes

Hashes for PolyRound-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fddbd2ca589a4e04fcb46ebc936a76f624e359e3b26db1ae83b038592c54df67
MD5 a2b41283ec21a4bbecbcb3cd3a2d652a
BLAKE2b-256 89c743559399debc27a8615928f4fd965da1501872a9ff6651135a2fc8b016e3

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