Skip to main content

A Python package for visualizing the geometry of linear programs.

Project description

GILP (Geometric Interpretation of Linear Programming)

Installation

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

pip install gilp

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.1rc1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

gilp-0.0.1rc1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gilp-0.0.1rc1.tar.gz
  • Upload date:
  • Size: 13.1 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.1rc1.tar.gz
Algorithm Hash digest
SHA256 78b320457219d4672a051df17cc6da7e0fde2ed32b2b720b48411b25e006f5ca
MD5 1e683079ceff74c4e39b2f2132abdbbf
BLAKE2b-256 41e63985739a0d30d6ff7f610213dd7909bf1b62e34090d08b561a201d7dc055

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gilp-0.0.1rc1-py3-none-any.whl
  • Upload date:
  • Size: 15.9 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.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 83552deb0eb66d6eb3db2e124720112c900f88a30cd82725980e383eedd7921a
MD5 c405188ab0106bf67977ad93df12a6bc
BLAKE2b-256 bddecaa96f073571ca10d6ae41a6b9f554b66b783430bb6fb294a3d288ec9dec

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