Presentation is loading. Please wait.

Presentation is loading. Please wait.

CONTENTS BASIC CONCEPTS EXERCISES DIET PROBLEM Linear programming problems Graphical method of solution Problem 1 Problem 2 Problem 3 Graphical solution.

Similar presentations


Presentation on theme: "CONTENTS BASIC CONCEPTS EXERCISES DIET PROBLEM Linear programming problems Graphical method of solution Problem 1 Problem 2 Problem 3 Graphical solution."— Presentation transcript:

1

2

3 CONTENTS BASIC CONCEPTS EXERCISES DIET PROBLEM Linear programming problems Graphical method of solution Problem 1 Problem 2 Problem 3 Graphical solution exercise REFERENCES

4 DIET PROBLEM neos.mcs.anl.gov/CaseStudies/dietpy/WebForms/table.html Weight is a big problem in our live, but do you know that there are some linear programming online solutions ? Diet Problem From here I invite you to visit the following link and have more benefits in your life.

5 WHO WE ARE? WHO WE ARE HANAN HASAN AL-MARHABI GRADUATED FROM KING ABDULAZIZ UNIVERSITY WORK AS A TEACHER ASSESTANT IN KING SAUD UNIVERSITY FOR MORE INFORMATION, WELCOME AT HANANS WEBSITE TO:

6 Basic concepts involve ; BASIC CONCEPTS - Linear programming problems - Graphical method of solution

7 LINEAR PROGRAMMING PROBLEMES BASIC CONCEPTS A linear programming problem is one in which we are to find the maximum or minimum value of a linear expression; (called the objective function), It would be Max z Or Min c subject to a number of linear constraints of the form aX1 + bX2 + cX N aX1 + bX2 + cX Or aX1 + bX2 + cX N. X1, X2, X3,...> 0

8 LINEAR PROGRAMMING PROBLEMES BASIC CONCEPTS The largest or smallest value of the objective function is called the optimal value, and a collection of values of X1, X2, X3,... that gives the optimal value constitutes an optimal solution. The variables X1, X2, X3,... are called the decision variables. EXSERCISE

9 LINEAR PROGRAMMING PROBLEMES BASIC CONCEPTS If the objective function is And the constraints are; 4X 1 + 3X 2 – X 3 3 Max z = 3X 1 - 2X 2 + 4X 3 X 1 + 2X 2 + X 3 4 X 1, X 2, X 3,...> 0 Why can't I simply choose, say, X 3 to be really large (X 3 = 1,000,000 say) and thereby make Max z as large as I want? You can't because; A - That would make z too large. B – You have to change X1 first. C – It would violate the second constrain.

10 GRAPHICAL METHOD OF SOLUTION BASIC CONCEPTS The graphical method for solving linear programming problems in two unknowns is as follows; A- Graph the feasible region by Draw the line ax + by = c...(1) For each constraint,. B- Compute the coordinates of the corner points. C- Substitute the coordinates of the corner points into the objective function to see which gives the optimal value. D- Optimal solutions always exist when the feasible region is bounded, but may or may not exist when the feasible region is unbounded. X2X2 X1X1

11 EXERCISES Problem 1 Problem 2 problem 3 Graphical solution exercise

12 EXERCISES A cargo plane has three compartments for storing cargo: front, centre and rear. These compartments have the following limits on both weight and space: CompartmentWeight capacity (tones)Space capacity (cubic meters) Front Center rear Furthermore, the weight of the cargo in the respective compartments must be the same proportion of that compartment's weight capacity to maintain the balance of the plane. Problem 1

13 EXERCISES The following four cargoes are available for shipment on the next flight: Any proportion of these cargoes can be accepted. The objective is to determine how much (if any) of each cargo C1, C2, C3 and C4 should be accepted and how to distribute each among the compartments so that the total profit for the flight is maximized. Cont … CargoWeight capacity (tones)Volume (cubic meters/tone) Profit (£/tone) C C C C Formulate the above problem as a linear program

14 EXERCISES constraints : here I have 4 cargoes and I need to distribute them among three compartments in the plane, Cargoes : C1, C2, C3, C4 Compartments : front, center, rear My problem is search how can I get best distribution that subject to mentioned constraints. solution Here I have tow major types of constraints, Cargoes constraints - compartment constraints

15 EXERCISES Cont … First : cargo constraints : Weights constraints of each cargo respected among each compartment, and as I have 4 cargoes I will have 4 constraints C1C2C3C4 X 11 + X 12 +X 13 let assume X ij, i =cargo, j = plane compartment < 18 X 21 + X 22 +X 23 < 15 X 31 + X 32 +X 33 < 23 X 41 + X 42 +X 43 < 12 Weights

16 EXERCISES Cont … Second: compartment constraints : here I have 3 compartments so I will have 4 constraints related to weights and volumes as mentioned. C1C2C3C4 X 11 + X 21 +X 31 let assume X ij, i =cargo, j = plane compartment < 10 Weight constraints +X 41 X 12 + X 22 +X 32 < 16 +X 42 X 13 + X 23 +X 33 < 8 +X X X X 31 < 6800 Volume constraints +390X X X X 32 < X X X X 33 < X 43

17 EXERCISES Final constraints is Cont… those proportions should be same, so proportion for any compartment equal to all cargos divided by weight of that compartment, so constraint will be : the weight of the cargo in the respective compartments must be the same proportion of that compartment's weight capacity to maintain the balance of the plane X 11 + X 21 +X 31 +X = X 12 + X 22 +X 32 +X X 13 + X 23 +X 33 +X 43 = 8 X ij > 0

18 EXERCISES Objective Cont… The objective is to maximize total profit : 310(X 11 + X 12 +X 13 ) + 380(X 21 + X 22 +X 23 ) + 350(X 31 + X 32 +X 33 ) (X 41 + X 42 +X 43 ) Max z =

19 EXERCISES A company manufactures four products (1,2,3,4) on two machines (X and Y). The time (in minutes) to process one unit of each product on each machine is shown below: The profit per unit for each product (1,2,3,4) is £10, £12, £17 and £8 respectively. Product 1 must be produced on both machines X and Y but products 2, 3 and 4 can be produced on either machine. Problem 2 product XY

20 EXERCISES The factory is very small and this means that floor space is very limited. Only one week's production is stored in 50 square meters of floor space where the floor space taken up by each product is 0.1, 0.15, 0.5 and 0.05 (square meters) for products 1, 2, 3 and 4 respectively. Customer requirements mean that the amount of product 3 produced should be related to the amount of product 2 produced. Over a week approximately twice as many units of product 2 should be produced as product 3. Cont …. Machine X is out of action (for maintenance/because of breakdown) 5% of the time and machine Y 7% of the time. Assuming a working week 35 hours long formulate the problem of how to manufacture these products as a linear program.

21 EXERCISES So variables are : here 4 products produced by tow machines solution Let assume X i = the amount of product i(1,2,3,4) produced by machine X Y i = the amount of product (1,2,3,4) produced by machine Y each product can be produced by any of tow machines so will expressed by tow variables (X2, Y2). ( X3,Y3), (X4,Y4 ), just product 1 should produced by both machines so it will expressed on one variable ( X1 ) X1, X2, Y2, X3, Y3, X4, Y4

22 EXERCISES Constraints : Cont… Floor space : The factory is very small and this means that floor space is very limited. Only one week's production is stored in 50 square meters of floor space where the floor space taken up by each product is 0.1, 0.15, 0.5 and 0.05 (square meters) for products 1, 2, 3 and 4 respectively. 0.1X (X 2 + Y 2 )+ 0. 5(X 3 + Y 3 ) (X 4 + Y 4 )< 50 Costumer requirement : Over a week approximately twice as many units of product 2 should be produced as product 3. X2X2 + Y 2 = 2(X 3 + Y 3 ) Available time : Machine X is out of action (for maintenance/becaus e of breakdown) 5% of the time and machine Y 7% of the time. 10X X 2 +13X 3 < X 4 (35)(60) 27Y Y 2 +33Y 3 < +23Y (35)(60) X ij > 0

23 EXERCISES Objective : Cont… 10X (X 2 + Y 2 )+ 17(X 3 + Y 3 )+ 8(X 4 + Y 4 ) The profit per unit for each product (1,2,3,4) is £10, £12, £17 and £8 respectively. Max z =

24 EXERCISES A company assembles four products (1, 2, 3, 4) from delivered components. The profit per unit for each product (1, 2, 3, 4) is £10, £15, £22 and £17 respectively. The maximum demand in the next week for each product (1, 2, 3, 4) is 50, 60, 85 and 70 units respectively. Problem 3 SagesProduct 1Product 2Prod6uct 3Product 4 A2211 B2412 C3615 There are three stages (A, B, C) in the manual assembly of each product and the man-hours needed for each stage per unit of product are shown below:

25 EXERCISES The nominal time available in the next week for assembly at each stage (A, B, C) is 160, 200 and 80 man-hours respectively. Cont… It is possible to vary the man-hours spent on assembly at each stage such that workers previously employed on stage B assembly could spend up to 20% of their time on stage A assembly and workers previously employed on stage C assembly could spend up to 30% of their time on stage A assembly. Production constraints also require that the ratio (product 1 units assembled)/(product 4 units assembled) must lie between 0.9 and Formulate the problem of deciding how much to produce next week as a linear program.

26 EXERCISES here 4 products produced solution Let assume X i = the amount of product i(1,2,3,4) produced by machine X Variables : X1, X2, X3, X4 additional transferred time variables : T BA,T CA T BA be the amount of time transferred from B to A T CA be the amount of time transferred from C to A

27 EXERCISES Constraints : Cont… Maximum demand : The maximum demand in the next week for each product (1, 2, 3, 4) is 50, 60, 85 and 70 units respectively. X1X1 <50X2X2 <60 X3X3 < 85 Work time : The nominal time available in the next week for assembly at each stage (A, B, C) is 160, 200 and 80 man-hours respectively. workers previously employed on stage B assembly could spend up to 20% of their time on stage A assembly and workers previously employed on stage C assembly could spend up to 30% of their time on stage A assembly. 2X 1 +2 X 2 + X 3 < X 4 2X 1 + 4X 2 +X 3 <+2X X3X3 < 70 3X 1 + 6X 2 +X 3 <+5X T BA + T CA - T BA - T CA T BA <0.2(200) T CA <0.3(80)

28 EXERCISES Constraints : Cont… Ratio constraint : the ratio (product 1 units assembled)/(product 4 units assembled) must lie between 0.9 and < X1 X4X4 <1.15 The profit per unit for each product (1, 2, 3, 4) is £10, £15, £22 and £17 respectively 10X X X X 4 Objective : Max z = X ij > 0

29 EXERCISES Max Z = 50x + 18y Subject to the constraints : 2X + Y < 100 X + Y < 80 X, Y > 0 Graphical solution exercise Sep 1 : Turn constrains into equations 2X + Y = 100 X + Y = 80

30 EXERCISES Cont… Sep 2 : Draw straight lines for the following equations, 2X + Y = 100 X + Y = 80 To determine tow points on straight line 2X + Y = 100 Put Y = 0 2X = 100 => X = 50 Put X = 0 y = 100 => Y = 100 (50, 0), (0, 100 ) are the points on the line (1) To determine tow points on straight line X + Y = 80 Put Y = 0 X = 80 => X = 80 Put X = 0 y = 80 => Y = 80 (80, 0), (0, 80 ) are the points on the line (2)

31 EXERCISES Cont… (50, 0), (0, 100 ) line (1) (80, 0), (0, 80 ) line (2) Y X (0, 100 ) (0, 80 ) (50, 0)(80, 0) A- Draw the feasible. B- Mark the corner points then determine values of (X,Y ) on each corners point. (0, 0 ) A B C D (20, 60 )

32 EXERCISES Cont… Y X (0, 100 ) (0, 80 ) (50, 0)(80, 0) (0, 0 ) A B C D (20, 60 ) Step 3 : Substitute the coordinates of the corner points into the objective function to see which gives the optimal value. Corner pointsO.F.O.S. A ( 0, 80 ) B ( 20, 60 ) C ( 50, 0 ) D ( 0, 0 ) 50 (0) + 18 (80)= (20) + 18 (60)= (50) + 18 (0)= (0) + 18 (0)= 0 B ( 20, 60 ) X = 20 Y = 60 Max z = 2080

33 EXERCISES Cont… Accurate results : By use the mathematical method 2X + Y = 100 X + Y = 80 Then use ( X=20 ) to determine Y on any equation (- 1 ) × X = 20 X + Y = 80 X = 20 Y = 80 X + Y = ( 20, 80 ) Max Z = 50x + 18y = 50 (20) + 18 (60)= 2080

34 REFERENCES ; REFERENCES and-probability/linear-programming/graphical-solution- linear-programming.php Summary4.html


Download ppt "CONTENTS BASIC CONCEPTS EXERCISES DIET PROBLEM Linear programming problems Graphical method of solution Problem 1 Problem 2 Problem 3 Graphical solution."

Similar presentations


Ads by Google