1.2 Linear Programming: Model Formulation and Graphical Solution
1.2 Linear Programming: Model Formulation and Graphical Solution
___________________________________________________________________
Learning Objectives:
At the end of the lesson, the student should be able to:
▪ Identify the basic assumptions and properties of linear programming
▪ Understand the difference between minimization and maximization
objective functions
▪ Formulate a linear programming problem
▪ Graphically solve any LP problem that has only two variables
▪ Understand special issues in LP such as infeasibility, unboundedness,
redundancy and alternative optimal solutions
__ __________________________________________________________
When we talk of resources we are referring to all the inputs which typically include
machinery, labor, money, time, warehouse space and raw materials. These
resources may be used to make products (such as machinery, furniture, food, or
clothing) or services (such as schedules for airlines or production, advertising
policies, or investment decisions). Scarcity of resources is one of the main problems
in operations management. So managers must be able to allocate resources in the
best possible way. One way of doing this is by using linear programming (LP). Linear
programming is a widely used mathematical modeling technique designed to help
managers in planning and decision making relative to resource allocation.
Definition: Linear Programming (LP) is a mathematical technique used to help
management decide how to make the most effective use of an organization’s
resources.
There are three steps in applying the linear programming technique. First, the
problem must be identified as being solvable by linear programming. Second, the
unstructured problem must be formulated as a mathematical model. Third, the model
must be solved by using established mathematical techniques.
| 2 |
MODULE 1
Operations Research and Linear Programming
_________________________________________________________________________________
LP Model Formulation
Formulating a linear program or LP model involves developing a mathematical model
to represent the managerial problem. There are four components that provide the
structure of a linear programming model:
| 3 |
MODULE 1
Operations Research and Linear Programming
_________________________________________________________________________________
Model Formulation
1. Define the decision variables: Let x = no. of tables to be produced per week
y = no. of chairs to be produced per week
2. Tabulate the data:
Resource Requirements (hr/unit) Available hours
Department
table (x) chair (y) per week
Carpentry 4 3 240
Painting and varnishing 2 1 100
Profit (₱/unit) 3000 2000
| 4 |
MODULE 1
Operations Research and Linear Programming
_________________________________________________________________________________
3. Define the objective function: The objective of the company is to maximize total
profit. The company’s profit is the sum of the individual profits gained from each table
and chair. Thus, total profit, which will we define symbolically as P, can be expressed
mathematically as P = ₱3000x + ₱2000y. We express the objective function as:
Maximize: P = ₱3000x + ₱2000y
4. Define the constraints: Our next step is to develop mathematical relationships to
describe the two constraints. One general relationship is that the amount of a
resource used is to be less than or equal to (≤) the amount of the resource available.
In the case of the carpentry department, the total time used is
(4 hours per table) × (number of tables produced) + (3 hours per chair) × (number of
chairs produced)
So the first constraint may be stated as follows:
First constraint: carpentry time used ≤ carpentry time available
4x + 3y ≤ 240 (hours of carpentry time)
Similarly, the second constraint is as follows:
Second constraint: painting and varnishing time used ≤ painting and varnishing time
available
2x + y ≤ 100 (hours of painting and varnishing time)
To obtain meaningful solutions, the values for x and y must be nonnegative
numbers. That is, all potential solutions must represent real tables and real chairs.
Mathematically, this means that
x ≥ 0 (number of tables produced is greater than or equal to 0)
y ≥ 0 (number of chairs produced is greater than or equal to 0)
While the nonnegativity constraints are technically separate constraints, they are
often written on a single line with the variables separated by commas. In this
example, this would be written as x, y ≥ 0.
The complete LP model for this problem can now be summarized as follows:
Maximize: P = ₱3000x + ₱2000y
Subject to:
4x + 3y ≤ 240
2x + y ≤ 100
x, y ≥ 0
Example 2: Ben has ₱70,000 to divide among several investments. The alternative
investments are municipal bonds with an 8.5% annual return, certificates of deposit
with a 5% return, treasury bills with a 6.5% return, and a growth stock fund with a
13% annual return. The investments are all evaluated after 1 year. However, each
investment alternative has a different perceived risk to the investor; thus, it is
| 5 |
MODULE 1
Operations Research and Linear Programming
_________________________________________________________________________________
advisable to diversify. Ben wants to know how much to invest in each alternative in
order to maximize the return.
The following guidelines have been established for diversifying the investments and
lessening the risk perceived by the investor:
1. No more than 20% of the total investment should be in municipal bonds.
2. The amount invested in certificates of deposit should not exceed the amount
invested in the other three alternatives.
3. At least 30% of the investment should be in treasury bills and certificates of
deposit.
4. To be safe, more should be invested in CDs and treasury bills than in
municipal bonds and the growth stock fund, by a ratio of at least 1.2 to 1.
5. Ben wants to invest the entire ₱70,000.
Model Formulation
Let w = amount invested in municipal bonds
x = amount invested in certificates of deposit
y = amount invested in treasury bills
z = amount invested in growth stock fund
The objective is to maximize the total return from the investment in the four
alternatives. The total return is the sum of the individual returns from each
alternative. We express the objective function as:
Maximize: P = ₱0.085w + ₱0.05x + ₱0.065y + ₱0.13z
Constraints:
The first guideline states that no more than 20% of the total investment should be in
municipal bonds. The total investment is ₱70,000; 20% of ₱70,000 is ₱14,000. Thus,
this constraint is
𝑤 ≤ 14,000
The second guideline indicates that the amount invested in certificates of deposit
should not exceed the amount invested in the other three alternatives. Because the
investment in certificates of deposit is x and the amount invested in the other
alternatives is w + y + z, the constraint is
𝑥 ≤ 𝑤 + 𝑦 + 𝑧 𝑜𝑟 𝑥 − 𝑤 − 𝑦 − 𝑧 ≤ 0
The third guideline specifies that at least 30% of the investment should be in treasury
bills and certificates of deposit. Because 30% of ₱70,000 is ₱21,000 and the amount
invested in certificates of deposit and treasury bills is represented by x + y, the
constraint is
𝑥 + 𝑦 ≥ 21,000
| 6 |
MODULE 1
Operations Research and Linear Programming
_________________________________________________________________________________
The fourth guideline states that the ratio of the amount invested in certificates of
deposit and treasury bills to the amount invested in municipal bonds and the growth
stock fund should be at least 1.2 to 1:
[(𝑥 + 𝑦)/(𝑤 + 𝑧)] ≥ 1.2
𝑥 + 𝑦 ≥ 1.2(𝑤 + 𝑧)
−1.2𝑤 + 𝑥 + 𝑦 − 1.2𝑧 ≥ 0
Finally, the investor wants to invest the entire ₱70,000 in the four alternatives. Thus,
the sum of all the investments in the four alternatives must equal ₱70,000:
𝑤 + 𝑥 + 𝑦 + 𝑧 = 70,000
Example 3: The Big Company retail chain ships televisions from three of its
distribution centers/warehouses to three of its retail stores on a monthly basis. Each
warehouse has a fixed supply per month, and each store has a fixed demand per
month. The manufacturer wants to know the number of televisions to ship from each
warehouse to each store in order to minimize the total cost of transportation.
Each warehouse has the following supply of televisions available for shipment each
month:
Warehouse Supply (TVs)
1. Makati 300
2. Pasig 200
3. Pasay 200
700
Each retail store has the following monthly demand for televisions:
Store Demand (TVs)
A. Quezon City 150
B. Mandaluyong 250
C. Taguig 200
600
| 7 |
MODULE 1
Operations Research and Linear Programming
_________________________________________________________________________________
Costs of transporting televisions from the warehouses to the retail stores vary as a
result of differences in modes of transportation and distances. The shipping cost per
television for each route is as follows:
From To Store
Warehouse A B C
2 14 12 13
3 13 15 17
Model Formulation
The model consists of nine decision variables, representing the number of
televisions transported from each of the three warehouses to each of the three
stores:
𝑥𝑖𝑗 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑒𝑙𝑒𝑣𝑖𝑠𝑖𝑜𝑛𝑠 𝑠ℎ𝑖𝑝𝑝𝑒𝑑 𝑓𝑟𝑜𝑚 𝑤𝑎𝑟𝑒ℎ𝑜𝑢𝑠𝑒 𝑖 𝑡𝑜 𝑠𝑡𝑜𝑟𝑒 𝑗
where 𝑖 = 1, 2, 3, and 𝑗 = 𝐴, 𝐵, 𝐶
For example, the decision variable 𝑥3𝐴 represents the number of televisions shipped
from warehouse 3 in Pasay to store A in Quezon City.
The objective function of the store chain is to minimize the total transportation costs
for all shipments. Thus, the objective function is the sum of the individual shipping
costs from each warehouse to each store:
Minimize: 𝐶 = ₱16𝑥1𝐴 + ₱18𝑥1𝐵 + ₱11𝑥1𝐶 + ₱14𝑥2𝐴 + ₱12𝑥2𝐵 + ₱13𝑥2𝐶 + ₱13𝑥3𝐴 +
₱15𝑥3𝐵 + ₱17𝑥3𝐶
Constraints:
The constraints in this model are the number of televisions available at each
warehouse and the number of TVs demanded at each store. There are six
constraints – one for each warehouse’s supply and one for each store’s demand. For
example, warehouse 1 in Makati is able to supply 300 televisions to any of the three
retail stores. Because the number shipped to the three stores is the sum of 𝑥1𝐴 , 𝑥1𝐵 ,
and 𝑥1𝐶 , the constraint for warehouse 1 is
𝑥1𝐴 + 𝑥1𝐵 + 𝑥1𝐶 ≤ 300
This constraint is a ≤ inequality for two reasons. First, no more than 300 televisions
can be shipped because that is the maximum available at the warehouse. Second,
fewer than 300 can be shipped because 300 are not needed to meet the total
demand of 600. That is, total demand is less than total supply, which equals 700. To
meet the total demand at the three stores, all that can be supplied by the three
| 8 |
MODULE 1
Operations Research and Linear Programming
_________________________________________________________________________________
warehouses is not needed. Thus, the other two supply constraints for warehouses 2
and 3 are also inequalities:
𝑥2𝐴 + 𝑥2𝐵 + 𝑥2𝐶 ≤ 200
𝑥3𝐴 + 𝑥3𝐵 + 𝑥3𝐶 ≤ 200
The three demand constraints are developed in the same way as the supply
constraints, except that the variables summed are the number of televisions supplied
from each of the three warehouses. Thus, the number shipped to one store is the
sum of the shipments from the three warehouses. They are equalities because all
demands can be met:
𝑥1𝐴 + 𝑥2𝐴 + 𝑥3𝐴 = 150
𝑥1𝐵 + 𝑥2𝐵 + 𝑥3𝐵 = 250
𝑥1𝐶 + 𝑥2𝐶 + 𝑥3𝐶 = 200
Therefore the complete LP model of the problem is as follows:
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒: 𝐶 = ₱16𝑥1𝐴 + ₱18𝑥1𝐵 + ₱11𝑥1𝐶 + ₱14𝑥2𝐴 + ₱12𝑥2𝐵 + ₱13𝑥2𝐶
+ ₱13𝑥3𝐴 + ₱15𝑥3𝐵 + ₱17𝑥3𝐶
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜:
𝑥1𝐴 + 𝑥1𝐵 + 𝑥1𝐶 ≤ 300
𝑥2𝐴 + 𝑥2𝐵 + 𝑥2𝐶 ≤ 200
𝑥3𝐴 + 𝑥3𝐵 + 𝑥3𝐶 ≤ 200
𝑥1𝐴 + 𝑥2𝐴 + 𝑥3𝐴 = 150
𝑥1𝐵 + 𝑥2𝐵 + 𝑥3𝐵 = 250
𝑥1𝐶 + 𝑥2𝐶 + 𝑥3𝐶 = 200
𝑥𝑖𝑗 ≥ 0
Example 4: Irish desires to design a breakfast of cornflakes and milk that is as
economical as possible. On the basis of what she eats during her other meals, she
decides that her breakfast should supply her with at least 10 grams of protein, at
1 1
least 4 the recommended daily allowance (RDA) of vitamin D, and at least the RDA
3
of calcium. She finds the following nutrition and cost information on the milk and
cornflakes containers:
Milk Cornflakes
(1/2 cup) (1 ounce)
Protein 5 grams 3 grams
1 1
Vitamin D 7
of RDA 9
of RDA
1
Calcium 5
of RDA None
Cost ₱12 ₱8
| 9 |
MODULE 1
Operations Research and Linear Programming
_________________________________________________________________________________
In order not to have her mixture too soggy or too dry, she decides to limit herself to
mixtures that contain 1 to 5 ounces of cornflakes per cup of milk, inclusive. What
quantities of milk and cornflakes should she use to minimize the cost of her
breakfast?
Model Formulation
1
Let x = the quantity of milk used (measured in 2 - cup units)
y = the quantity of cornflakes used (measured in 1 - ounce units)
The objective is to minimize the cost C of the breakfast. We write the objective
function as:
Minimize: C = ₱12x + ₱8y
The constraints imposed can be formulated mathematically as follows:
At least 10 grams of protein: 5x + 3y ≥ 10
1 1 1 1
At least 4 RDA of vitamin D: x+ y≥4
7 9
1 1 1
At least 3 RDA of calcium: x≥3
5
1 𝑦 1
At least 1 ounce cornflakes per cup (two 2 – cups) of milk: ≥ 2 (or x – 2y ≤ 0)
𝑥
1 𝑦 5
At most 5 ounces cornflakes per cup (two – cups) of milk: ≤ (or 5x – 2y ≥ 0)
2 𝑥 2
Implicit constraints: x, y ≥ 0
Thus the complete LP model of the problem is as follows:
Minimize: C = ₱12x + ₱8y
Subject to:
5x + 3y ≥ 10
1 1 1
x+ y≥4
7 9
1 1
x≥3
5
x – 2y ≤ 0
5x – 2y ≥ 0
x, y ≥ 0
| 10 |