engri-1101 / gilp

A Python package for visualizing the geometry of linear programs.
https://gilp.henryrobbins.com
Other
54 stars 8 forks source link

ENH: Visualize dual LPs #14

Open henryrobbins opened 11 months ago

henryrobbins commented 11 months ago

Currently, GILP functionality only focuses on the primal LP. However, GILP could be used to visualize both the primal and dual LP, to demonstrate complementary slackness. The primal and dual LPs have the following forms:

(primal) max c^Tx          (dual) min b^Ty
         s.t A x <= b             s.t A^T y >= c
               x >= 0                     y >= 0

Since GILP can only visualize 2- and 3-dimensional LPs, dual LP visualizations will be limited to LPs in 2 or 3 variables with 2 or 3 constraints.

This is a non-trivial change requiring an understanding of LP duality and multiple design decisions. Learn more about duality here.