Presentation is loading. Please wait.

Presentation is loading. Please wait.

SOLVING LINEAR PROGRAMS Dr. Ron Lembke. Solving LPs Need a more formal method How to find points to solve for? A picture is worth a thousand words.

Similar presentations


Presentation on theme: "SOLVING LINEAR PROGRAMS Dr. Ron Lembke. Solving LPs Need a more formal method How to find points to solve for? A picture is worth a thousand words."— Presentation transcript:

1 SOLVING LINEAR PROGRAMS Dr. Ron Lembke

2 Solving LPs Need a more formal method How to find points to solve for? A picture is worth a thousand words

3 Standard Form Linear programs are written the following way: Max20S+25T s.t.0.5S+0.2T<=40 0.25S+0.5T<=56 S>=0 T>=0 Space Time

4 Graphical Solution 020406080 80 20 40 60 0 100 Sweatshirts T-shirts T S Draw a picture to represent the feasible combinations of S and T, that meet all of the constraints, and find the best point Draw a line of all points that would exactly use up all of the space, and a line of all the points that would exactly use up all of the time

5 Endpoints of constraints Space:0.5S+0.2T<=40 If S=0, then 0.2T=40, so T=200 (0,200) If T=0, then 0.5S=40, so S=80 (80,0) Time: 0.25S+0.5T<=56 If S=0, 0.5T=56, so T=112(0,112) If T=0, 0.25S=56, so S=224(224,0) Hey! These look familiar!

6 Graphical Solution 050100150200 160 40 80 120 0 200 Sweatshirts T-shirts T S Draw a line to represent Space constraint Space Constraint S=0, T=200 S=80, T=0

7 Graphical Solution 050100150200 160 40 80 120 0 200 Sweatshirts T-shirts T S Draw a line to represent Time constraint Time Constraint S=0, T=112 S=224, T=0

8 Graphical Solution 160 40 80 120 0 200 Sweatshirts T-shirts T S Green area satisfies all constraints “Feasible Region” Time Constraint S=0, T=112 Space S=80, T=0 050100150200

9 Graphical Solution 160 40 80 120 0 200 Sweatshirts T-shirts T S Last time, we started at (0,112) in search of a better solution. We traded 1 T for 2S, which kept the amount of time used constant, and kept doing that until we used up all of the space (that is, hit the space constraint). Time Constraint S=0, T=112 Space S=80, T=0 050100150200

10 Graphical Solution 160 40 80 120 0 200 Sweatshirts T-shirts T S Where do constraints intersect? Where the lines cross - the point is on both 0.5S + 0.2 T= 40 0.25S + 0.5T= 56 So for S and T. Two equations, two unknowns Algebra! Woohoo!! Time Constraint S=0, T=112 Space S=80, T=0 050100150200

11 Graphical Solution 160 40 80 120 0 200 Sweatshirts T-shirts T S Multiply one (or both) to get same coefficients 0.5S + 0.2 T=40 [0.25S+ 0.5T =56] x2 becomes 0.5S + 1 T = 112 -[0.5S + 0.2T = 40] subtract the first one ----------------------------- 0S + 0.8T = 72, so T = 72/0.8 = 90 Substitute into any of the three equations: 0.5S + 0.2*90 = 40, so 0.5S = 40-18 = 22 So S =22/0.5 = 44 Optimal = (44, 90) Time S=0, T=112 Space S=80, T=0 050100150200

12 Evaluate Profits at Intersection Points 160 40 80 120 0 200 Sweatshirts T-shirts T S S = 44, T=90 Z=20*44 + 25*90 = 880 + 2250 = 3,130 Time S=0, T=112 Z=20*0+25*112 = 2,800 Space S=80, T=0 Z=20*80 +25*0 = 1600 050100150200

13 Edge Points Better than Interior Points 160 40 80 120 0 200 050100150200 A BC A has to be better than B C has to be better than B To figure out if A or C is better, have to evaluate the objective function at both.

14 Corner Points Better than Middle Edge 160 40 80 120 0 200 050100150200 E D F IF E is better than D, then F will be better than D or E Or, IF E is better than F, D will be better than E or F. Using same logic, either F or H has to be better than G. One has to be better than G. G H

15 Find all the Corner Points of Feasible Space 160 40 80 120 0 200 050100150200 There can be many, many constraints. Find the feasible space. Ignore constraints that don’t border it. Constraints can be vertical or horizontal.

16 Solution Method (For 2 variables only) 1. Find end points of each constraint 2. Draw constraints 3. Figure out which intersections are interesting 4. Use algebra to solve for intersection pts 5. Find profits (or costs) of intersections 6. Choose the best one


Download ppt "SOLVING LINEAR PROGRAMS Dr. Ron Lembke. Solving LPs Need a more formal method How to find points to solve for? A picture is worth a thousand words."

Similar presentations


Ads by Google