1 / 25

CS 270, Spring 2013 Project A Visual TOOL FOR THE simplex method in LP

Soham Uday Mehta. CS 270, Spring 2013 Project A Visual TOOL FOR THE simplex method in LP. Linear Programming in 3 variables. Subject to. Goals. Visualize the convex feasible region specified by constraints (in 3D). Goals.

milly
Download Presentation

CS 270, Spring 2013 Project A Visual TOOL FOR THE simplex method in LP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SohamUday Mehta CS 270, Spring 2013 ProjectA Visual TOOL FOR THE simplex method in LP

  2. Linear Programming in 3 variables • Subject to

  3. Goals • Visualize the convex feasible region specified by constraints (in 3D)

  4. Goals • Visualize the convex feasible region specified by constraints (in 3D) • Visualize Simplex Algorithm to solve the LP (simple version)

  5. Visualization • Each constraint becomes a polygon bounding the convex feasible region

  6. Visualization • Each constraint becomes a polygon bounding the convex feasible region • Start with 3 Quads for • Assume we have all polygons for current convex region and we want to add a new constraint

  7. Visualization • Each constraint becomes a polygon bounding the convex feasible region • Start with 3 Quads for • Assume we have all polygons for current convex region and we want to add a new constraint • Need to clip all polygons by new constraint

  8. Visualization • Find the ‘side’ of plane each vertex of polygon is on • If an edge of poly cuts plane, add new vertex and remove the ‘wrong’ side vertex

  9. Visualization • Each constraint may also create a new polygon

  10. Visualization • Each constraint may also create a new polygon

  11. Visualization • Each constraint may also create a new polygon • Store ‘new’ vertices created by clipping existing polygons

  12. Visualization • Each constraint may also create a new polygon • Store ‘new’ vertices created by clipping existing polygons • Remove duplicates

  13. Visualization • Each constraint may also create a new polygon • Store ‘new’ vertices created by clipping existing polygons • Remove duplicates, re-order vertices, and create new poly

  14. Simplex Algorithm • Start with a random vertex

  15. Simplex Algorithm • Start with a random vertex • Find extreme directions at current vertex • Pick maximum improvement direction • If no improvement in any direction, stop

  16. Simplex Algorithm • Start with a random vertex • Find extreme directions at current vertex • Pick maximum improvement direction • If no improvement in any direction, stop • Find max. feasible step and move to next vertex • Go back to 2

  17. Choosing the start vertex • First add 1 auxiliary variable to each constraint to convert it to an equation, create matrix • Randomly choose from the and set to , solve the equations for rest If matrix is not invertible or some , solve with different choice The ones set to zero are called non-basic, rest are basic – store this in a boolean vector “B”

  18. Choosing the start vertex • First add 1 auxiliary variable to each constraint to convert it to an equation, create matrix • Randomly choose from the and set to , solve the equations for rest • If matrix is not invertible or some , solve with different choice • The ones set to zero are called non-basic, rest are basic – store this in a boolean vector “B”

  19. Finding directions at any vertex • Each non-basic variable gives a direction For , set 1 non-basic value to 1, other two to 0 and solve for rest (free upto a constant) Pick direction which gives maximum If all directions give , reached maximum, STOP

  20. Finding directions at any vertex • Each non-basic variable gives a direction • For , set 1 non-basic value to 1, other two to 0 and solve for rest (free upto a constant) • Pick direction which gives maximum • If all directions give , reached maximum, STOP

  21. Finding the next vertex • Choose step size • Move to next vertex

  22. Finding the next vertex • Choose step size • Move to next vertex • Update “B” vector to correspond to new vertex: non-basic generating the max direction becomes basic, the basic fixing becomes non-basic

  23. Conclusion • Will be available for download

  24. Conclusion • Will be available for download • Thanks for your attention • Comments / Questions?

More Related