Skip to main content

A Python package for visualizing the geometry of linear programs.

Project description

GILP (Geometric Interpretation of Linear Programming)

Maintenance PyPI download month MIT license PyPI pyversions

Installation

The quickest way to start using gilp is with a pip install

pip install gilp

To develop and run tests, you will need to pip install with extra dependencies

pip install gilp[dev]

Example

The LP class creates linear programs from (3) numpy arrays: A, b, and c which define the LP in standard inequality form.

max c^Tx
s.t. Ax <= b
x >= 0

Consider the following input.

A = np.array([[1,0], [1, 2]])
b = np.array([[2],[4]])
c = np.array([[1],[1]])
lp = LP(A,b,c)

The corresponding LP is:

max 1x_1 + 1x_2
s.t 1x_1 + 0x_2 <= 2
1x_1 + 2x_2 <= 4
x_1, x_2 >= 0

To visualize the simplex algorithm on an LP, first create a plotly figure and then use .show() to open up an HTML file or .write_html() to write an HTML file with a given name.

fig = simplex_visual(lp)
fig.show()
fig.write_html('example.html)

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

gilp-0.0.1rc6.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

gilp-0.0.1rc6-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file gilp-0.0.1rc6.tar.gz.

File metadata

  • Download URL: gilp-0.0.1rc6.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

File hashes

Hashes for gilp-0.0.1rc6.tar.gz
Algorithm Hash digest
SHA256 085ad971a4c5cc489bac2767dfba9951b8ef9b3f5c24df294f502cc6870afd16
MD5 784c9fce2c8536b99cb11279fee015ff
BLAKE2b-256 75cf0e2f39e6e5454407ad6169a812e5fd583d4dddacb7858a362977f82559d9

See more details on using hashes here.

File details

Details for the file gilp-0.0.1rc6-py3-none-any.whl.

File metadata

  • Download URL: gilp-0.0.1rc6-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

File hashes

Hashes for gilp-0.0.1rc6-py3-none-any.whl
Algorithm Hash digest
SHA256 fa523ebe5ba56dea46e7a6fe6ff53f1dec472a9efdcae495ea7485101a093c60
MD5 ba39a26b274052a05f41b72d1379bcdc
BLAKE2b-256 2d95972e20c5f5c11c6eba30a827e9fac7e35cdae5719da7e64bc0bac1be8a4a

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