0% found this document useful (0 votes)
15 views

Slides (Modeling With Linear Programming-Graphical)

Uploaded by

rukeerussel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Slides (Modeling With Linear Programming-Graphical)

Uploaded by

rukeerussel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Modeling with Linear

Programming
Introduction

 Linear Programming (LP) is a mathematical modeling technique designed


to optimize the usage of limited resources.
 A generalized model in OR takes the following form:
Maximize (or Minimize) Objective Function
subject to
Constraints
 A solution of the model is feasible if it satisfies all the constraints. It is optimal
if, in addition to being feasible, it yields the best (maximum or minimum)
value of the objective function.
Construction of the LP Model

 This section illustrates the basic elements of an LP model by using a simple


two-variable example and is solved by means of a graphical method. The
results provide concrete ideas for the solution and interpretation of the
general LP problem.
 Though two-variable problems rarely exist in practice, the ideas gleaned
from the graphical procedure lay the foundation for the development of
the general solution technique (called the simplex method).
 The LP model, as in any OR model, includes three basic elements:
① Decision variables that we seek to determine
② Objective (goal) that we aim to optimize
③ Constraints that we need to satisfy
Example 1
(Pintura Company)

Pintura produces interior and exterior paints from two raw materials, M1 and M2. The
following table provides the data regarding the production restrictions on raw materials:
Tons of Raw Materials per ton of: Maximum daily
Exterior Paint Interior Paint availability (in tons)
Raw Material, M1 6 4 24
Raw Material, M2 1 2 6
Profit per ton (in millions of Php) 5 4
The daily demand for interior paint cannot exceed that of exterior paint by more than 1 ton.
Additionally, a market survey restricts the maximum daily demand of interior paint to 2 tons.
Pintura wants to determine the optimum product mix of interior and exterior paints that
maximizes the total daily profit.
Example 1
(Pintura Company)

 The proper definition of the decision variables is an essential first step toward the
development of the LP model. Once the variables are defined, the task of constructing
the objective function and the constraints should not be difficult.
 For the Pintura problem, we need to determine the daily quantities, in number of tons, to
be produced of exterior and interior paints. The variables of the model are thus defined
as:
𝑥1 = tons produced daily of exterior paint
𝑥2 = tons produced daily of interior paint
And letting 𝑧 represent the total daily profit (in millions of Php), the objective of the
company is:
Maximize 𝑧 = 5𝑥1 + 4𝑥2
Example 1
(Pintura Company)

 The last element of the model deals with the constraints:


①The raw materials restrictions which can be expressed as:
Usage of a raw material Maximum raw material

by both paints availability
②There are two types of demand restrictions presented in the given problem:
(a) excess of daily production of interior paint over that of exterior paint should not
exceed 1 ton (market limit), and
(b) maximum daily demand of interior paint is limited to 2 tons (demand limit).
③An implicit (or “understood-to-be”) restriction is that the variables 𝑥1 and 𝑥2 cannot
assume negative values. The nonnegativity restrictions; that is, 𝑥1 ≥ 0 and 𝑥2 ≥ 0
account for this requirement.
Example 1
(Pintura Company)

 The complete LP model for the Pintural problem is:


Maximize 𝑧 = 5𝑥1 + 4𝑥2
subject to
6𝑥1 + 4𝑥2 ≤ 24
𝑥1 + 2𝑥2 ≤ 6
−𝑥1 + 𝑥2 ≤ 1
𝑥2 ≤ 2
𝑥1 , 𝑥2 ≥ 0
Properties of the LP Model

 In the preceding example, the objective and the constraints are all linear.
Linearity implies that the LP must satisfy three basic properties:
①Proportionality
This property requires the contribution of each decision variable in both
the objective function and the constraints to be directly proportional to
the value of the variable.
For example, in the Pintura model, the quantities 5𝑥1 and 4𝑥2 give the
profits for producing 𝑥1 and 𝑥2 tons of exterior and interior paints,
respectively, with the unit profits per ton, 5 and 4, providing the
constants of proportionality.
Properties of the LP Model

 In the preceding example, the objective and the constraints are all linear.
Linearity implies that the LP must satisfy three basic properties:
②Additivity
This property requires the total contribution of all the variables in the
objective function and in the constraints to be the direct sum of the
individual contributions of each variable.
In the Pintura model, the total daily profit equals the sum of the two
individual profit components.
Properties of the LP Model

 In the preceding example, the objective and the constraints are all linear.
Linearity implies that the LP must satisfy three basic properties:
③Certainty
All the objective and constraint coefficients of the LP model are
deterministic. This means that they are known constants─a rare
occurrence in real life, where data are more likely to be represented by
probabilistic distributions. In essence, LP coefficients are average-value
approximations of the probabilistic distributions. If the standard
deviations of these distributions are sufficiently small, then the
approximation is acceptable.
Graphical LP Solution

The graphical solution for an LP problem can be summarized into two basic
steps:
1. Determination of the Feasible Solution Space.
The feasible solution space of the problem represents the area in which all
the constraints are satisfied simultaneously.
2. Determination of the Optimal Solution.
From the standpoint of the LP model, what we really are interested in is the
optimal solution that yields the best (maximum or minimum) value of the
objective function.
An important characteristic of the optimum LP solution is that it is always
associated with a corner point (where two lines intersect) of the solution
space.
Solution of a Maximization LP Model
(Pintura Company)

Step 1. Determination of the Feasible Solution Space.


First, as shown in the following figure, let the horizontal axis 𝑥1 and the vertical
axis 𝑥2 represent the exterior and interior paint variables, respectively. Next,
consider the nonnegativity restrictions 𝑥1 ≥ 0 and 𝑥2 ≥ 0; these constraints
restrict the solution space to the first quadrant.
To account for the other constraints, replace each inequality with an
equation and then graph the resulting straight line by locating two distinct
points.
Next, consider the effect of the inequality. All it does is divide the 𝑥1 , 𝑥2 -
plane into two half-spaces, one on each side of the graphed line; only one of
these sides satisfies the inequality. A procedure for determining the feasible
side is to use a reference point.
Solution of a Maximization LP Model
(Pintura Company)

Step 1. Determination of the Feasible Solution Space.


Solution of a Maximization LP Model
(Pintura Company)

Step 2. Determination of the Optimal Solution.


The feasible solution space is delineated by the line segments joining the
corner points A, B, C, D, E, and F. Any point within or on the boundary of the
space ABCDEF is feasible. Because the feasible solution space ABCDEF
consists of an infinite number of points, we need a systematic procedure to
identify the optimal solution.
The determination of the optimal solution requires identifying the direction in
which the profit function 𝑧 = 5𝑥1 + 4𝑥2 increases (note that we want to
maximize 𝑧). We can do so by assigning arbitrary increasing values to 𝑧. The
profit 𝒛 thus can be increased in the direction shown in the figure until we
reach the point in the solution space beyond which any further increase will
put us outside the boundaries of ABCDEF. Such a point is the optimum.
Solution of a Maximization LP Model
(Pintura Company)

Step 2. Determination of the Optimal Solution.


Solution of a Maximization LP Model
(Pintura Company)

Step 2. Determination of the Optimal Solution.


Corner Point 𝒙𝟏 𝒙𝟐 𝒛
𝐴 0, 0 0 0 0
𝐵 4, 0 4 0 20
𝑪 𝟑, 𝟏. 𝟓 𝟑 𝟏. 𝟓 𝟐𝟏
𝐷 2, 2 2 2 18
𝐸 1, 2 1 2 13
𝐹 0, 1 0 1 4
The optimal solution is thus given by point C; that is, the optimum daily
product mix of 3 tons of exterior paint and 1.5 tons of interior paint will yield
the maximum daily profit of Php21M.
Solution of a Minimization LP Model
Example 2 (Euler Farms)

Euler Farms makes use of at least 800 lb of a special feed every day. The special feed is a
mixture of corn and soybean meal with the following compositions:
lb per lb of feeds
Feed Composition Cost ($/lb)
Protein Fiber
Corn 0.09 0.02 0.30
Soybean Meal 0.60 0.06 0.90
The dietary requirements of the special feed is that it should contain at least 30% protein and
at most 5% fiber. Euler Farms wishes to determine the daily minimum-cost feed mix.
Solution of a Minimization LP Model
Example 2 (Euler Farms)

Let
𝑥1 = lb of corn in the daily mix
𝑥2 = lb of soybean meal in the daily mix
𝑧 = total daily cost (in dollars)
1. Formulate the LP model for the given problem.
2. Determine the optimal solution using the graphical method.
Solution of a Minimization LP Model
Example 2 (Euler Farms)

Let
𝑥1 = lb of corn in the daily mix
𝑥2 = lb of soybean meal in the daily mix
𝑧 = total daily cost (in dollars)
1. Formulate the LP model for the given problem.
Minimize 𝑧 = 0.30𝑥1 + 0.90𝑥2
s.t.
𝑥1 + 𝑥2 ≥ 800 (Total volume of feeds in lb needed per day)
0.21𝑥1 − 0.30𝑥2 ≤ 0 (Protein dietary requirement)
0.03𝑥1 − 0.01𝑥2 ≥ 0 (Fiber dietary requirement)
𝑥1 , 𝑥2 ≥ 0 (Nonnegativity constraint)
Solution of a Minimization LP Model
Example 2 (Euler Farms)

Let
𝑥1 = lb of corn in the daily mix
𝑥2 = lb of soybean meal in the daily mix
𝑧 = total daily cost (in dollars)
2. Determine the optimal solution using the graphical method.
Corner Point 𝒙𝟏 𝒙𝟐 𝒛
𝟒𝟕𝟎. 𝟔, 𝟑𝟐𝟗. 𝟒 𝟒𝟕𝟎. 𝟔 𝟑𝟐𝟗. 𝟒 $𝟒𝟑𝟕. 𝟔𝟒
200, 600 200 600 $600.00

Hence, Euler Farms should use 470.6 lb of corn and 329.4 lb


of soybean meal in its daily feed mix to have the minimum
total daily cost of $437.64.
Exercises

1. A garment factory manufactures men’s shirts and women’s blouses. The


production process includes cutting, sewing, and packaging. The factory
employs 25 workers in the cutting department, 35 in the sewing
department, and 5 in the packaging department. Each employee works
an 8-hour shift per day for 5 days a week. The following table gives the
time requirements and profit per unit for the two garments:
Minutes per unit
Garment Cutting Sewing Packaging Profit/unit
Shirts 20 70 12 80
Blouses 60 60 4 120
Determine the optimal weekly production schedule for the garment
factory.
Exercises

1. LP Model:
max 𝒛 = 𝟖𝟎𝒙𝟏 + 𝟏𝟐𝟎𝒙𝟐
s.t.
20𝑥1 + 60𝑥2 ≤ 25 5 8 60 ► 𝒙𝟏 + 𝟑𝒙𝟐 ≤ 𝟑, 𝟎𝟎𝟎 ①
70𝑥1 + 60𝑥2 ≤ 35 5 8 60 ► 𝟕𝒙𝟏 + 𝟔𝒙𝟐 ≤ 𝟖, 𝟒𝟎𝟎 ②
12𝑥1 + 4𝑥2 ≤ 5 5 8 60 ► 𝟑𝒙𝟏 + 𝒙𝟐 ≤ 𝟑, 𝟎𝟎𝟎 ③
𝒙𝟏 , 𝒙𝟐 ≥ 𝟎 ④
Corner Points 𝒛
A 0, 0 0
B 1,000, 0 80,000
C 872.73, 381.82 115,636.80
D 𝟒𝟖𝟎, 𝟖𝟒𝟎 139,200
E 0, 1,000 120,000
Exercises

2. An industrial recycling center uses two scrap aluminum metals, type A and
type B, to produce a special alloy. Type A contains 6% aluminum, 3%
silicon, and 4% carbon. Scrap B has 3% aluminum, 6% silicon, and 3%
carbon. The cost per ton of scraps A and B are Php20,000 and Php16,000
respectively. The specifications of the special alloy require that: (1) The
aluminum content must be at least 3% and at most 6%; (2) The silicon
content must lie between 3% and 5%; and (3) The carbon content must be
between 3% and 7%. Determine the optimum mix of the scraps that should
be used in producing at least 1000 tons of the alloy.
Exercises

2. LP Model:
min 𝒛 = 𝟐𝟎𝒙𝟏 + 𝟏𝟔𝒙𝟐
s.t.
Aluminum Content:
0.06𝑥1 + 0.03𝑥2 ≥ 0.03 𝑥1 + 𝑥2 ► 0.03𝑥1 ≥ 0 or 𝑥1 ≥ 0
0.06𝑥1 + 0.03𝑥2 ≤ 0.06 𝑥1 + 𝑥2 ► 0.03𝑥2 ≥ 0 or 𝑥2 ≥ 0
Silicon Content:
0.03𝑥1 + 0.06𝑥2 ≥ 0.03 𝑥1 + 𝑥2 ► 0.03𝑥2 ≥ 0 or 𝑥2 ≥ 0
0.03𝑥1 + 0.06𝑥2 ≤ 0.05 𝑥1 + 𝑥2 ► 𝟎. 𝟎𝟐𝒙𝟏 − 𝟎. 𝟎𝟏𝒙𝟐 ≥ 𝟎 or 𝟐𝒙𝟏 − 𝒙𝟐 ≥ 𝟎
Carbon Content:
0.04𝑥1 + 0.03𝑥2 ≥ 0.03 𝑥1 + 𝑥2 ► 0.01𝑥1 ≥ 0 or 𝑥1 ≥ 0
0.04𝑥1 + 0.03𝑥2 ≤ 0.07 𝑥1 + 𝑥2 ► 𝟎. 𝟎𝟑𝒙𝟏 + 𝟎. 𝟎𝟒𝒙𝟐 ≥ 𝟎 or 𝟑𝒙𝟏 + 𝟒𝒙𝟐 ≥ 𝟎
Minimum Production Requirement: 𝒙𝟏 + 𝒙𝟐 ≥ 𝟏, 𝟎𝟎𝟎
Nonnegativity Constraint: 𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
Exercises

2. LP Model:
min 𝒛 = 𝟐𝟎𝒙𝟏 + 𝟏𝟔𝒙𝟐
s.t.
𝟐𝒙𝟏 − 𝒙𝟐 ≥ 𝟎 ①
𝟑𝒙𝟏 + 𝟒𝒙𝟐 ≥ 𝟎 ②
𝒙𝟏 + 𝒙𝟐 ≥ 𝟏, 𝟎𝟎𝟎 ③
𝒙𝟏 , 𝒙𝟐 ≥ 𝟎 ④

Corner Points 𝒛
A 𝟑𝟑𝟑. 𝟑𝟑, 𝟔𝟔𝟔. 𝟔𝟕 17,333.32
B 1,000, 0 20,000
Slack, Surplus, and Unrestricted
Variables

 Slack Variable. For constraints of the type (≤), the right-hand side normally
represents the limit on the availability of a resource, and the left-hand side
represents the usage of this limited resource by the different activities
(variables) of the model. A slack thus represents the amount by which the
available amount of the resource exceeds its usage by the activities.
 Surplus Variable. Constraints of the type (≥) normally set minimum
specification requirements. In this case, a surplus represents the excess of
the left-hand side over the minimum requirement.
 Unrestricted Variable. There are situations where a variable can assume
any real value (can be positive, zero, or negative) and so considered as
unrestricted.
Exercises

3. In the Pintura problem, consider the feasible solution 𝑥1 = 3 tons and 𝑥2 = 1


ton. Determine the value of the associated slacks for raw materials 𝑀1 and
𝑀2.
4. In the Euler Farms problem, determine the surplus amount of feed
consisting of 500 lb of corn and 600 lb of soybean meal.
Exercises

3. In the Pintura problem, consider the feasible solution 𝑥1 = 3 tons and 𝑥2 = 1


ton. Determine the value of the associated slacks for raw materials 𝑀1 and
𝑀2.
For 𝑀1:
6𝑥1 + 4𝑥2 ≤ 24
𝟔𝒙𝟏 + 𝟒𝒙𝟐 + 𝒔𝟏 = 𝟐𝟒
For 𝑀2:
𝑥1 + 2𝑥2 ≤ 6
𝒙𝟏 + 𝟐𝒙𝟐 + 𝒔𝟐 = 𝟔
When 𝑥1 = 3 and 𝑥2 = 1:
𝒔𝟏 = 𝟐 tons
𝒔𝟐 = 𝟏 ton
Exercises

4. In the Euler Farms problem, determine the surplus amount of feed


consisting of 500 lb of corn and 600 lb of soybean meal.
𝑥1 + 𝑥2 ≥ 800
𝒙𝟏 + 𝒙𝟐 − 𝒔𝟏 = 𝟖𝟎𝟎
When 𝑥1 = 500 and 𝑥2 = 600:
𝒔𝟏 = 𝟑𝟎𝟎 lb

You might also like