1 / 112

Linear Programming

Linear Programming. David Kauchak cs161 Summer 2009. Administrative. Questions for the last class Final Review session 8/12 3:15-5:05pm in Skilling Auditorium – e-mail questions Sample final available NP complete vs. LP problems Course evaluations. Linear programming.

Télécharger la présentation

Linear Programming

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. Linear Programming David Kauchak cs161 Summer 2009

  2. Administrative • Questions for the last class • Final • Review session 8/12 3:15-5:05pm in Skilling Auditorium – e-mail questions • Sample final available • NP complete vs. LP problems • Course evaluations

  3. Linear programming • A linear function is a function of n variables defined by • A linear equality is a linear function with an equality constraint • A linear inequality is a linear function with an inequality constraint

  4. Linear programming • A linear programming problem consists of two parts • a linear function to maximize or minimize • subject to a set of linear constraints …

  5. For example objective function constraints

  6. For example

  7. For example

  8. For example

  9. For example

  10. For example

  11. For example the constraints define the feasible region

  12. For example What are the values of xi that maximize the function within the feasible region?

  13. Another example • A chocolatier has two products: a basic product and a deluxe. The company makes x1 boxes of the basic per day at a profit of $1 each and x2 boxes of the deluxe at a profit of $6 each. The daily demand is 200 of the basic and 300 of the deluxe. The workforce can create 400 boxes of chocolate per day. How much of each should they create to maximize profits?

  14. Another example • A chocolatier has two products: a basic product and a deluxe. The company makes x1 boxes of the basic per day at a profit of $1 each and x2 boxes of the deluxe at a profit of $6 each. The daily demand is 200 of the basic and 300 of the deluxe. The workforce can create 400 boxes of chocolate per day. How much of each should they create to maximize profits? How many variables do we need to model the problem?

  15. Another example • A chocolatier has two products: a basic product and a deluxe. The company makes x1 boxes of the basic per day at a profit of $1 each and x2 boxes of the deluxe at a profit of $6 each. The daily demand is 200 of the basic and 300 of the deluxe. The workforce can create 400 boxes of chocolate per day. How much of each should they create to maximize profits? x1 = number of boxes per day of basic x2 = number of boxes per day of deluxe

  16. Another example • A chocolatier has two products: a basic product and a deluxe. The company makes x1 boxes of the basic per day at a profit of $1 each and x2 boxes of the deluxe at a profit of $6 each. The daily demand is 200 of the basic and 300 of the deluxe. The workforce can create 400 boxes of chocolate per day. How much of each should they create to maximize profits? What are the constraints?

  17. Another example • A chocolatier has two products: a basic product and a deluxe. The company makes x1 boxes of the basic per day at a profit of $1 each and x2 boxes of the deluxe at a profit of $6 each. The daily demand is 200 of the basic and 300 of the deluxe. The workforce can create 400 boxes of chocolate per day. How much of each should they create to maximize profits?

  18. Another example • A chocolatier has two products: a basic product and a deluxe. The company makes x1 boxes of the basic per day at a profit of $1 each and x2 boxes of the deluxe at a profit of $6 each. The daily demand is 200 of the basic and 300 of the deluxe. The workforce can create 400 boxes of chocolate per day. How much of each should they create to maximize profits? any others?

  19. Another example • A chocolatier has two products: a basic product and a deluxe. The company makes x1 boxes of the basic per day at a profit of $1 each and x2 boxes of the deluxe at a profit of $6 each. The daily demand is 200 of the basic and 300 of the deluxe. The workforce can create 400 boxes of chocolate per day. How much of each should they create to maximize profits? What function are we trying to maximize/minimize?

  20. Another example • A chocolatier has two products: a basic product and a deluxe. The company makes x1 boxes of the basic per day at a profit of $1 each and x2 boxes of the deluxe at a profit of $6 each. The daily demand is 200 of the basic and 300 of the deluxe. The workforce can create 400 boxes of chocolate per day. How much of each should they create to maximize profits?

  21. 400 300 200 100 100 200 300 400 Another example

  22. 400 300 200 100 100 200 300 400 Another example Where is the feasibility region?

  23. 400 300 200 100 100 200 300 400 Another example Where is the maximum within the feasibility region?

  24. 400 300 200 100 100 200 300 400 Another example c = 2100 c = 1800 c = 1500 c = 1200 c = 900 c = 600

  25. 400 300 200 100 100 200 300 400 Another example c = 2100 c = 1800 c = 1500 c = 1200 c = 900 c = 600 to maximize, move as far in this direction as the constraints allow

  26. 400 300 200 100 100 200 300 400 Solutions to LPs • A solution to an LP is a vertex on the feasibility polygon • the very last feasible point in the direction of improving objective function c = 2100 c = 1800 c = 1500 c = 1200 c = 900 c = 600

  27. 400 300 200 100 100 200 300 400 Solutions to LPs • A solution to an LP is a vertex on the feasibility polygon • the very last feasible point in the direction of improving objective function • Except…

  28. 400 300 200 100 100 200 300 400 Solutions to LPs • A solution to an LP is a vertex on the feasibility polygon • the very last feasible point in the direction of improving objective function • Except…

  29. 400 300 200 100 100 200 300 400 Solutions to LPs • A solution to an LP is a vertex on the feasibility polygon • the very last feasible point in the direction of improving objective function • Except…

  30. Solutions to LPs • A solution to an LP is a vertex on the feasibility polygon • the very last feasible point in the direction of improving objective function • Except… linear program is infeasible

  31. Solutions to LPs • A solution to an LP is a vertex on the feasibility polygon • the very last feasible point in the direction of improving objective function • Except… linear program is unbounded

  32. More products • The chocolatier decides to introduce a third product line called premium with a profit of $13. We still can only produce 400 units per day. The deluxe and premium products require the same packaging machinery. Deluxe uses one unit and premium uses 3 units. We have a total of 600 units a day of this packaging material. what changes?

  33. More products • The chocolatier decides to introduce a third product line called premium with a profit of $13. We still can only produce 400 units per day. The deluxe and premium products require the same packaging machinery. Deluxe uses one unit and premium uses 3 units. We have a total of 600 units a day of this packaging material. Introduce a new variable x3

  34. More products • The chocolatier decides to introduce a third product line called premium with a profit of $13. We still can only produce 400 units per day. The deluxe and premium products require the same packaging machinery. Deluxe uses one unit and premium uses 3 units. We have a total of 600 units a day of this packaging material. Introduce a new constraint

  35. More products • The chocolatier decides to introduce a third product line called premium with a profit of $13. We still can only produce 400 units per day. The deluxe and premium products require the same packaging machinery. Deluxe uses one unit and premium uses 3 units. We have a total of 600 units a day of this packaging material. Introduce a new constraint

  36. More products • The chocolatier decides to introduce a third product line called premium with a profit of $13. We still can only produce 400 units per day. The deluxe and premium products require the same packaging machinery. Deluxe uses one unit and premium uses 3 units. We have a total of 600 units a day of this packaging material.

  37. More products • The chocolatier decides to introduce a third product line called premium with a profit of $13. We still can only produce 400 units per day. The deluxe and premium products require the same packaging machinery. Deluxe uses one unit and premium uses 3 units. We have a total of 600 units a day of this packaging material. modify existing constraints

  38. More products • The chocolatier decides to introduce a third product line called premium with a profit of $13. We still can only produce 400 units per day. The deluxe and premium products require the same packaging machinery. Deluxe uses one unit and premium uses 3 units. We have a total of 600 units a day of this packaging material. Anything else?

  39. More products • The chocolatier decides to introduce a third product line called premium with a profit of $13. We still can only produce 400 units per day. The deluxe and premium products require the same packaging machinery. Deluxe uses one unit and premium uses 3 units. We have a total of 600 units a day of this packaging material. modify the objective function

  40. More products • The chocolatier decides to introduce a third product line called premium with a profit of $13. We still can only produce 400 units per day. The deluxe and premium products require the same packaging machinery. Deluxe uses one unit and premium uses 3 units. We have a total of 600 units a day of this packaging material. What does the feasibility region look like?

  41. Feasibility region • For n variables, the feasibility region is a polyhedron in Rn (i.e. n-dimensional space) • Each constraint defines a Rn-1 plane and the inequality a half-space on one side of the plane adapted from figure 7.2 of [1]

  42. Feasibility region • For n variables, the feasibility region is a polyhedron in Rn (i.e. n-dimensional space) • Each constraint defines a Rn-1 plane and the inequality a half-space on one side of the plane

  43. Feasibility region • For n variables, the feasibility region is a polyhedron in Rn (i.e. n-dimensional space) • Each constraint defines a Rn-1 plane and the inequality a half-space on one side of the plane

  44. Feasibility region • For n variables, the feasibility region is a polyhedron in Rn (i.e. n-dimensional space) • Each constraint defines a Rn-1 plane and the inequality a half-space on one side of the plane

  45. Feasibility region • For n variables, the feasibility region is a polyhedron in Rn (i.e. n-dimensional space) • Each constraint defines a Rn-1 plane and the inequality a half-space on one side of the plane

  46. Feasibility region • For n variables, the feasibility region is a polyhedron in Rn (i.e. n-dimensional space) • Each constraint defines a Rn-1 plane and the inequality a half-space on one side of the plane

  47. Vector/matrix form

  48. Vector/matrix form c: [1, 6, 13] A: [ 1, 0, 0

  49. Vector/matrix form c: [1, 6, 13] A: [ 1, 0, 0

  50. Vector/matrix form c: [1, 6, 13] A: [ 1, 0, 0 0, 1, 0

More Related