LINEAR PROGRAMMING
BY
Atwijukire Rhinah
1
Definition: Linear Programming
A linear program
is a mathematical model that indicates the goal and
requirements of a resource allocation problem.
It is a mathematical model used to determine
optimal combinations of alternative
enterprises/activities or products from which
maximum output(profits or revenue) OR minimum
costs(wastes) can be achieved subject to certain
resource constraints.
Linear programming is a technique used to find the
optimum allocation of limited (scarce) resources to
competing uses or products or activities for
profit/revenue maximization or cost minimization.
2
Definition: Linear
Programming..
LP is a mathematical modeling technique used to determine a level of
operational activity in order to achieve an objective, subject to restrictions
called constraints.
The technique is applicable in situations where:
An investor may want to select investments that maximize profits
A nutritionist may want to design a diet with a minimum number of calories
An industrialist may want to select the means of production that cost least
A business person may want to select sources of supply that minimize transport routes
Programming means planning activities in a manner that leads to some
optimal results.
A programme is optimal if it maximizes profits or returns or minimize
costs or wastes.
The concept of “linear” in this context means that all relationships among
the variables - in both the objective functions and constraint inequalities -
must have a linear relationship (i.e. they can be plotted as straight lines on
a graph).
3
Introduction to Linear Programming
Many real world problems lend themselves
to linear
programming modeling.
Many real world problems can be
approximated by linear models.
There are well-known successful
applications in:
Manufacturing
Marketing
Finance (investment)
Advertising
Agriculture
4
Introduction to Linear
Programming
The linear programming model consists of the
following components:
A set of decision variables.
An objective function.
A set of constraints.
A linear programming model seeks to maximize or
minimize a linear objective function, subject to a
set of linear constraints.
… and thus helps to select the optimal course of
action subject to (or in the existence of) given
constraints
5
Introduction to Linear Programming
Decision variables
These are variables that the decision maker can
control and are denoted by mathematical
symbols representing levels of activity of an
operation
Objective function
a linear relationship of the decision variables
reflecting the objective (or goal or purpose) of an
operation
most frequent objective of business firms is to
maximize profit
most frequent objective of individual operational units
(such as a production or packaging department) is to
minimize cost
Constraint
a linear relationship of the decision variables
6
representing a restriction on decision making.
The Importance of Linear
Programming
It offers efficient solution
techniques that solve linear
programming models.
The output generated from linear
programming packages provides
useful “what if” analysis.
7
LP Model Formulation
Max/min z = c1x1 + c2x2 + ... + cnxn
subject to:
a11x1 + a12x2 + ... + a1nxn (≤, =,
≥) b1
a21x1 + a22x2 + ... + a2nxn (≤, =,
≥) b2
:
am1x1 + am2x2 + ... + amnxn (≤, =,
≥) bm
Where each xj ≥ 0 (i.e. is positive)
8 xj = decision variables
Assumptions of the linear
programming model
The parameter values are known with certainty.
The objective function and constraints exhibit linearity –
inputs vary in direct proportion with outputs.
There are no interactions between the decision variables
(the additivity assumption)
o the interdependence between demand for products is
ignored .
The Continuity/Divisibility assumption: Variables can
take on any value within a given feasible range.
Time factors are ignored – all processes are taken to occur
instantaneously.
Unquantifiable variables are ignored (e,g labour
9
stability, goodwill etc)
LP Model: Example
RESOURCE REQUIREMENTS
Labor Capital Revenue
PRODUCT (hr/unit) (Shs/unit) (Shs/unit)
Bowl 1 4 40
Mug 2 3 50
There are 40 hours of labor and 120 shillings of capital available
each day
Decision variables
x1 = number of bowls to produce
x2 = number of mugs to produce
10
LP Formulation:
Example
Maximize Z = Shs40 x1 + Shs50 x2
Subject to
x1 + 2x2 40 hr (labor constraint)
4x1 + 3x2 Shs120 (capital constraint)
x1 , x20
Solution is x1 = 24 bowls, x2 = 8 mugs
Revenue = Shs1,360
11
Graphical Solution Method
1. Plot model constraint on a set of coordinates
in a plane
2. Identify the feasible solution space on the
graph where all constraints are satisfied
simultaneously
3. Plot objective function to find the point on
boundary of this space that maximizes (or
minimizes) value of objective function
12
Graphical Solution:
x2 Example
50 –
40 – 4 x1 + 3 x2 Shs120
30 –
Area common to
both constraints
20 –
10 –
x1 + 2 x2 40 hr
| | | | | |
0– 10 20 30 40 50 60 x1
13
Computing Optimal Values
x1 + 2x2 = 40
x
402 – 4x1 + 3x2 = 120
4 x1 + 3 x2 Shs120 4x1 + 8x2 = 160
30 – -4x1 - 3x2 = -120
5x2 = 40
20 – x2 = 8
x1 + 2 x2 40 hr x1 + 2(8) = 40
10 –
x1 = 24
8
0–
| | | | x1
24
10 20 30 40
Z = Shs40(24) + Shs50(8) = Shs1,360
14
Extreme Corner Points
x1 = 0 bowls
x2 x2 =20 mugs
x1 = 224 bowls
Z = Shs1,000
x2 =8 mugs
40 –
Z = Shs1,360 x1 = 30 bowls
30 – x2 =0 mugs
Z = Shs1,200
20 – A
10 – B
| | | C|
0–
10 20 30 40 x1
15
Example 2
Mr. Beranda the owner furniture workshop in
Rwebikona has received an order for furniture from
Rwebitakuri P/S. The order consists of chairs and
tables. The profit per table is $6 and chair is $8.
To make a table Mr. Beranda requires 30 sq cm of
wood and 5 hours of labor. For the chair he requires
20 sq cm of wood and 10 hours of labor. He has
only 300sq cm of wood and 110 hours of labor.
a)Set up the objective function and constraint
inequalities.
b) Advice Mr. Beranda on the number of chairs and
tables he should supply in order to maximize
profits.
16
Solution – Summary of
information
RESOURCE REQUIREMENTS
PRODUCT labor Material Profit
(hrs/unit) (sq cm ($/unit)
/unit)
Chair 10 20 8
Table 5 30 6
There are 110 hours of labor and300 sq cm of wood available for
the production.
17
Solution.
Let XT and XC denote the number of tables and
chairs to be made. (Define variables)
Maximize P = 6XT + 8XC (Objective function)
Subject to: (Constraints)
30XT + 20XC < 300 (wood)
5XT + 10XC < 110 (labor)
where XT and XC > 0 (non-negativity
conditions)
Letting XT represent the horizontal axis and XC
the vertical, the constraints and non-negativity
conditions define the feasible solution
region.
18
Feasible Solution
Beranda’sFurniture Problem
19
Graphing to Find Feasible Solution
Region
For an inequality constraint (with < or >), first
plot as a line: 30XT + 20XC = 300.
Get two points. Intercepts are easiest:
Set X = 0, solve for X for horizontal intercept:
C T
30XT + 20(0) = 300 => XT = 300/30 = 10
Set X = 0, solve for X for vertical intercept:
T C
30(0) + 20XC = 300 => XC = 300/20 = 15
The above is used to draw the wood line. We
follow similar procedure for the labor line.
Mark valid sides and shade feasible solution
region. Any point within the feasible region
satisfies all constraints and non-negativity
conditions.
20
Graphing to Find Feasible Solution
Region
To establish valid side, pick a test point
(usually the origin). If that point satisfies
the constraint, all points on same side are
valid. Otherwise, all points on other side
are instead valid.
Equality constraints have no valid side.
The solution must be on the line itself.
Some constraint lines are horizontal or
vertical. These involve only one variable
and one intercept.
21
Finding Most Attractive
Corner
The optimal solution will always correspond to a
corner point of the feasible solution region.
Because there can be many corners, the most
attractive corner is easiest and best to find
visually.
That is done by plotting two P lines for arbitrary
profit levels.
Since the P lines will be parallel, just hold your
pencil at the same angle and role it in from the
smaller P’s line toward the bigger one’s That is
the direction of improvement.
Continue rolling until only one point lies beneath
the pencil. That is the most attractive corner.
(Some problems can have more than one most
attractive corner.)
22
Finding the Optimal Solution
The coordinates of the most attractive
corner provide the optimal levels.
Because reading from graph may be
inaccurate, it is best to solve algebraically.
Simultaneously solving the wood and labor
equations, the optimal solution is:
XT = 4 tables
XC = 9 chairs
P = 6(4) + 8(9) = 96 dollars
Note: supply the computed level of the
objective function in reporting the optimal
solution.
23
Steps involved in finding the
feasible solution
Understanding the problem
Identifying and defining the decision variables
Setting up the objective function
Deriving the constraints that the variables must
satisfy - including the non-negative constraints
(Remember: in practical problems, quantities of a
product cannot be negative)
Determine the set of feasible solutions (or the
feasible region)
Find the corner points
Evaluate the objective function at each corner
point to determine where the optimal values occur.
24
Exercise
Suppose that a firm produces two products
X and Y, with two inputs A and B. The total
quantities of A and B available per unit of
time to the firm were specified as A=1600
units, and B=2000units. Producing one unit
of X requires 4 units of A and 2 units of B,
and one unit of Y requires 2 units of A and 5
units of B. Profits per unit of X and Y are
estimated at $10 and $8 respectively.
Given these conditions, find the output-mix
of X and Y for optimizing the profits.
25
Exercise
A producer wants to decide how many units of
good X and good Y to produce and maximize
revenue from their sale. Suppose one unit of
good X requires 6 units of labor, 3 hours of
machine work and 2 units of raw materials,
while one unit of Y requires 5 units of labor,
one(1) hour of machine work/time and 4 units
of raw materials. If 90 units of labor are
available, 36 hours of machine time are
available and 60 units of raw materials are
available, and a unit of X sells at $5 while a
unit of Y sells at $3.Required: Formulate a
linear programming model and determine
26
the combination of the two products that
Exercise
A company produces two products X and Y.
Product X requires 30 minutes of labour while Y
requires 15 minutes of labour. Each unit of
product X uses 2kgs of raw materials while Y
uses 4kgs of raw materials. Product X requires
3minutes of testing while Y requires 4 minutes
of testing. In any week, only 30 hours of labour
and 280 kgs of aw materials are available. The
testing machine can only be used for 4 hours a
week. In what ever situation, at least 20 units
of X must be produced. Each unit of X
generates a profit of 12000/= and Y generates
a profit of 10000/= per unit. Required:
27
(a)Formulate the company’s objective function.
Approach to the question
above
Maximize ∏= 12000X + 10000Y,
Subject to constraints below
30X +15Y ≤ (30x60);labour
time(minutes).
2X + 4Y ≤ 280; Raw materials.
3X + 4 Y ≤ (4x60); Testing
time(minutes).
X ≥20; (at least 20 units of X must
be produced)
where X,Y ≥ 0 Non negativity.
NB:Complete this task using either graphical or
28
simultaneous method or both.
Group work 2
Galaxy manufactures two toy doll models: Space Ray and
Zapper. Resources are limited to 1000 kilos of special plastic
and 40 hours of production per week.
The marketing requirements are as follows: Total production
can not exceed 700 dozens. While the number of dozens of
Space Rays cannot exceed the number of dozens of Zappers
by more than 350.
Technology input requires 2 kilos of plastic and 3 minutes of
labor per dozen for Space Rays while Zappers requires 1 kilo
of plastic and 4 minutes of labor per dozen.
The current production plan calls for producing as much as
possible of the more profitable product, Space Ray ($8 profit
per dozen).Use the resources left over to produce Zapper ($5
profit per dozen), while remaining with in the market
guidelines.
As a hired QM specialist write a memo advising Galaxy GM on
29
production levels that will maximize profits.
Solution
RESOURCE REQUIREMENTS
PRODUCT labor Material Profit
(min/doz) (kg /doz) ($/doz)
Space Ray 3 2 8
Zapper 4 1 5
There are 2400 hours of labor and 1000kg of special plastic per
week available for the production.
30
LP Model of the problem
becomes
31
Feasible Region would be the one shaded
below (dotted line represents the
objective function)
32
Minimization Problem
This is the LP method of determining the
least cost combinations of activities or
products given resource constraints.
The main objective is minimization of
costs of production /operations given
certain resource constraints.
The standard form of minimization problem
consists of minimization objective function
subject to constraint inequalities(next
slide)
33
Minimization problem.
Min C= C1X + C2 Y
subject to constraints
a1X + b1Y ≥ K (capital constraint)
a2X + b2Y ≥ L ( labour constraint)
where X,Y ≥ 0 (Non-negativity activities)
X and Y are activities or products produced
C1 and C2 are costs per unit activity or product.
a1 ,a2, b1 and b2 are inputs(resources) required per unit
activity or product.
K and L are minimum(least) quantities of constraints
available.
34
Example
A construction firm produces special bricks
and blocks. The cost per brick is $10 and
that of a block is $12. Each brick requires
1unit of cement and 1unit of sand, while
each block needs 1 unit of cement and 2
units of sand. He needs at least 3 units of
cement and 4 units of sand in an hour
(assuming that water and labor are
provided freely). If he wants to minimize
the costs of production per hour, how many
bricks and blocks will he produce?
35
Approach
Let C= cost of production
X= bricks
Y= Blocks
The cost minimization objective function is:
Min C=10X + 12Y
subject to
X+ Y ≥ 3; (Cement)
X + 2Y ≥ 4 ; (Sand)
and X,Y ≥ 0 Non negativity
Complete the computation following all steps of
LP.
36
Limitations of Linear
Programming
Graphical method applies to only two
variables(activities or products) yet in practices
more than two variables are involved.
The model is static and therefore not suitable
for analyzing in details the effects of changes
over time-e.g technological changes.
It assumes linear relationships between
variables yet many practical problems
/situations have non-linear relationships.
The quantities of certain resources per unit
products and returns /profits and costs per unit
product are likely to be subjected to
37
considerable uncertainty due to socio-
economic and environmental variations.
Continuation of limitations:
It does not take into account the law of
diminishing returns.
It only applies in situations with constant
market conditions for goods and resources
which is not always the case in real world.
It is only useful in organizations whose main
objective is to either maximize profits ,output
or revenue or minimize costs and wastes while
ignoring other non-quantitative objectives.
It does not take into consideration the problem
of inflation or fluctuations in other variables.
ETC.
38 END
Summary
END OF PRESENTATION
39