Linear Programming Problem (LPP)
Linear Programming Problem (LPP)
Linear Programming Problem (LPP)
0
DETERMINISTIC MODELS: LINEAR OPTIMIZATION
2.1
Introduction to Linear programming model (LP)
Linear programming (LP) is a mathematical procedure for minimizing or maximizing a linear
function of several variables, subject to a finite number of linear restrictions on these variables.
A branch of mathematics that uses linear inequalities to solve decision-making problems
involving maximums and minimums.
In mathematics, linear programming (LP) problems are optimization problems in which the
objective function and the constraints are all linear
Linear programming (LP) is a mathematical optimization model (technique). By Optimization
technique we mean a method, which attempts to maximize or minimize some objective function
(for example maximize profits or minimize costs), subject to a set of linear equalities and/ or
inequalities known as constraints. The objective function may be profit, cost, production capacity
or any other measure of effectiveness, which is to be obtained in the best possible or optimal
manner. The constraint may be imposed by different sources such as market demand, production
processes and equipment, storage capacity, raw material availability etc.
A mathematical optimization model consists of an objective function and a set of constraints in
the form of a system of equations or inequalities. Optimization models are used extensively in
almost all areas of decision-making, such as engineering design and financial portfolio selection.
Linear Programming (LP) is a mathematical procedure for determining optimal allocation of
scarce resources. LP is a procedure that has found practical application in almost all facets of
business, from advertising to production planning. Transportation, distribution, and aggregate
production planning problems are the most typical objects of LP analysis.
Linear programming deals with a class of programming problems where both the objective
function to be optimized is linear and all relations among the variables corresponding to
resources are linear. Any LP problem consists of an objective function and a set of constraints. In
most cases, constraints come from the environment in which you work to achieve your objective.
When you want to achieve the desirable objective, you will realize that the environment is setting
some constraints (i.e., the difficulties, restrictions) in fulfilling your desire or objective.
What is a function: A function is a thing that does something. For example, a coffee grinding
machine is a function that transform the coffee beans into powder. The (objective) function maps
and translates the input domain (called the feasible region) into output range, with the two endvalues called the maximum and the minimum values.
When you formulate a decision-making problem as a linear program, you must check the
following conditions:
The objective function must be linear. That is, check if all variables have power of 1 and they are
added or subtracted (not divided or multiplied)
The objective must be either maximization or minimization of a linear function. The objective
must represent the goal of the decision-maker. The constraints must also be linear. Any linear
program consists of four parts: a set of decision variables, the parameters, the objective function,
and a set of constraints. In formulating a given decision problem in mathematical form, you
should practice understanding the problem (i.e., formulating a mental model) by carefully
reading and re-reading the problem statement. While trying to understand the problem, ask
yourself the following general questions:
1. What are the decision variables? That is, what are controllable inputs? Define the
decision variables precisely, using descriptive names. Remember that the
a11 x1 + a12 x2 + L + a1n xn b1
=
a21 x1 + a22 x2 + L + a2 n xn b2
=
Subject to
(Constraints)
am1 x1 + am 2 x2 + L + amn xn bm
=
x1 , x2 ,L , xn 0
(non negativity constraint)
Where xi ' s are the decision variables, ci ' s are the contributions per unit of the decision
variables to the objective value, b j ' s are the available units of the limited resources and aij ' s
2.
Maximize:
Subject to :
Z = 4x 1 +8x 2
x 1 +x 2 20
2x 1 +x 2 32
x1 , x 2 0
Minimize:
Subject to:
Z = 5x 1 +3x 2
3x 1 +2x 2 60
4x 1 +5x 2 90
x1 , x 2 0
The objective is to maximize or minimize z, which is stated as a linear function of the two
decision variables x1 and x 2 . In choosing values for x1 and x 2 , however, two constraints must be
satisfied (the two linear inequalities)
2.2 Requirements for a linear programming problem
For a linear programming problem, the supply of resources must be limited. Supply of resources
being limited, the management must find the best allocation of its resources in order to maximize
the profit or minimize the loss or utilize the production capacity to the maximum extent. In
general, linear programming can be used for optimization problems if the following conditions
are satisfied.
There must be a well-defined objective function (Profit, cost or quantities
produced), which is to be maximized or minimized, and which can be expressed
as a linear function of decision variables.
3
Example
The XYZ company produces three different items. The production process utilizes three
operations. The figure below shows the sequence for producing items 1,2,3. Item 2 does
not pass through operation B and item 3 does not pass through operation C. The
processing times per unit of each item are shown. Since the same operations are used in
the companys other production activities, the daily usage of operations A, B and C by all
three items are limited to 430,460, and 420 minutes respectively. A market study shows
that the expected per unit profit for items 1,2,3 are $3, $2, $5 respectively. What is the
daily production level for each item
Operation A
1min/unit
Raw
material
Operation B
3min/unit
2min/unit
1min/unit
Operation C
1min/unit
4min/unit
2min/unit
Item1
Item2
Final
product
Item3
Verbal Summary
(i)
The defined objective is to maximize profits. The XYZ company seeks the
determination of the daily number of units to be produced (variables) of each item
in order to maximize total profit (objective), provided that the daily usage of each
operation does not exceed its maximum daily capacity.
(ii)
Constraints: limits on daily usage of operations
(iii) Alternative courses of action: there are three operations, the items can be
processed in any combination.
(iv)
(v)
Decision variables may take on any real values (not just integer)
The problem formulation assumes that all decision variables can take on any non-negative value
including fractional ones; (i.e., the decision variables are continuous).
This assumption is violated when non-integer values of certain decision variables make little
sense. A decision variable may correspond to the purchase of a tractor or the construction of a
building where it is clear that the variable must take on integer values.
2.3.7 Certainty (constant parameters)
Each parameter is a known constant
The certainty assumption requires that the parameters cj, bi, and aij be known constants. The
optimum solution derived is predicated on perfect knowledge of all the parameter values. Since
all exogenous factors are assumed to be known and fixed, LP models are sometimes called non-
stochastic as contrasted with models explicitly dealing with stochastic factors. This assumption
gives rise to the term "deterministic" analysis.
The exogenous parameters of a LP model are not usually known with certainty. In fact, they are
usually estimated by statistical techniques. Thus, after developing a LP model, it is often useful
to conduct sensitivity analysis by varying one of the exogenous parameters and observing the
sensitivity of the optimal solution to that variation.
2.4 Formulating Linear programming Models
A manufacturing firm produces two products A and B. Each of these products must be
processed through two different machines. One machine has 24 hours of available
capacity, and the second machine has 19 hours of available capacity. Each unit of product
A requires 2 hours of time on both machines. Each unit of B requires 3 hours on the first
machine and 1 hour on the second machine. The incremental profit is $6 per unit of
product A and $7 per unit of product B, and the firm can sell as many units of each
product as it can manufacture. Determine how many units of product A and B should be
produced within the limits of available machine capacities.
Solution
(i)
(ii)
Final formulation
Maximixe:
Subject to :
Z = 6x 1 +7x 2
2x 1 +3x 2 24
2x 1 +x 2 16
x1 , x 2 0
Example 2
A firm manufactures two products, each of which must be processed through departments
X and Y. The table below summarizes labor- hour requirements per unit for each product
in each department. Also presented are weekly labor- hour capacities in each department
and respective profit margins for the two products. The problem is to determine the
number of units to produce of each product so as to maximize total contribution to fixed
cost and profit.
Department X
Department Y
Profit margin
Solution
Final formulation
Maximixe:
Subject to :
Product A
Product B
Weekly labor
capacity
120 hours
260 hours
Z = 5x 1 +6x 2
3x 1 +2x 2 120
4x 1 +6x 2 260
x1 , x 2 0
Example 3
The XYZ company produces three different items. The production process utilizes three
operations. The figure below shows the sequence for producing items 1,2,3. Item 2 does
not pass through operation B and item 3 does not pass through operation C. The
processing times per unit of each item are shown. Since the same operations are used in
the companys other production activities, the daily usage of operations A, B and C by all
three items are limited to 430,460, and 420 minutes respectively. A market study shows
that the expected per unit profit for items 1,2,3 are $3, $2, $5 respectively. What is the
daily production level for each item
Operation A
1min/unit
Raw
material
Operation B
3min/unit
2min/unit
1min/unit
Operation C
1min/unit
4min/unit
2min/unit
Item1
Item2
Final
product
Item3
Solution
Final formulation
Maximixe:
Z = 3x 1 +2x 2 +5x 3
Subject to :
x 1 +2x 2 +x 3 430
3x 1 +0x 2 +2x 3 460
x 1 +4x 2 +0x 3 420
x1 , x 2 , x 3 0
Example: The Product-Mix Problem
A company manufactures two models of a product, which we call the regular model and the
enhanced model. Two resources, A and B, are needed for the manufacturing of units of this
product; and the detailed resource requirements are given in the following table:
Regular
Enhanced
Model
Model
Resource
3
4
A
Resource B 2
3
This means, for example, 3 units of Resource A and 2 units of Resource B are consumed in the
manufacturing of each unit of the regular model. The resources could represent hours of labor,
amounts of raw material, available electrical power, and so on.
Suppose further that the company has 650 units of Resource A and 500 units of Resource B
available per week, and that the net profits for selling units of the regular model and the
enhanced model are given respectively as $5 and $7 per unit. The question of interest is: What
are the optimal weekly production levels for these two models?
To formulate this problem, we first define a set of decision variables. Let
xr = weekly production level for the regular model,
xe = weekly production level for the enhanced model.
Clearly, these variables should be nonnegative, as they represent physical quantities.
Next, suppose our goal is to maximize weekly total profit. Then, in terms of these decision
variables, we have:
Weekly Total Profit = 5 xr + 7 xe;
and we wish to choose a pair of values for xr and xe that yields the highest possible weekly total
profit. However, from the table above, we see that there are limitations or constraints on the
possible values of these variables. Specifically, we have:
Weekly Requirement for Resource A = 3 xr + 4 xe,
Weekly Requirement for Resource B = 2 xr + 3 xe.
Therefore, the values of xr and xe should be such that these requirements do not exceed 650 and
500, respectively.
Our problem can now be stated formally as:
Maximize 5 xr + 7 xe
Subject to:
3 xr + 4 xe 650
2 xr + 3 xe 500
xr 0, xe 0.
10
What we have just formulated is called a linear program. In this example, it has two decision
variables, xr and xe, an objective function, 5 xr + 7 xe, and a set of four constraints. The objective
function is to be maximized subject to the specified constraints on the decision variables. It is
customary to refer to the first group of constraints,
3 xr + 4 xe 650
2 xr + 3 xe 500,
as the functional constraints; and the remaining group,
xr 0, xe 0, as the nonnegativity constraints.
Notice that each term in the objective function has the form cx, where c is a constant and x is a
variable. In other words, the objective function is linear in the decision variables xr and xe.
Notice further that the left-hand-side expressions in all four constraints are also linear. This is
why we call the above problem a linear program.
If a term such as 3x2 appears in a formulation, then the resulting problem is said to be nonlinear.
More generally, a linear program with m functional constraints and n decision variables (or
"activities"), x1, x2, ..., xn, has the following general format:
Maximize or
c1 x1 + c2 x2 + ... + cn xn
Minimize
Subject to:
a11 x1 + a12 x2 + ... + a1n xn , =, or
b1
a21 x1 + a22 x2 + ... + a2n xn , =, or
b2
.....
am1 x1 + am2 x2 + ... + amn xn , =,
or bm
x1, x2, ..., xn 0,
where the cj's, the aij's, and the bi's are given parameters. Notice that three types of constraints
are allowed: , =, or . Strict inequalities, i.e., "<" or ">", are not allowed in a linear program,
because they may lead to ill-defined problems (e.g., maximize x subject to x < 1).
Example 2
Max: p = 6 x1+7 x2
S/t: 2 x1 +3 x2 < 24
2 x1 + x2 < 16
12
x1, x2 0
We shade the first quadrant which satisfies the non negativity restrictions. The next constraint
we plot lines 2x1+ x2=16 and 2x1+3x2=24 and any point lying on or below the line 2x1 + x2 =16
satisfies the constraint 2 x1 + x2 < 16. Similarly for 2 x1+3 x2 < 24
Then shade the region which satisfies both constraints.
This area is called the solution space or feasible region.
Any point in this shaded region is a feasible solution to the given problem.
2.5.2 Finding optimal solution:
Our problem is to find the point (or points) in the feasible solution, which maximizes/minimizes
the objective function.
There are two approaches in finding the optimal solution graphically:
Corner point method
Search method
2.5.2.1 Corner point method:
Graphically identify the region of feasible solutions.
Determine the coordinates of each corner point (vertices) on the region of feasible
solutions.
Substitute the coordinates of the corner points into the objective function to determine the
corresponding value (Evaluate the objective function at each vertex) .
An optimal solution occurs in a maximization problem at the corner point yielding the
highest value and in a minimization problems the corner point yielding the lowest value.
Example
Determine the optimal solution the following linear programming model using corner point
method.
Maximize: Z=$40x1 + 50x2
subject to: x1 + 2x2 40
4x2 + 3x2 120
x1, x2 0
Corner Point Solutions
13
Objective
values at the
corners:
At A (0, 20): Z=$1000
At B (24, 8) : Z=$1360
At C (30, 0) : Z= 1200
At D (0, 0): Z=0
Optimal solution is
x1 = 24 bowls
x 2 = 8 mugs
Z = $1360
Example 2:
Max: p = 3x1+2x2
S/t: x1 +4x2 < 20
2x1 + 3x2 < 30
x1, x2 0
14
15
16
17
THEOREM 1: Suppose we are given a linear programming problem with a feasible Region R
and an objective function P = ax+by. Then,
If R is bounded then P has both a maximum and minimum value on R
If R is unbounded and both a and b are nonnegative, then P has a minimum value on R
provided that the constraints defining R include the inequalities x 0 and y 0.
If R is the empty set, then the linear programming problem has no solution; that is, P has
neither a maximum nor a minimum value.
Effects of constraints:
Constraints exist because certain limitations restrict the range of decision variables possible values.
A constraint is considered to be binding if changing it also changes the optimal solution. A binding
constraint (scarce resource) is one, which passes through the optimum solution point in graphical
solution.
Less severe constraints that do not affect the optimal solution are non binding. A non - binding
constraint (abundant resource) is one, which does not pass through the optimum solution point.
Tightening a binding constraint can only worsen the objective function value and loosening/
relaxing a binding constraint can only improve the objective function value.
As such, once optimal solution is found, managers can seek to improve that solution by finding
ways to relax binding constraints.
18
Exercises
For the following LP problems, graph the region of feasible solution (if one exists) and solve by
the corner- point method.
x1 , x 2 0
(g) Minimize: Z = 2x 1 +5x 2
Subject to: x 1 +x 2 16
x 1 12
x1 8
x 2 10
x2 4
(f) Minimize: Z = 10x 1 +10x 2
Subject to: x 1 +x 2 12
4x 1 +x 2 24
5x 1 +4x 2 120
x1 3
x 2 18
x1 , x 2 0
(h) Maximize: Z = 8x 1 +4x 2
Subject to : 20x 1 +10x 2 60
40x 1 +32x 2 160
x1 3
x2 4
x1 , x 2 0
19
2.6
Categories of LP
Every LP will fall into one of the following four categories:
The model has an optimal solution
The model has multiple optimal solutions (alternative optimal solution)
There is no optimal solution, because the model is unbounded (unbounded
solution)
There is no optimal solution, because the model is infeasible (infeasible
solution)
2.6.1 Alternative optimal solution
There might exist infinite number of solutions (optima ) .
This situation happens when the objective function is parallel to a constraint equation /
inequality
THEOREM 2:
If a linear programming problem has a solution, then it must occur at a vertex, or corner
point, of the feasible region, R, associated with the problem. Furthermore, if the objective
function P is optimized at two adjacent vertices of R, then it is optimized at every point
on the line segment joining these two vertices, in which case there are infinitely many
solutions to the problem.
Example
Maximize: Z=$40x1 + 30x2
subject to: 1x1 + 2x2 40 hours of labor
4x2 + 3x2 120 pounds of clay
x1, x2 0
where x1 = number of bowls
x2 = number of mugs
20
For situations such as this ,we say that there are alternative optimal solutions to the
problem .
exercise
Max: z =20 x1+15 x2
S/t : 3 x1+4 x2 60
4 x1+3 x2 60
x1 10
x2 12
x1, x2 0
2.62 Infeasibility
21
Exercise
Max: 2x1 + 3x2
s.t:
x1 + x2 > 30
2x1 + x2 < 20
x1 , x2 > 0
2.6.3 Unbounded ness
An LP has unbounded solution if the value of the solution can be made indefinitely large
without violating any of the constraints.
In LP models of real-life problems, unbounded ness occurs only when the problem has
been improperly formulated.
Value of objective function increases indefinitely:
Example
Maximize: Z = 4x1 + 2x2
subject to: x1 4
x2 2
x1, x2 0
22
Exercise
Max: 2x1 + 3x2
s.t:
x1 + x2 > 30
x1 , x2 > 0
2.7
Problems
Machine 3
3
4
Profit
$2
$3
Find the optimal mix of the two products and calculate the optimal profit (use both
graphical.
3. A Company can advertise its product by using local radio and TV stations. Its budget
limits the advertisement expenditures to $1000 a month. Each minute of radio
advertisement costs $5 and each minute of TV advertisement costs $100. The
company would like to use the radio at least twice as much as the TV. Past experience
shows that each minute of TV advertisement will usually generate 25 times as many
sales as each minute or radio advertisement. Determine the optimum allocation of the
monthly budget to radio and TV advertisements.
Determine the increase in sales per minute of radio advertisement that will make it more
attractive to assign the entire monthly budget to radio advertisement only.
4. A Company produces two types of cowboy hats. Each hat of the first type requires
twice as much labor time as does each hat the second type. If all hats are of the
second type only, the company can produce a total of 500 hats a day. The market
limits daily sales of the first and second types to 150 and 200 hats. Assume that the
profit per hat is $8 for type 1 and $5 for type 2. Determine the number of hats of each
type to produce in order to maximize profit.
5. Four products are processed successively on two machines. The manufacturing times
in hours per unit of each product are tabulated below for the two machines.
23
Machine
1
2
Product 1
2
3
Product 4
2
2
The total cost of producing 1 unit of each product is based directly on the machine time.
Assume that the cost per hour for machine 1 and 2 is $10 and $15, respectively. The total
hours budgeted for all the products on machines 1 and 2 are 500 and 380. If the sales
price per unit for products 1,2,3, and 4 are $65, $70, $55, and $45, formulate the problem
as a linear programming model to maximize total net profit and solve it.
6. A manufacturer produces three models (I, II, and III) of a certain product. He uses
two types of raw material (A and B), of which 4000 and 6000 units are available,
respectively. The raw material requirements per unit of the three models are given
below.
Raw Material
A
B
III
5
7
The labor time for each unit of model I is twice that of model II and three times that of
model III. The entire labor force of the factory can produce the equivalent of 1500 units
of model I. A market survey indicates that the minimum demand for the three models is
200, 200, and 150 units, respectively. However, the ratios of the number of units
produced must be equal to 3:2:5. Assume that the profit per unit of models I, II, and III is
$30, $20, and $50, respectively. Formulate the problem as a linear programming model to
determine the number of units of each product that will maximize profit and solve it.
24