LinearProgramming1 Docx
LinearProgramming1 Docx
Problem Set 1
5. Weenies and Buns is a food processing plant which manufactures hot dogs and hot dog buns. They
grind their own flour for the hot dog buns at a maximum rate of 200 pounds per week. Each hot dog
bun requires 0.1 pound of flour. They currently have a contract with Pigland, Inc., which specifies
that a delivery of 800 pounds of pork product is delivered every Monday. Each hot dog requires
pound of pork product. All the other ingredients in the hot dogs and hot dog buns are in plentiful
supply. Finally, the labor force at Weenies and Buns consists of 5 employees working full time (40
hours per week each). Each hot dog requires 3 minutes of labor, and each hot dog bun requires 2
minutes of labor. Each hot dog yields a profit of $0.88, and each bun yields a profit of $0.33.Weenies
and Buns would like to know how many hot dogs and how many hot dog buns they should produce
each week to achieve the highest possible profit.
a. Formulate a linear programming model for this problem.
b. Use the graphical method to solve this model.
SOLUTION:
(a) Let x be the number of hot dogs produced each week and y be the number of hot dog buns
produced each week. The objective function is the profit, which is 0.20x + 0.10y. The constraints are:
- Flour constraint: 0.1y <= 200
- Pork product constraint: 0.25x <= 800
- Labor constraint: 3x + 2y <= 5 * 40 * 60 (5 employees working 40 hours per week, with 60
minutes per hour)
- Non-negativity constraint: x >= 0, y >= 0
The linear programming model is:
Z = 0.88x1 + 0.33x2
0.1x2 ≤ 200
0.25 x1 ≤ 800
3x1+2x2 ≤ 12000
(b) To solve the model graphically, we need to plot the constraints and find the feasible region. The
feasible region is the set of points that satisfy all the constraints. We can find the intersection points
of the constraints by solving the equations:
0.1 x2 = 200 x2 = 2000
0.25 x1 = 800 x1 = 3200
3x + 2y = 5 * 40 * 60 => y = 1500 - 1.5x
The feasible region is a quadrilateral bounded by the x-axis, the y-axis, the line y = 2000, and the line
y = 1500 - 1.5x. The corner points of the feasible region are (0,0), (0,2000), (1200,1500), and (3200,0).
We can substitute these points into the objective function to find the maximum profit:
0.20(0) + 0.10(0) = 0
0.20(0) + 0.10(2000) = 200
0.20(1200) + 0.10(1500) = 330
0.20(3200) + 0.10(0) = 640
The maximum profit is 640, which occurs at the point (3200,0). Therefore, the optimal solution is to
produce 3200 hot dogs and 0 hot dog buns each week.
0.25 x1 = 800
0.1 x2 = 200
Z = 0.88x1 + 0.33x2
3.1-11
The Omega Manufacturing Company has discontinued the production of a certain unprofitable
product line. This act created considerable excess production capacity. Management is considering
devoting this excess capacity to one or more of three products; call them products 1, 2, and 3. The
available capacity on the machines that might limit output is summarized in the following table:
The number of machine hours required for each unit of the respective products is
The sales department indicates that the sales potential for products 1 and 2 exceeds the maximum
production rate and that the sales potential for product 3 is 20 units per week. The unit profit
would be $50, $20, and $25, respectively, on products 1, 2, and 3. The objective is to determine
how much of each product Omega should produce to maximize profit.
(a) Formulate a linear programming model for this problem.
(b) Solve this model by the simplex method.
a-
xi =the number of units of product i produced for i=1,2,3
x1: # Product 1
x2: # Product 2
x3: # Product 3
Constraints:
Machine Hours for Milling Machine: 9 x1 +3 x2 +5 x3 ≤ 500
Machine Hours for Lathe: 5 x1 +4 x2 ≤ 350
Machine Hours for Grinder: 3 x1 + 2 x3 ≤ 150
Sales Potential: x3≤ 20
Non-negativity; x1, x2, x3≥ 0
b- Simplex:
St
9 x1 + 3 x2 +5 x3 + s1 = 500
5 x1 + 4 x2 + s2 =350
3 x1 + +2 x3 + s3 = 150
x3 + s4 = 20
Manuel solution:
min ratio
iteration x1 x2 x3 s1 s2 s3 s4 RHS test
Z -50 -20 -25 0 0 0 0 0
s1 9 3 5 1 0 0 0 500 55,6
s2 5 4 0 0 1 0 0 350 70,0
s3 3 0 2 0 0 1 0 150 50,0
0 s4 0 0 1 0 0 0 1 20
x1 x2 x3 s1 s2 s3 s4 RHS
min ratio
Z 0 -20 8 1/3 0 0 16 2/3 0 2500 test
s1 0 3 -1 1 0 -3 0 50 16 2/3
s2 0 4 -3 1/3 0 1 -1 2/3 0 100 25
x1 1 0 2/3 0 0 1/3 0 50
1 s4 0 0 1 0 0 0 1 20
x1 x2 x3 s1 s2 s3 s4 RHS
min ratio
Z 0 0 1 2/3 6 2/3 0 -3 1/3 0 2833 1/3 test
x2 0 1 - 1/3 1/3 0 -1 0 16 2/3
s2 0 0 -2 -1 1/3 1 2 1/3 0 33 1/3 14 2/7
x1 1 0 2/3 0 0 1/3 0 50 150
2 s4 0 0 1 0 0 0 1 20
For the first iteration, we see that x1 is entering variable since -50 is the most minimum one. And s3
is the leaving variable since 50,from minimum ratio test, is the minimum one.
We want the intersection of entering variable and leaving variable (pivot cell) is to be 1. So for that,
we divide 3 to 3 and we get 1. And then we divide whole row to 3:
x1 x2 x3 s1 s2 s3 s4 RHS
Z 0 -20 8 1/3 0 0 16 2/3 0 2500
s1 0 3 -1 1 0 -3 0 50
s2 0 4 -3 1/3 0 1 -1 2/3 0 100
50
x1 1 (3/3) 0 (0/3) 2/3(2/3) 0 (0/3) 0 (0/3) 1/3(1/3) 0 (0/3) (150/3)
1 s4 0 0 1 0 0 0 1 20