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

Introduction To Linear Programming

This document introduces linear programming, which is a mathematical technique for determining an optimal allocation of limited resources. It discusses the key concepts, assumptions, advantages, limitations, and applications of linear programming. It also provides steps for formulating a linear programming problem and solving it, using an example where a brewery aims to maximize daily contribution by determining optimal production levels of two types of beer given constraints on machine hours and labor hours. The problem is modeled and solved graphically to find the feasible region and optimal solution.

Uploaded by

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

Introduction To Linear Programming

This document introduces linear programming, which is a mathematical technique for determining an optimal allocation of limited resources. It discusses the key concepts, assumptions, advantages, limitations, and applications of linear programming. It also provides steps for formulating a linear programming problem and solving it, using an example where a brewery aims to maximize daily contribution by determining optimal production levels of two types of beer given constraints on machine hours and labor hours. The problem is modeled and solved graphically to find the feasible region and optimal solution.

Uploaded by

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

CHAPTER SIXTEEN

ITRODUCTION TO LINEAR PROGRAMMING


Specific Objectives
At the end of this to the trainee should be able to:
➢ Explain the model concepts;
➢ Describe the various types of models;
➢ State the requirements of LP models;
➢ Model decision problems as linear models;
➢ Solve LP models.

INTRODUCTION
These are mathematical technique that deals with optimism of linear function
variables known as objective functions. It is a method of determine an
optimum program of independent activities in view of available resources.
Linear programming is a technique of decision making used by managers to
allocate limited resources e.g. machinery, raw materials and labor in order to
minimize costs or maximize production. Decision variable are the amounts of
each product to be made in a given time period. Linear programming assumes
that the variable has a linear relationship.

N.B; it is a technique concerned with scarce resources.

Advantages
1. It helps in retaining the optimum use of production factor e.g.
efficient use of man power.
2. it improves quality of decision
3. it gives possible practice positively
4. It improves the knowledge and skills of executive.

Limitation
1. it assumes that the activity is infinitely divisible
2. it treats all relationships as linear
3. it takes into account single object only.
4. It can be adopted only under the condition of certainty i.e. when the
quantity of resources is known.

Assumption of linear programming


1. linearity
2. Divisibility- assumes that quantities, costs and revenues are infinitely
divisible.
3. certainty- the technique assumes that there is certainty in all
4. positive solutions- non negative constraints are introduced to ensure the
values are considered
5. Interdependent between demands for products is ignored.
313
6. Time factor is ignored. It assumes that production is instantaneous.

Application of linear programming


Production department to decide the quantity of pots to be produced subject
to limited resources (constraints) e.g. labor, power, machine hours, raw
materials etc.
Marketing department: Allocation of salesmen to different sales regions subject
to their expected performance.
Human Resource: Scheduling personnel’s work hours and job description to
either maximize production or minimize cost.

Steps in solving linear programming problems (problem formulation)


1. Identify variables (e.g. product x and product y)
2. Identify the objective (To maximize contribution or to minimize cost), and
write down its mathematical presentation in terms of variables.
3. Identify the constraints (i.e. the limited resources shared among the
variables), and write down its mathematical representation in terms of
variables.
4. Write down the objectives and the constraints in terms of the variables.
These steps apply regardless of the number of the variables.

NOTE: If only two variables are involved, a graphical solution can be used
otherwise for multivariable problems, an algebraic method is applied to find
the solution.

Example 1:
Long Castling Breweries manufactures two brands of beer, Benko lager and
Benoni lager. Benko has a contribution of Sh.4 per unit and Benoni has a
contribution of Sh.3 per unit. Benko requires 30 machine minutes and 30 labor
minutes to manufacture a unit. Total available machine hours per day are 12hrs
whereas total available labor hours per day are 14hrs.

Required:
1. Formulate linear programming model.
2. How much of each brand should Long Castling produce if it wishes to
maximize its daily contribution assuming that all the lager produced is sold.

314
Solution:
1. Formulating a linear programming model

Step 1: Identifying variables:


The variables here are the number of units of Benko and Benoni lager produced
by Long castling breweries per day; we can represent them as:
X1= a unit of Benko lager.
X2= a unit of Benoni lager.

Step 2: Identify the objective:

Definition: An objective is the desired result i.e. optimization of a function


dependent on decision variable and subject to some constraints.

The objective of Long Castling Breweries is to maximize daily contribution.


Objective function is the formula that will give us the total contribution in a
day for both Benko lager and Benoni lager.
The information above can thus be represented in a tabular form as:

PRODUCT Maximum
available
(PER DAY) X1 X2 hours/day
Machine hours 0.5 0.33 12
Labor hours 0.5 0.5 14
Contribution 4 3

Objective function = 4X1 + 3X2


The objective is to maximize 4X1 + 3X2

Step 3: Identifying constraints (constraints formulation)

Definition: Constraints are circumstances that govern achievement of an


objective.
Limitations must be quantified mathematically and they must be linear.

For Long castling breweries we have limited machine hours (12hrs/day), which
must be shared among production of Benko and Benoni lagers.
Therefore production must be such that the numbers of machine hours required
is less than or equal to 12 hours per day.
0.5X1+0.33X2 ≤ 12hrs

Similarly for labor hours we have:


0.5X1+0.5X2 ≤ 14hrs

Non-Negativity: It is logical assumption to assume that the company cannot


manufacture negative amounts of a product, thus it can only manufacture
either zero product or more. Therefore we have: X1≥0
X2≥0 or X1, X2≥0

315
Thus the complete linear programming model is;
Maximize 4X1 + 3X2

Subject to the constraints;


0.5X1 + 0.33X2 ≤ 12
0.5X1 + 0.5X2 ≤ 14
X1 X2 ≥ 0

Solving linear programming problems


The question requires us to optimize (in our case, maximize) the objective (the
contribution function), or in simple terms we are required to solve the linear
programming model.
Solving linear programming model entails finding the values of variables that
satisfy all inequalities simultaneously and optimize the objective.

Graphical solution
This method is used to solve LP models in case where only two variables are
involved. For more than two variables (multivariable) then the simplex
technique (algebraic method may be used).
Now in solving the problem above we first draw the axis, taking X 1 to be the y
axis and X2 to be the X axis.

X1

0
X2

Next we plot the scales on each axis to approximate the scales to use them, we
consider each constraint equation. We get the value of one of variables putting
the other variable to be zero and by substituting the inequality ≤or ≥ with
equality sign (=).

For: 0.5X1 + 0.33X2 ≤ 12


When X1 = 0
0.5(0) + 0.33X2 = 12
0.33X2 = 12
X2 = 12/0.33 = 36
Therefore point to plot is (36, 0) … Implying that when X 2 = 36
then X1 = 0
316
When X2 = 0
0.5X1 + 0.33(0) = 12
0.5X1 = 12
X1 = 12/0.5 = 24
Therefore the point is (0, 24)

For 0.5X1 + 0.5X2 ≤ 14


When X1 = 0
0.5(0) + 0.5X2 = 14
0.5X2 = 14
X2 = 14/0.5 = 28
Therefore the point is (28, 0)

When X2 = 0
0.5X1 + 0.5(0) = 14
0.5X1 = 14
X1 = 14/0.5 = 28
Therefore the point is (0, 28)

Comparing these values we see that X2 ranges between 0 – 28, therefore we


can have the graph plotted as:

Next draw each limitation (constraint) as separate line on the graph.


For 0.5X1 + 0.33X2 ≤ 12
The two points that represent this line are (36, 0) and (0, 24). This is plotted as
a straight line from 36 on X2 axis to 24 on X1 axis.

317
Now including the Non-Negativity constraints since no negative product can be
produced;
X1 ≥ 0; x2 ≥ 0

We must now consider how to choose the production which will maximize
contribution. This we do by plotting a line representing the objective function
(4x1 + 3x2).
318
First choose a convenient point inside the feasible region

E.g. X2(10) +3X1 (20) = 40 +60


= Sh 100

All of the other product mixes that give a contribution of Sh.100 lies on the
line:

100 = 4X1 + 3X2 ........................................... (i)


<<This line is called a contribution line>>

Picking another point, say X2 =10 ad X1 = 20


Its contribution value is SH 110, thus give a contribution line of

110 = 4X1 + 3X2 ............................................. (ii)

Plotting these two contribution lines to our graph we get two parallel lines.

Until we reach the last feasible solution(s) before the line moves entirely out of
the feasible region.

319
Point X is the last feasible solution. Coordinates of this point give a
combination of the two lager’s production volumes that fetches the highest
contribution.
Coordinates of point X can be read from the graph, but for precision they are
calculated by solving simultaneously the equations of the two lines that
intersect at point X.
The two constraints are called binding or limiting constraints. They are the
resources being fully used thus preventing daily contribution from increasing
further.
Therefore to get point x we solve:

0.5X1 + 0.33X2 = 12…. (i)


0.5X1 + 0.5X2 = 14 …. (ii)
Since X is the intersection of these two constraints, solving by deducting (i)
from (ii) we get
0.17X2=2
X2 =11.76

And substituting X2 = 11.76 to equation (i) we get


X1 = 16.24

Therefore 11.76 units of Benko lager and 16.24 units of Benoni lager need to be
produced for maximum contribution.

Contribution = 4(16.24) + 3(11.76) = 100.24

320
Requirements in linear programming
Assumptions that are made to solve these types of problems are that:.
• Proportionality: all activities in linear programming problems are
proportional to the level of decision variables.
• Divisibility: the solution to a linear programming problem does not have
to be an integer but for strictly whole number solutions, use integer
programming.
• Non-negativity: no decision variable can be negative.
• Additivity: the total of all activities in linear programming problems are
assumed to equal to the sum of individual activities.

Special cases in linear programming


• Infeasibility: This is when all constraints don’t satisfy a particular point
thus there is no feasible solution.
• Redundancy: A constraint is considered redundant if it does not affect
the feasible region. This happens in cases of excess resources since it
does not limit attainment of the objective.
• Multiple optimal solutions: This occurs when the objective function has
the same slope as a binding constraint.

Minimizing problem

Example
A manufacturing company has acquired new machine for producing product P
at a rate of 25 units per hour with a 98% rate of efficiency. The company
requires producing at least 1800 units of P per day. The 10 old machines that
the company has produce 15 units of P with 95% efficiency.
The cost of operating the new machine is Sh. 4 per hour and Sh. 3 per hour for
the old ones. The cost incurred due to inefficiency is Sh. 2 per unit; It is
government policy that at least 2 of the new machines must be indulged into
production.
The company wishes to optimally allocate the machines in order to minimize
the total manufacturing cost if the total available hours for production in a day
are 8 hours.

Solution
In minimizing problems we use ≥ (greater or equal to) type inequality.

Step 1: Identifying variables.


Since the problem requires us to appropriately allocate the machines in order
to minimize the costs thus our variables are the new machines and the old
machines, we can let;
X1 =new machines
X2=old machines

Step 2: Identify objectives:


The objective is to minimize manufacturing costs.
321
Total manufacturing cost per machine=Operating cost + (inefficiency rate ×
number of units × cost of loss)
Therefore cost for new machines
Cost = 4+ (0.02 × 25 × 2) = Sh. 5 per hour
=5 × 8= Sh. 40 per day]
Similarly for old machines
Cost = 3+ (0.05×15×2) = Sh. 4.5 per hour
=4.5×8=Sh. 36 per day
Therefore the objective function is to minimize 40X 1 + 36X2
Step 3: Identifying constraint functions.
X1 ≤ 8
X2 ≤ 10
(25 × 8) X1 +(8 × 15) X2 ≥1800 (This can be simplified further as)
200 X1 +120 X2 ≥1800 (dividing through by 40)
5X1 +3 X2 ≥45
X1 ≥2
X1, X2 ≥0

Thus the LP model is:


Minimize 40X1 + 36X2
Subject to: X1 ≤ 8
X2 ≤ 10
5X1 +3 X2 ≥45
X1 ≥2
X1, X2 ≥0
Plotting this on a graph we get:

X2

8
X1

322
The line X1 ≥2 does not affect the feasible region (doesn’t cause reduction of
the feasible region), this constraint doesn’t limit attainment of the objective,
thus its known as a redundant constraint.
Now picking a convenient point inside the feasible region, say (6, 10)

We get a total cost of 600 = (6(40)+10(36))


Thus the objective function line of 40X1 + 36X2 = 600

Moving this line parallel toward the origin to locate the last apex before the
line completely fall off the feasible region, we get:

Point X is the point of optimal solution


The binding constraints here are:
X1 ≤ 8
And 5X1 +3 X2 ≥45
Solving this to get coordinates of point X
5X1 +3 X2 = 45 (when X1 = 8)
40 + 3 X2 = 45
X2 = 5/3
Thus the solution is X1 = 8
X2 = 5/3

Shadow or dual prices


Definition: A shadow price or a dual price is the amount increase (or decrease)
of the objective function when one more (or one less) of the binding
constraints is made available.
Consider example 1.

Maximize 4X1 + 3 X2
323
Subject to: 0.5X1 + 0.33X2 ≤ 12 (Machine hours)
0.5X1 + 0.5X2 ≤ 14 (labor hours)
Starting with machine hours; let’s assume that one more machine hour is
available (with labor hours remaining constant)
We get:
0.5X1 + 0.33X2 = 13
0.5X1 + 0.5X2 = 14
Solving this simultaneously we get the values of X1 and X2 as
0.17 X2 = 1
X2 = 5.88
X1 = 22.12
Thus the contribution is
4(22.12) + 3(5.88) = Sh.106.12
Comparing this with its original contribution of Sh.100.24 (see example 1) we
see increasing machine hours by one unit has increased contribution by
Sh.5.88, which is the shadow price per machine hour.
Note: This figure is also arrived at if we assume that machine hours are
reduced by 1 unit i.e. 12-1.
Similarly assuming that one more labor hour is made available, and then
contribution change is:
0.5X1 + 0.33X2 = 12
0.5X1 + 0.5X2 = 15
Solving this simultaneously gives:
0.17 X2 =3
X2 = 17.65
X1 = 12.35
Which give a contribution of.
4(12.35) + 3(17.65) = Sh.102.35
The contribution change is Sh.2.11 which is the shadow price per labor hour.

Note:
The shadow prices apply in so far as the constraint is binding for example if
more and more labor hours are available it will reach a point where labor hours
are no longer scarce thus labor hours cease to be a binding constraint and its
shadow price becomes a zero.(All non-binding constraints have zero shadow
price). Logically its senseless to pay more to increase a resource, which is
already abundant.

Interpretation of shadow prices


A shadow price of a binding constraint indicates to management how much
extra contribution will be gained by increasing a unit of the scarce resource.
In the example above Sh.2.11 is the shadow price for labor hours. This implies
that management is ready to pay up to Sh.2.11 extra per hour for the extra
hours i.e. say an employee is paid sh.5 per hour and one day he works for two
hours extra (overtime), the management is prepared to pay up to sh.7.11 per
hour for the two hours overtime worked.

Sensitivity Analysis

324
Definition: Sensitivity analysis is the test of how certain changes in resources
affect the optimal solution.

In sensitivity analysis we consider the effect of additional limiting or non-


limiting constraints.
We already know that adding more non-limiting constraints does not change
the optimal solution.
We also know that adding more binding constraints affects the objective
function.
It is very important for the management to know how much of a limit resource
can be made available until it has no effect on the objective function (ie
ceases to be a binding resource)

SIMPLEX METHOD
When analyzing linear programming problems with three or more variables the
graphical method becomes enadequate, in such cases we employ simplex
method . Simplex method is an algebraic procedure for solving systems of
equations requiring optimization of the objective function..
This method can be applied to any number of variables, the more they are the
more complex it becomes to workout a solution on paper. Computer programs
e.g. Tora are used to solve the most intricate problems.
The first step in simplex method is conversion of inequalities to linear
equations

Example
Consider the linear problem.
Maximize 45 x1 + 80 x2
Subject to 5 x1 + 20 x2  400
10 x1 + 15 x2  450
x1  0, x2  0
Solution.
1. To convert this problem to a system of linear equation, we introduce
slack variables to each constraint.
Z = 45 x1 + 80 x2
Subject to 5 x1 + 20 x2 + x3 = 400
10 x1 + 15 x2 + x4 = 450
x1 , x2 , x3 , x4  0

Where the structural variables x3 and x4 are slack variables

2. we then place this information in a tabular form known as a tableau


Initial tableau
Solutio Products Slack Solutio
n Variables n
Variabl x1 x2 x3 x4 Quantit

325
e y
x3 5 20 1 0 400
x4 10 15 0 1 450
Z 45 80 0 0 0

The tableau shows that


x3 = 400
x4 = 450
Z =0 (Total contribution)
It also show that unused capacity is at maximum i.e. the value for the slack
x3 and x4 is 0.
After several operations and when an optimal solution has been attained, these
values will change to give an optimal feasible solution.

3. Select the column with the highest value of Z (i.e. 80), then devide the
positive numbers in that column (i.e. the x 2 column) into the quantity
column.
i.e. 400  20 = 20
450  15 = 30

Chose the row giving the lowest result (in our case the row with x 3 gives 20)
and mark the element falling on the intersection of the selected row and
selected column (i.e. 20: selected element)

4. Divide all the elements in the selected row by the value of the selected
and change the solution variable to the heading of the identified column
(from x3 to x2)
Thus the tableau will appear as follows.
Solutio Products Slack Solutio
n Variables n
Variabl x1 x2 x3 x4 Quantit
e y
x2 1
4
1 1
20
0 20
x4 10 15 0 1 450
Z 45 80 0 0 0

5. Next we conduct row operations that aim to reduce elements falling in


the same column as the previously marked element to zero. These row
operations may sometime necessitate multiplying or dividing the
selected row with an arbitrary number.

Therefore:
Row 2 – 15×Row 1

326
x4 10 15 0 1 = 450

15  x2 15
4 15 15
20 0 = 300
new x4 6 14 0* 34 1 = 150
Note that the aim was to attain the zero.

Z 45 80 0 0 = 0

80  x2 20 80 4 0 = 1600
new Z 25 0* −4 0 = −1600

On replacing the new rows to the tableau we get


2nd tableau.
Solutio Products Slack Solutio
n Variables n
Variabl x1 x2 x3 x4 Quantit
e y
x2 1
4
1 1
20
0 20
x4 6 14 0 3
4
1 150
Z 25 0 -4 0 -1600

Since in the Z row under products column we still have values greater than
zero, we conduct another operation.

Taking the column with a Z value of 25, we repeat the process in the same
manner.
20  14 = 80
150  6 14 = 24

Thus we pick the x4 row and mark the element 6 14 , the row solution
variable is changed to x1 and we divide the row by 6 14 to convert the
marked element to 1.
Therefore; x1 1 0 3
25
4
25 = 24

Next we do the row operations


x2 14 1 201 0 = 20

( 4 ) x1 4 0 100 100 = 6
1 3 4

new x
2 0* 1 1
50 − 251 = 24

Z 25 0 −4 0 = −1600

25  x1 25 0 3 4 = 600
new Z 0* 0 −7 − 4 = −2200

the tableau becomes, 3rd Tableau


Solutio Products Slack Solutio
327
n Variables n
Variabl x1 x2 x3 x4 Quantit
e y
x2 0 1 1
50 − 251 24
x1 1 0 3
25
4
25
24
Z 0 0 -7 -4 -2200

This is the final tableau since the Z row has no values greater than zero thus
we have the optimal solution.

Interpretation
• to maximize Z we need to produce 24 units x2 and 24 units of x1, we
obtain these values from the solutions quantity column
Thus, Z = 24(45) + 24(80) = 3000

• We have zero slack (unused quantities of constraints).


Assume tableau 2 is the final tableau and let the constraint with variable
x3 be labor hours and x4 are raw materials, the slack would’ve been
interpreted as:
o 150 units of raw materials were unused
o To maximize Z we produce 20units of x2 and none of x1.
• The value represents in Z row under slack variable column represents
shadow prizes. Thus the shadow prize for the first constraint with x 3
is 7 and the shadow prize for the second constraint with the variable
x4 is 4.

INTERPRETATION OF COMPUTER GENERATED SOLUTION

Example
Maximize 25 x1 + 20 x2 + 24 x2
where : x1 = Xtragrow, x2 = Youngrow, x3 = Zupergrow
Subject to 0.3x1 + 0.2 x3  500
0.5 x2 + 0.4 x3  1000
0.2 x1 + 0.1x2 + 0.1x3  800
0.4 x2 + 0.3x3  600
x1  1500
x1  0, x2  0, x3  0
The computer generated solution for this problem is as follows;

Objective value = 71666.7


Variable Value Obj. Coeff Obj Value
Contribution
X1: Xtragrow 1666.7 25 4166.7
X2: Youngrow 1500 20 30000
X3: Zupergrow 0 24 0
328
Constraint RHS Slack-
/Surplus+
1(<) 500 0
2(<) 1000 250-
3(<) 800 316.67-
4(<) 600 0
5(>) 1500 166.7+

Sensitivity Analysis
Variable Current obj Min obj coeff Max Obj Reduced
coeff Coeff cost
X1: Xtragrow 25 13.50 Infinity 0
X2: Youngrow 20 9.78 Infinity 0
X3: 24 -Infinity 31.67 7.67
Zupergrow
Constraint Current RHS Min RHS Max RHS Dual price
1(<) 500 450 975 83.33
2(<) 1000 750 Infinity 0
3(<) 800 483.3 Infinity 0
4(<) 600 0 800 50
5(>) 1500 -Infinity 1666.7 0

Required
Interpret the data generated by the computer.

Solution.
Table 1:
Objective value, is the solution to objective function (e.g. the solution to this
example is 71,436)
The four columns of table 1 are to be interpreted as follows;
• Variable: these are the variables of the model. In our example we have
x1 = Xtragrow, x2 = Young row and x3 = Zupergrow
• Value: this is value that the variables assume at optimal solution (to
optimize the objective function one needs to produce this amounts of
the variables). In our example we are required to produce 1,666.67 of x1
and 1,750 of x2 and none of x3
• Objective coefficient: these are the coefficients of the objective
function
• Objective value contribution: this is the value contributed by each
variable to the objective function (for x1=25×1,666.67), the total of this
is equal to our objective value (i.e. 41,666.67+35,000=76,666.67).

The 3 columns of the second part of table1 can be interpreted as follows;


• Constraints: this is constraints of the model representing the limited
resources.
• RHS: the Right hand side value is the limiting value of the constraint.
E.g. for the first constraint the maximum amount of material A is 500
tons.
329
• Slack/surplus: at optimal production not all the materials for some of
the constraints will be fully utilized, slack is the amount of material that
is left over after production. For constraint 1 and 4 no material
remained, this also implies that these are the binding constraints i.e.
their adjustment directly affects the objective solution

Sensitivity Analysis
This is the analysis of the effect of adjusting variables or constraint, whether
the objective solution will be affected. How much of the objective coefficient
(or the maximum available amount of a constraint) can be reduced or
increased without affecting the objective solution.
The columns of this table can be interpreted as follows;
Variable: as explained above
Current objective coefficient: this is the value of coefficients of the
objective function
Minimum objective coefficient: this is how low the coefficient can be
reduced without affecting the optimal basis. The coefficient for x1 can
be reduced from 25 to 13.50 (the prize for Xtragrow fall to as low as
$13.50 from $25) but the optimal solution will remain the same

Maximum objective coefficient: this is how high the coefficient can be


increased without affecting the optimal basis

Reduced cost: this is amount by which the coefficient of the variable has to
be adjusted with for it to become a basic variable (included to the
objective optimal solution). X1 and x2 have 0 reduced costs implying
that they already make part of the optimal solution, x3 will require to
be increased by 7.67 for it to make part of the basic variable.

The second part of the table is interpreted as follows;


• Constraints: as described above
• Current Right Hand Side: the limiting value of the constraint. E.g. for
the first constraint the maximum amount of material A is 500 tons.
• Minimum RHS: the lowest the available amount of the constraint can be
reduced without affecting the optimal basis
• Maximum RHS: the highest the available amount of the constraint can
be increased without affecting the optimal solution
• Dual price: this is amount increase to the objective contribution due to a
unit increase of the available constraint. Since there is only 500 tons of
material A, if management decides to increase it by a unit to 501tons
then the objective optimal solution will be 76,666.67+83.33.

330

You might also like