**DOCUMENTATION: LINEAR PROGRAMMING in 2D**

**AUTHORSHIP:**

This Java applet was created in the spring/summer of 2000.
The author is Bohdan Kaluzny, a Computer Science graduate student at McGill University (Montreal, Canada).
The applet was the idea of Professor David Avis (School of Computer Science, McGill University).
Please email Bohdan Kaluzny if you have
comments/suggestions/questions.

Acknowlegdment Prof. Avis had the idea... Bohdan did the coding...

Source Code available here

**USE & FEATURES:**

(1) __Input__: the user may either select a hardcoded example, or input their own LP using the buttons mentioned below.

(2) __Pivoting__: the user may pivot in 2 ways. The first is to use the button and choice menu's mentioned below. The second manner is more interactive: click on intersection points to pivot. YOU CANNOT PIVOT GRAHICALLY UNTIL BOTH "x1" and "x2" HAVE LEFT THE BASIS.

(3) __Note__: The *pivot path* is highlighted red. If the "Cone/Path" button is pressed, a cone will be displayed at the current vertex.

(4) __Note__: The *optimal vertex* is highlighted orange.

**FUNCTIONALITY:**

__Buttons:__

(1) *"Clear"* - clears the canvas, deletes dictionary, removes all constraints and objective function.

(2)*"Example"* - when pressed, this button loads one of the 12 hardcoded examples. The choice menu to the right of the "example" button selects which example to load.

(3) *"Refresh/Zoom"* - refreshes the canvas with the zoom value specified in the textfield to the right of the button. The larger the zoom value, the closer the zoom. The dictionary and constraints remain unaffected with this operation.

(4)*"Feas. Cones"* - if an LP is loaded, then the canvas will display the dual feasible cones of all primal feasible vertices (intersection points). To remove the cones, simply press "Refresh/Zoom"

(5)*"All Cones"* - if an LP is loaded, then the canvas will display the dual feasible cones of all vertices (intersection points). To remove the cones, simply press "Refresh/Zoom"

(6)*"Draw Obj"* - if an LP is loaded, then the canvas will display the normal of the objective function at the current vertex (current dictionary). Use this feature in conjuction with the cones.

(7)*"Cone/Path"* - switch from displaying pivot path to displaying current cone only.

(8)*"Pivot"* - attempts to pivot the variables selected in the two choice menus to the left of the button. During a pivot operation, one variable enters the basis, and one leaves.

(9)*"Add Constraint"* - adds the constraint specified by the integer inputs in the 3 textfields to the left of the button. This operation re-initializes the dictionary and the canvas.

(10)*"Change Objective"* - changes the objective function. This operation re-initializes the dictionary and canvas.

(11) *"Remove Constraint"* - removes the constraint specified by the choice menu to the right of the button. This operation re-initializes the dictionary and canvas.