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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gilp-0.0.1rc2.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.1rc2.tar.gz
Algorithm Hash digest
SHA256 53e9ddec4231db63793370f0ceb6d3547cfd49ec04ff8480be2b7adb97750bf8
MD5 ce8a31b98affd6c7723d80b3bd28fa38
BLAKE2b-256 04070440810afa69165f6ebaaac533f0686ec237f6a23207cfe7e1834d973aca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gilp-0.0.1rc2-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.1rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 23b68069969d1b69bb3f33a94b8cd517a896bdbec3e8a80081083e3c27800ad8
MD5 4bc604146db49f5c6cb61059dd866c78
BLAKE2b-256 3180b0a0e3fbf269c47016fc2aa7ba66159048236f935f250a3b7a5e770025c1

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