Anda di halaman 1dari 34

Operations Research 1

1. Introduction

1.1. Definition of Operations Research

There have been various definitions for Operations Research (O.R.) like applied
decision making, quantitative common sense, making of economic decision, etc.
Here we pick one of the most appropriate;

Definition: Operations research


Operations research is the application of up to date scientific methods,
techniques by inter-disciplinary teams to problems involving control of or-
ganized systems so as to provide solutions which best serve the purposes of
the organization as a whole.
SMA 2343
All rights reserved

Operations Research provides executive departments with a quantitative basis


for decision making regarding the operations under their control.

1.2. Characteristics of Operations Research

Interdisciplinary team approach:- it is developed by a team of scientists drawn


from various disciplines. e.g. mathematicians, statisticians, economists, engi-
neers, etc.
Systems approach:-emphasis is on the overall approach to a system in order to
get the optimum decisions.
Helpful in improving the quality of solutions -Doesn’t give perfect answers but
merely gives bad answers to the problems which otherwise have worst answers.
Scientific method:- Operations Research uses techniques of scientific research
Goal Oriented Optimum Solution:- Tries to optimize a well-defined function
subject to given constraints (optimization).
Uses models:- Operations Research uses models built by quantitative measure-
ment of the variables concerning a given problem. -It also derives solutions
from the models.
Requires willing executives:- For experiments of alternative solutions.

JJ II
JKUAT J.
c M. Kihoro 1
J I
J DocDoc I
Back Close
Operations Research 1

Reduces complexity:- Simplifies the work of executives especially due to prior


experimentations.
Operations Research is therefore both a science and an art.

1.3. Methodology of Operations Research

(a) Problem identification: Recognition that a problem exists is very


important in any management decision-making process, but in
practice its timing may be critical (resolve an existing problem
or to forestall a predicted problem).

(b) Formulating the problem: Once it becomes apparent that a prob-


lem exists-and a solution is required-the problem must be explicitly
formulated in terms of;
SMA 2343
All rights reserved

• The perceived boundaries or limits to the problem.


• The objectives of the investigation.
• The defined roles of those involved in the investigation.
• The decision variables making up the problem are within the
control of the decision-maker and which are not.

(c) Constructing the model: This step involves constructing the model
or the mathematical expressions describing inter-relations of all
variables and parameters in the study. The model must include an
objective function which defines the measure of effectiveness of the
system and the constraints or the restrictions.

(d) Deriving the solution: This involves finding the optimal values
of the controlled (independent) variables that produce the best
performance of the system for specified values of the uncontrolled
(dependent) variables. An optimum solution is determined on the
basis of the various equations of the model satisfying the given
constraints and optimizing the objective function.

JJ II
JKUAT J.
c M. Kihoro 2
J I
J DocDoc I
Back Close
Operations Research 1

(e) Testing the model validity: The solution values of the model, ob-
tained at solutions stage are then tested against actual observa-
tions. In other words, effort is made to test the validity of the
model used. A model is supposed to be valid if it can give reliable
prediction of the performance of the system represented through
the model. In effect, performance of the model must be compared
with the policy or procedure that it is meant to replace.

(f) Controlling the solution: This step of an O.R establishes control


over the solution by proper feed-back of information on variables
which might have deviated significantly.

(g) Implementing the results: Implementing the results constitutes the


SMA 2343
All rights reserved

last step of an OR study. Because the objective of O.R. is not


merely to produce reports but to improve the performance of sys-
tems, the results of the research must be implemented, if they are
acceptable.

The nature of a problem dictates the Operations Research method to be used


among the available ones.

1.4. Some useful definitions

(a) Model: This is a representation or abstraction of the real/actual


object.

(b) Objective function: This is a mathematical function decision to be


optimized.

(c) Constraints: Equations or inequalities representing the restrictions


imposed on the decision variables.

(d) Model formulation: The process of determining the objective func-


tion and constraints each expressed in terms of decision variables.

(e) Feasible solution: Set of the decision variables which satisfy all the
constraints.
JJ II
JKUAT J.
c M. Kihoro 3
J I
J DocDoc I
Back Close
Operations Research 1

2. Classification of Problems in O.R.

Broadly speaking, problems in O.R. can be categorised; Some of the categories


are;

1. Allocation: Allocation problems involve the allocation of resources to


activities in such a manner that some measure of effectiveness is opti-
mized. E.g. Jobs to applicants, Money to investment projects

2. Replacement: Replacement problems are concerned with situations


that arise when some items (such as machines, electric light bulbs, etc.)
need replacement because the same may deteriorate with time or may
break down completely or may become out-of-date due to new devel-
opments. Replacement problems thus occur when one must decide the
SMA 2343
All rights reserved

optimal time to replace equipment for one reasons or the other.

3. Sequencing: Sequencing problems are the problems concerned with


placing items in a certain sequence or order for service. For instance,
N-jobs requiring different amounts of time on different machines must
each be processed on M-machines in the same order with no passing
between machines, then the question: How should the jobs be ordered
for processing to minimize the total time to process all of the jobs on all
of the machines constitutes an example of a sequencing problem.

4. Routing: Routing problems are problems related to finding the optimal


route from an origin to a destination when a number of alternative routes
are available. For example, a salesman may wish to visit each of N-
cities once and only once before returning to his headquarter, then his
problem is: In what order should he visit the cities so that the overall
distance travelled is minimized? Such a problem is referred to as a
routing problem.

5. Inventory: Inventory problems are problems with regard to holding


or storing resources. The decisions required generally entail the deter-
mination of how much of a resource to acquire or when to acquire it.
The problem of deciding how much of a certain commodity to hold in
JJ II
JKUAT J.
c M. Kihoro 4
J I
J DocDoc I
Back Close
Operations Research 1

inventory is one of real concern to business and industrial houses. In-


ventory problem is the problem to determine the level of inventory that
will optimize the measure of effectiveness.

6. Queuing: Queuing problems or what are known as waiting-line prob-


lems are problems that involve waiting for service, Queuing problems
encircle us from the time we rise in the morning until we retire at night
In business world several types of interruptions occur: facilities break
down and require repair, power failures occur, workers or the needed
material do not show up where and when expected. Allocation of facili-
ties Considering such interruptions be done and to do so means solving
a queuing problem.
SMA 2343
All rights reserved

7. Competitive: arise when two or more people are competing for a


certain resource which may range from an opponents king in a game of
chess to a larger share of the market in business world

8. Search: Search problems are problems concerned with searching for


information that is required to make a certain decision, The problem
concerning exploring for valuable natural resources like oil or some other
mineral is an example of a search problem.

2.1. Operations Research Techniques

Mathematical models have been constructed for the above categorized O.R.
problems and methods for solving the models are available in many cases.
Such methods are usually termed as O.R. techniques. Some of the important
O.R. techniques often used by decision-makers in modern times are;

(a) Programming (Linear, Non - linear Programming, Dynamic, Heuris-


tic, Integer, Algorithmic etc.)

(b) Queuing theory/waiting line

(c) Inventory Analysis

(d) Network analysis


JJ II
JKUAT J.
c M. Kihoro 5
J I
J DocDoc I
Back Close
Operations Research 1

(e) Simulation

(f) Game theory

(g) Decision theory

Exercise 1. Read and make some notes on


1. Significance of Operations Research
2. Limitations of Operations research

Begin Quiz
Answer each of the following questions before you proceed.

1. (2mks) OR is because it is developed by math-


SMA 2343
All rights reserved

ematicians, statisticians, economists, engineers, etc.


2. (2mks) is the process of determining the objec-
tive function and constraints each expressed in terms of decision variables.
3. (2mks) is the first of the five steps of an OR
inquiry
4. (2mks) Under which category of OR problems is Decision theory?

End Quiz
Marks: Correct Percent:

Comments:

JJ II
JKUAT J.
c M. Kihoro 6
J I
J DocDoc I
Back Close
Operations Research 1

3. Linear Programming

Linear Programming deals with problems in which linear functions are to be


optimized (maximized or minimized) subject to constraints which are usually
specified by linear inequalities, linear equations and to the condition that all
the variables must assume negative values.
The general formulation of linear programming problems is as follows.
Optimize the objective function

Z = c1 x1 + c2 x2 + ... + cn xn

Subject to the linear constraints

a11 x1 + a12 x2 + ...a1n xn {≤, =, ≥}b1


SMA 2343
All rights reserved

a21 x1 + a22 x2 + ...a2n xn {≤, =, ≥}b2


.
.
.
am1 x1 + am2 x2 + ...amn xn {≤, =, ≥}bm

and to the non-negative condition

x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, ...xn ≥ 0

There are many problems in engineering management and social sciences that
can be formulated this way.
In matrix form we can write as

~
Optimize Z = ~c> X ~
subject to AX{≤, ~
=, ≥}B, ~ ≥ 0.
X

where the underline denotes a vector and bold denotes a matrix.

• Optimal feasible solution


In a linear programming problem a set of the values of the decision variables
x1 , x2 , ...xn that satisfy the linear constraints and the nonnegative condition is
called a feasible solution

JJ II
JKUAT J.
c M. Kihoro 7
J I
J DocDoc I
Back Close
Operations Research 1

Definition: Optimal feasible solution


Optimal feasible solution is the set of decision variables which is feasible
and optimizes the objective function.

In order to obtain the Optimal feasible solution, we need to have some concepts
from linear algebra.

3.1. Convex analysis

Definition: A line in Rn or n-dimensional space


The set
L(x1 , x2 ) = {X|X = λx1 + (1 − λ)x2 , λ ∈ (0, 1)

That is any point X on the line joining x1 and x2 can be written as


SMA 2343
All rights reserved

X = λx1 + (1 − λ)x2 where λ is a parameter such that 0 < λ < 1.

Definition: A Convex set in Rn


The set C in which any line joining two points in C is entirely contained in
C.

That is the point λx1 + (1 − λ)x2 is in C given that x1 and x2 are in C.


Diagrams-Examples
Diagrams-Non-Examples

Hyperplane - A hyperplane in Rn is the set

H = {X|a> X = β}

where a> is a fixed vector different from zero and β is a constant.


⇒ A hyperplane divides Rn into two half open spaces.

s1 = {X |a> X > β} and s2 = {X |a> X < β}


− −
JJ II
JKUAT J.
c M. Kihoro 8
J I
J DocDoc I
Back Close
Operations Research 1

⇒ If H is included in the spaces s1 and s2 , then we have the closed half spaces.

sc1 = {X|a> X ≥ β} and sc2 = {X|a> X ≤ β}

Example. Show that a closed half space sc1 = {X|a> X ≥ β} is a convex set.
Let X 1 and X 2 be two points in sc1 then a> X 1 ≥ β and a> X 2 ≥ β
then any point X on the segment joining x1 and x2 is given by

X = λX 1 + (1 − λ)X 2 λ ∈ (0, 1)

multiplying both sides by a> gives

a> X = λa> X 1 + (1 − λ)a> X 2


SMA 2343
All rights reserved

≥ λβ + (1 − λ)β
a> X ≥ λβ + β − λβ
⇒ a> X ≥ β

which is a member of sc1 . Since X 1 and X 2 were arbitrarily chosen, the set
sc1 is a convex set.

Theorem 3.1 The intersection (null set) of convex sets is also convex. Let
x1 and x2 be two points in C = c1 ∩ c2 ... ∩ cn (Ci is a convex set i). Since Ci
is convex for all i, then the line segment joining x1 and x2 is entirely in set Ci
for all i. This line is entirely in C ⇒ C.

Convex polytype - This is a set which is an intersection of a finite number of


closed half-spaces (e.g. For a polygon in R2 . X − Y < 0, X ≤ 2, Y ≥ 0.)

3.2. Convex Combinations

Let x1 , x2 , ..., xn be n points in a convex set ~c ∈ Rn , then a point X is said to


Pn Pn
be a convex combination of xi (i = 1, 2, ..., n)ifx = αi xi where αi = 1
i=1 i=1
and αi ≥ 0 ∀ i

JJ II
JKUAT J.
c M. Kihoro 9
J I
J DocDoc I
Back Close
Operations Research 1

Theorem 3.2 A set of convex combinations of the points x1 , x2 , ..., xn ∈ C


where C in convex is also convex. Let C be the set of all convex combinations
n
P
of x1 , x2 , ..., xn , let Y1 and Y2 be two points in C, then Y1 = αi xi and
i=1
n
P P P
Y2 = β i xi αi = βi =1 αi , βi ≥ 0. Let x0 be any point on the
i=1
line segment joining Y1 and Y2 , then x0 can be written as x0 = λY1 + (1 −
λ)Y2 λ ∈ (0, 1)

⇒ x0 = λY1 + (1 − λ)Y2
Pn n
P
= λ αi xi + (1 − λ) βi xi
i=1 i=1
n
P n
P
= (λαi + (1 − λ)βi )xi = θi xi
i=1 i=1
θi = λαi + (1 − λ)βi and λ ∈ (0, 1)
SMA 2343
All rights reserved

Since αi ≥ 0, βi ≥ 0 then θi ≥ 0 and again


n
P n
P
θi = λαi + (1 − λ)βi
i=1 i=1
P P
= λ αi +(1 − λ) βi
=λ+1−λ=1
n
P n
P
Thus x0 = θi xi whereθi ≥ 0and θi = 1. the line segment joining Y1 and
i=1 i=1
Y2 in C is therefore entirely contained in C and C is convex.

Definition: convex combination


A convex combination of n+1 points is known as n-simplex. i.e. if it has 3
points (non-linear) then it is a 2-simplex

Example. Prove that any point inside the triangle is a convex combination
of x1 , x2 andx3 Let x0 be any point inside the triangle. By definition x0 =
λx1 + (1 − λ)Y λ ∈ (0, 1)
But
Y = λx2 + (1 − λ)x3 (on line x2 , x3 ) λ ∈ (0, 1)

JJ II
JKUAT J.
c M. Kihoro 10
J I
J DocDoc I
Back Close
Operations Research 1

Therefore
x0 = λx1 + (1 − λ)[x1 x2 + (1 − λ1 )x3 ]
= λx1 + λ1 x2 + (1 − λ1 )x3 − λλ1 x2 − (1 − λ1 )x3
= λx1 + (λ − λλ1 )x2 + (1 − λ1 − λ + λλ1 )x3 .
P3
x0 = α k xk
k=1

where
α1 = λ
α2 = λ − λλ1
α3 = λ − λ1 − λ + λλ1
3
P
x0 = αk xk = α1 x1 + α2 x2 + α3 x3 . Since 0 < λ < 1and0 < λ1 < 1 then
k=1
αi0 s ≥ 0 for all i (i = 1, 2, 3).
SMA 2343
All rights reserved

3
P
Now α1 +α2 +α2 = λ+λ−λλ1 +1−λ1 −λ+λλ1 = 1 therefore α k = 1 ⇒ x0
k=1
is a convex combination of x1 , x2 and x3 .

3.3. Extreme points of a convex set

Let C be a convex set. A point Z is an extreme point in C if and only if its not
possible to find points X and Y in C such thatZ = λX+(1−λ)Y λ∈
(0, 1).
We note that the extreme points are actually the vertices or corner points.

Example
Consider the figure

figure

It is not possible to locate two distinct points in or on the above figures(Convex


sets) with the property that the line joining these points will include the ex-
treme points (E) and be included in the convex set.

Theorem 3.3 The convex set of feasible solution of linear programming prob-
lem has at least one extreme point and at most a finite number of extreme points.
The objective function is optimized at one of the extreme points.
JJ II
JKUAT J.
c M. Kihoro 11
J I
J DocDoc I
Back Close
Operations Research 1

Note that the convex set in a linear programming problem is the constraint
set.

3.4. Optimal solutions to linear programming (LP) problems

In Linear Programming problem we are required to optimize the objective


function
p = C0 X

under a constants set. Suppose that R is the constraint set of the given
problem, then the optional solution is an extreme point of R

Theorem 3.1 A basic feasible solution of a linear programming problems is


an extreme point of the constraint set
SMA 2343
All rights reserved

3.5. Formulation and solutions to LP problems

Formulation of Linear Programming models is the process of deter-


mining the objective function and the set of constraints into a mathematical
model each stated in terms of the decision variables. Solution is then the de-
termination of the optimal feasible solution. This can be done graphically (for
a maximum of 2 decision variables or using simple algorithm.

• Graphical method
This involves representing all the constraints on a graph. The region of inter-
section represents the feasible region and by theorem (3.1), one of the extreme
points gives the optimal solution.

Example. The manager of a theatre which has a capacity of 300 seats sells
tickets to children and adults at Shs.10 and Shs.50 respectively. To cover his
rental expenses, he has to take at least Shs. 2500 for each show.
It is the company’s policy to have at least 100 seats spared for children.
Formulate this problem for profit maximization and solve it graphically.
Solution: Let x and y be the number of 10/= and 50/= seats occupied respec-
tively. Then we need to;

Maximize 10x + 50y subject to;


JJ II
JKUAT J.
c M. Kihoro 12
J I
J DocDoc I
Back Close
Operations Research 1

x + y 6 300 (restriction on the hall capacity)


10x + 50y > 2500 (restriction on total collection)
x ≥ 100 (restriction on seats for children)
y≥0
Graph
SMA 2343
All rights reserved

Figure 1: One point at the vertex (corner) maximizes the


profit. At point;, Testing for optimal solution. At point
A(100, 30), z = 10(100) + 50(30) = 2500
B(100, 200), z = 10(100) + 50(200) = 11000
C(300, 0), z = 10(300) + 50(0) = 3000
D(250, 0), z = 10(250) + 50(0) = 2500
The maximum occurs at x = 100, y = 200, the firm should therefore sell 100
seats/tickets for children and 200 for adults in order to make a maximum
profit of Ksh 11,000.

Example. A farmer has 50 of land to on which to plant maize and beans. He


has a workforce of 150 laborers and it takes 4 laborers to work on 1 ha of maize
and 2 laborers to work on 1 ha of beans. He has a capital of $4500 and 1 ha
of maize requires $50 to cultivate (inputs) while 1 ha of beans requires $100.
Suppose that the farmer wishes to maximize the profits and the profit per ha
is $30 for maize and $40 for beans, set up a linear programming problem and
solve it.
Solution

JJ II
JKUAT J.
c M. Kihoro 13
J I
J DocDoc I
Back Close
Operations Research 1

Let x and y be the number of ha on maize an beans respectively then, we


have
Maximize p = 30x + 40y subject to
x + y ≤ 50 (Constraint on land)
4x + 2y ≤ 150 (Constraint laborers)
50x + 100y ≤ 4500 (Constraint on capital)
x, y ≥ 0 (Non-negativity condition on decision variables)
We can represent the constraints in a graph as follows
SMA 2343
All rights reserved

Figure 2: Testing for optimal solution. At point


A(0, 0), p = 30(0) + 40(0) = 0, B(0, 45), p = 30(0) + 40(45) = 1800
C(10, 40), p = 30(10) + 40(40) = 1900 B(25, 25), p = 30(25) + 40(25) = 1750
(37.5, 0), p = 30(37.5) + 40(0) = 1125
The maximum occurs at x = 10, y = 40, The farmer should therefore
cultivate 10 ha of maize and 40 ha of beans order to make a maximum profit
of $1900.

3.6. The simplex method

This is a step by step method which is used to solve linear-programming prob-


lems with any given number of decision variables
Method
Set objective function p = 0 and decision variables X to zero (0). (No pro-
duction).
Move progressively till no more combination can be made. i.e. Each step

JJ II
JKUAT J.
c M. Kihoro 14
J I
J DocDoc I
Back Close
Operations Research 1

should give a better Solution as you increase or decrease the decision vari-
ables.

Definition: Slack variable


Slack variable a non-negative variable which when added to a less that or
equal to inequality makes it an equation.
Example.
x+y ≤7

but
x + y + s1 = 7

Then s1 is a slack variable


SMA 2343
All rights reserved

Definition: Surplus variable


Surplus variable a non-negative variable which when added to a greater
than or equal to inequality makes it an equation.
Example.
x+y ≥7

but

x + y = s2 + 7

Then s2 is a surplus variable

Let x and y be the number of ha on maize an beans


respectively then, we have

Maximize p = 30x + 40y subject to


x + y <= 50 (Constraint on land)
4x + 2y <= 150 (Constraint laborers)
50x + 100y <= 4500 (Constraint on capital)
x, y >= 0
JJ II
JKUAT J.
c M. Kihoro 15
J I
J DocDoc I
Back Close
Operations Research 1

which simplifies to;


Maximize p = 30x + 40y subject to;
x + y <= 50
2x + y <= 75
x + 2y <= 90

x, y >= 0

Adding slack variables s1, s2 and s3 and constructing the


initial tableau leads to
SMA 2343
All rights reserved

Tableau #1
Basis x y s1 s2 s3 p Solution
s1 1 1 1 0 0 0 50
s2 2 1 0 1 0 0 75
s3 1 2 0 0 1 0 90
p -30 -40 0 0 0 1 0

This solution Not optimal because there exists -ve values in


p row. Entering variable corresponds to the most negative value
p-row =>y Maximum y=min(50/1, 75/1, 90/2)=45
from 90/2, which implies that pivot value = 2 and departing
variable is s3

New row z=s3/2

Reducing all the elements of y column to zero using Jordan gauss


computations gives Tableau #2

Tableau #2

JJ II
JKUAT J.
c M. Kihoro 16
J I
J DocDoc I
Back Close
Operations Research 1

Basis x y s1 s2 s3 p Solution
s1 1/2 0 1 0 -1/2 0 5
s2 3/2 0 0 1 -1/2 0 30
y 1/2 1 0 0 1/2 0 45
p -10 0 0 0 20 1 1800

This solution Not optimal because there exists -ve values in


p row. Entering variable corresponds to the most negative value
in p-row =>x
Maximum x=min(5/(1/2),30/(3/2), 45/(1/2))=10 from 5/(1/2),
which implies that pivot value = 1/2 and departing variable is s4
New row z=s1/(1/2)
SMA 2343
All rights reserved

Reducing all the elements of x column to zero using Jordan gauss


computations gives Tableau #3

Tableau #3
Basis x y s1 s2 s3 p Solution
x 1 0 2 0 -1 0 10
s2 0 0 -3 1 1 0 15
y 0 1 -1 0 1 0 40
p 0 0 20 0 10 1 1900

the corresponding solution is s1=0, s2=15, s3=0, x=10, y=40 and


Max p=1900.

The farmer should cultivate 10 ha of maize 40 ha of beans


in order to make a maximum profit of $1900

Example. A company manufactures two products A and B. The profit per


ton of the two products are $50 and $60 respectively. Both products require
processing in three machines M1 , M2 and M3 . With the following table giving
the details of (Hrs per 1 tonne)
JJ II
JKUAT J.
c M. Kihoro 17
J I
J DocDoc I
Back Close
Operations Research 1

A B Total available (Hrs) pwk


M1 4 2 600
M2 3 4 500
M3 4 6 800

Assuming that no other constraints, find A and B that maximizes the


weekly profit
Solution: The solution is as follows

Maximize p = 50x + 60y subject to


4x +2y <= 600
3x +4y <= 500
4x +6y <= 800
SMA 2343
All rights reserved

x, y >=0

The final table is #3 given by

Basis x y s1 s2 s3 p Solution
x 1 0 2/5 -1/5 0 0 140
y 0 1 -3/10 2/5 0 0 20
s3 0 0 1/5 -8/5 1 0 120
p 0 0 2 14 0 1 8200

Practice questions. LPs Formulation and solutions

1. A furniture manufacturer makes two products: chairs and tables. Pro-


cessing of these products is done on two machines A and B. A chair
requires 2 hours on machine A and 6 hours on machine B. A table re-
quires 5 hours on machine A and no time on machine B. There are 16
hours of time per day available on machine A and 30 hours on machine
B. Profit gained by the manufacturer from a chair and a table is shs 200
and shs 100 respectively. What should be the daily production of each
of the products? (solve it graphically and using simplex method).
JJ II
JKUAT J.
c M. Kihoro 18
J I
J DocDoc I
Back Close
Operations Research 1

2. A company produces two types of leather belts; say A and B. Belt A is


of superior quality and belt B is inferior. Profits on the two are sh40
and shs 30 per belt respectively. Each belt of type A requires twice as
much time as required by a belt of type B. If all belts were of type B, the
company could produce 1,000 belts per day. But the supply of leather
is sufficient only for 800 belts per day. Belt A requires a fancy buckle
and only 400 of them are available per day. For belt B only 700 buckles
are available per day. How should the company manufacture two types
of belts in order to have a maximum overall profit? (solve it graphically
and using simplex method).

3. The manager of a hotel has sufficient money to buy a total of 100 crates
of soft drink of types A and B. He wants to buy at least twice as many
SMA 2343
All rights reserved

crates of type A as type B. He wants to buy maximum 80 crates of type


A and at least 10 crates of type B. Taking X to be the number of type
A crates and Y that of type B, write down all the inequalities based on
these facts. Show these inequalities on a graph and outline the region
in which (X, Y) must lie. The profit on a crate of type A is Shs. 60
and that of a crate of type B is Shs. 40. Find the number of crates of
each type that he should buy to make maximum profit and calculate this
maximum profit. (solve it graphically and using simplex method).

4. A chemical firm has 160 litres of solution A, 110 litres of solution B and
150 litres of solution C. To prepare a bottle of syrup X, 200ml of solution
A, 100ml of solution B and 100ml of solution C are needed. For a bottle
of syrup Y, 100ml of A, 200ml of B and 300ml of C are needed. Syrup
X sells at Shs. 60 per bottle and Syrup Y sells at Shs. 100 per bottle.
How many bottles of each type of Syrup should the firm make in order
to obtain the maximum amount of money? (solve it graphically).

5. A farmer requires 10, 12 and 12 units of chemicals A, B and C respec-


tively for his garden. A liquid product contains 5, 2 and 1 units of A, B
and C respectively per bottle. A dry product contains 1, 2 and 4 units
of A, B and C per carton while a paste product contains 1, 3 and 1 units

JJ II
JKUAT J.
c M. Kihoro 19
J I
J DocDoc I
Back Close
Operations Research 1

of A, B and C per jar. If the liquid product sells at shs 30 per bottle,
the dry product sells at shs 20 per carton and the paste product at Ksh
25 per jar, How many of each should he purchase in order to minimize
the cost and meet the requirements? (Formulate and don’t solve).

6. A farmer has 70 hectares of land available for growing maize and beans.
The cost of growing 1 ha of maize is $30 and the cost for growing 1 ha
of beans is $20 and the farmer has only $1800 available. The labor per
ha is 2 man days for maize and 4 man days for beans and a total of
240 man days of labour are available. If he makes a profit of $800 for 1
ha of beans and $700 for 1 ha of maize, formulate the underlying linear
program and solve it graphically and using simplex method.
SMA 2343
All rights reserved

7. O’Hagan Bookworm Booksellers buys books from two publishers. Duffin


House offers a package of 5 mysteries and 5 romance novels for $50, and
Gorman Press offers a package of 5 mysteries and 10 romance novels for
$150. O’Hagan wants to buy at least 2,500 mysteries and 3,500 romance
novels, and he has promised Gorman (who has influence on the Senate
Textbook Committee) that at least 25% of the total number of packages
he purchases will come from Gorman Press. Formulate the underlying
LP and solve it to determine the number of packages to be ordered from
each publisher in order to minimize the cost and satisfy Gorman? What
will the novels cost him? (Formulate and don’t solve)

8. A company is test-marketing one of its new products in a particular


region and intends undertaking an extensive 1 week advertising campaign
to raise consumer awareness about the new product. The firm has an
advertising budget of £500 000 and intends using regional TV, regional
radio and regional newspaper advertising. An advert on TV will cost
£50 000 and is expected to reach 300 000 potential customers. For radio
the equivalent figures are £20 000 and 10 000 customer and for the
newspapers £2000 and 50 000 customers. The combination of adverts
on the three forms of media is flexible, although the company wants at
least 2 adverts on TV, 5 on radio and 10 in the newspapers. In addition

JJ II
JKUAT J.
c M. Kihoro 20
J I
J DocDoc I
Back Close
Operations Research 1

the number of newspaper adverts must be no more than 2.5 times the
number of combined radio and TV adverts.Formulate the problem if the
company wishes to maximize the number of customers exposed to the
advertising campaign. (solve it graphically).

A company publishing textbooks is planning its production of the next book


scheduled to be printed. The book will be published in both paperback and
hardback format. The paperback sells for £10 per copy and costs £5 to pro-
duce and market. The hardback sells for £20 and costs £17. Market research
has indicated that total sales of the book are unlikely to exceed 10000 copies.
Of these at least 4000 are expected to be in paperback format with at least
2000 hardback. On the other hand, the company does not expect to sell more
than 4000 hardback copies. In addition, there are potential problems involved
SMA 2343
All rights reserved

in producing the paperback edition. The printing equipment is needed for


other paperback books and is available for printing this book for a period of
only 5000 hours. Each paperback takes 40 minutes to produce.

1. Formulate this problem and solve it assuming the company wishes to


maximize profit.(solve it graphically).

2. Assuming the company wishes to maximize revenue from sales refor-


mulate this problem and solve it and computes the profit the company
would earn. (solve it graphically)

3. The production manager is strongly arguing that production should be


determined by costs. Reformulate the problem in terms of cost mini-
mization solve it . (solve it graphically).

4. Which of the three alternative objective functions do you think is most


appropriate?

JJ II
JKUAT J.
c M. Kihoro 21
J I
J DocDoc I
Back Close
Operations Research 1

Quiz Solve the LP below using dual simplex method

M aximize z = 150x + 250y + 450z


subject to
2x + y + 3z ≤ 80
3x + y + 4z ≤ 60
x + 2y + 5z ≤ 100
x ≥ 0, y ≥ 0 , z ≥ 0

Optimal Solution: p = ; x= , y= , z=

NOTE
This method of computation is known as Gauss - Jordan row operations.
that is
SMA 2343
All rights reserved

New pivot row = Current pivot row ÷ Pivot element

All other rows:

Newrow = Current row - Pivot’s column coefficient × New Pivot row

The rules for selecting the entering and Departing variables are referred to as
optimality and feasibility conditions.

Definition: Optimality condition


The entering variable (E.V) is the non-basic variable having the largest
negative coefficient in profits row. (ties are broken arbitrarily). Optimum
is reached where all profits row coefficients of non - basic variables are all
positive.

Definition: Feasibility condition


The Departing variable (D.V) is the basic variable associated with the
smallest positive ratio of solution: pivot column elements (ties are arbi-
trarily broken)

Economic Interpretation
JJ II
JKUAT J.
c M. Kihoro 22
J I
J DocDoc I
Back Close
Operations Research 1

1. If no slack variable do not appear in solution set, then all the resources
have been exhausted.

2. The solution quantity corresponding to si is the amount of resources


which were not utilized/abundant resource.

3. Values at profit row corresponding to Slack variables gives the marginal


value products of the corresponding resources (per unit contribution to
”‘profit”’). They are also referred to as dual prices and in economics
shadow prices or imputed costs. They represent the worth per unit of a
resource bi i = 1, 2...m.
In the farmers problem. s2 = 15 indicates that (15 × 2) = 30 laborers
will be un utilized.
SMA 2343
All rights reserved

4. The p row coefficients of s1 , s2 and s3 are 20, 0 and 10 respectively


implying that;

• Increasing land by 1 ha increases profit by $20

• Increasing the number of employees has no effect on profit

• Increasing the number of capital by $1 increases the profit by


$10/50

The farmer should not pay more than $20 for every additional 1 ha hired.
It would not make sense to put more money in form of capital.

• Simplex Method Algorithm


Step 1 - Determine a starting feasible solution.

Step 2 - Select the E.V using optimality condition. STOP if there is NONE.

Step 3 - Select Departing Variable using feasibility condition

Step 4 - Determine the new basic solution using the appropriate Gauss -
Jordan computation, Go to Step 2.

JJ II
JKUAT J.
c M. Kihoro 23
J I
J DocDoc I
Back Close
Operations Research 1

Exercise 3. A carpenter makes boxes, tables and chairs. The profit contri-
butions of the three products are $20, $30 and $10 respectively. The carpenter
can afford to spend up to 40 hours per week working and takes two hours to
make a box, six hours to make a table and two hours to make a chair. Cus-
tomer demand requires that he makes at most a third as many boxes as the
total number of chairs and tables. The storage space available is 10 m2 and a
box requires 0.5 m2 , a table takes up 1 m2 and a chair 0.4 m2 . Formulate this
problem as a linear programming problem for profit maximization and solve
it using simplex method.

Exercise 4. A carpenter makes boxes, tables and chairs. The profit contri-
butions of the three products are $20, $30 and $10 respectively. The carpenter
can afford to spend up to 40 hours per week working and takes 2 hours to
SMA 2343
All rights reserved

make a box, 6 hours to make a table and 2 hours to make a chair. Customer
demand requires that he makes at most a third as many boxes as the total
number of chairs and tables. The storage space available is 10 m2 and a box
requires 1/2 m2 , a table takes up 1 m2 and a chair 2/5 m2 . Formulate this
problem as a linear programming problem for profit maximization and solve
it using simplex method.

Example. A certain company produces 3 products A, B C which contributes


a profit of Shs 8, 5 and 10 respectively. The production machine has 400 hrs.
Capacity and each product uses 2, 3 and 1 machine hour respectively. There
are 150 units available of a special component with A using 1 unit and C using
1 Unit per unit. A special allow of 200kg is needed in this period and product
A and C uses 2kg and 4kg per unit. There is a limitation of production of unit
B to not more than 50. Advice the company in order to maximize the profit.
Solution
Let x, y and z be the number of units of products A, B and C to be
produced respectively.
The model is:

JJ II
JKUAT J.
c M. Kihoro 24
J I
J DocDoc I
Back Close
Operations Research 1

Max p = 8x + 5y + 10z

S/t 2x + 3y + z ≤ 400 (Hours)


x + z ≤ 150 (Special component)
2x + 4z ≤ 200 (Alloy)
y ≤ 50

x ≥ 0, y ≥ 0, z≥0

Step 0: Introduce the Slack variables s1 , s2 and s3 and s4 to get:


Max p = 8x + 5y + 10z

S/t 2x + 3y + z + s1 = 400
x + z + s2 = 150
SMA 2343
All rights reserved

2x + 4z + s3 = 200
y + s4 = 50
x ≥ 0, y ≥ 0, z≥0
The initial solution is

Basis x y x3 s1 s2 s3 s4 Solution
S1 2 3 1 1 0 0 1 400
S2 1 0 1 0 1 0 0 150
S3 1 0 2 0 0 1 0 100
S4 0 1 0 0 0 0 1 50
p 8 5 10 0 0 0 0 0

Proceed and get the solution as x = 100, y = 50, x3 = 0 and Max p = 1050

3.7. Dealing with mixed ≥ on decision variables

If in a LP one or more constraint is given as xi ≥ k where k is a constant,


make the substitution yi = xi − k ≥ 0 ⇒ xi = yi + k.
We then replace xi with yi + k and adjust each constraint and the objective
function appropriately.
Example

JJ II
JKUAT J.
c M. Kihoro 25
J I
J DocDoc I
Back Close
Operations Research 1

M aximize Z = 5x1 + 3x2 + 4x3


Subject to 3x1 + 12x2 + 6x3 ≤ 900
6x1 + 6x2 + 3x3 ≤ 1350
2x1 + 3x2 + 3x3 ≤ 390
x1 ≥ 0, x2 ≥ 20, x3 ≥ 10

Since x2 and x3 cannot be zero, we let


a = x1 ⇒ a ≥ 0
b = x2 − 20 ⇒ b ≥ 0
a = x3 − 10 ⇒ c ≥ 0
Adjusting the LP we get
M aximize Z = 5a + 3b + 4c + 100
SMA 2343
All rights reserved

Subject to 3a + 12b + 6c ≤ 900 − 240 − 60 = 600


6a + 6b + 3c ≤ 1350 − 120 − 30 = 1200
2a + 3b + 3c ≤ 390 − 60 − 30 − 300
a, b, c ≥ 0
which is now solvable using the simplex method. Following the simplex algo-
rithm finally leads to the optimal table as

Basis a b c s1 s2 s3 Solution
5 1
s1 0 2 2
1 0 − 21 50
s2 0 -1 -2 0 1 -1 100
3 3 1
a 1 2 2
0 0 2
150
9 7 5
Z 0 2 2
0 0 2
850
With the corresponding solution being a = 150, b = 0, c = 0 and maximum Z
= 750.
But under the initial conditions the optimal solution should be x1 = 150, x2
= 20, x3 = 10 with max Z = 850.

3.8. Minimization

For LPs which are not in standard form, the Simplex Method cannot be used
right away, because the initial point (the origin) is infeasible. It is advisable
to solve LPs when they are of the form
JJ II
JKUAT J.
c M. Kihoro 26
J I
J DocDoc I
Back Close
Operations Research 1

Maximize Z = C 0 X subject to
AX ≤ b, X ≥ 0
If this is not, the case we need to transform the original problem to take
this standard form before we use ordinary simplex method

Example. Solve the LP below using simplex method

M inimize z = 20x + 30y


subject to
x + y = 45
3x + 4y ≤ 170
12x + 6y ≤ 480
x ≥ 0, y ≥ 0
SMA 2343
All rights reserved

To write it in standard form,we

• replace = with ≤ and ≥ inequalities

• negate the objective function.

and solve it in the ordinary way as follows


Solution

Performing the adjustment we get


Maximize z = -20x -30y subject to
x + y <= 45
-x - y <=-45
3x + 4y <= 170
12x +6y <= 480
x, y >=0
Adding slack variables we get

Maximize z = -20x -30y subject to


x + y + s1 = 45
-x - y +s2 = -45
3x + 4y + s3 = 170

JJ II
JKUAT J.
c M. Kihoro 27
J I
J DocDoc I
Back Close
Operations Research 1

12x +6y + s4 = 480


x, y >=0
The first tableau is given by

Tableau #1
Basis x y s1 s2 s3 s4 z Solution
s1 1 1 1 0 0 0 0 45
s2 -1 -1 0 1 0 0 0 -45
s3 3 4 0 0 1 0 0 170
s4 12 6 0 0 0 1 0 480
z 20 30 0 0 0 0 1 0
Since all entries in the profit row are +ve, this solution is
SMA 2343
All rights reserved

optimal. But since s2=-45, the solution is infeasible

The pivot columns are those with -ve entries (column x and y)

to identify the entering variable take the ratios of the z-row


to the elements of the s2-row i.e (20/-1, 30/-1). The E.V is the
one corresponding to the smallest absolute value => x

Max x= min(+ve)(45/1, -45/-1, 170/3, 480/12)=40 from s4-row,


which implies that pivot value = 12
New row x=s4/12
Performing row reduction operations on x column gives

Tableau #2
Basis x y s1 s2 s3 s4 z Solution
s1 0 1/2 1 0 0 -1/12 0 5
s2 0 -1/2 0 1 0 1/12 0 -5
s3 0 5/2 0 0 1 -1/4 0 50
x 1 1/2 0 0 0 1/12 0 40
z 0 20 0 0 0 -5/3 1 -800

JJ II
JKUAT J.
c M. Kihoro 28
J I
J DocDoc I
Back Close
Operations Research 1

Since s2=-5, the solution is still infeasible


The pivot column is y and so y enters the solution
with pivot value -1/2
Max y=(-5/(-1/2)=10 (NOTE THAT THE OTHER RATIOS ARE NOT VALID)
New y-row=s2/(-1/2)
Reducing all the elements of y column to zero using Jordan
gauss computations gives

Tableau #3
Basis x y s1 s2 s3 s4 z Solution
S1 0 0 1 1 0 0 0 0
y 0 1 0 -2 0 -1/6 0 10
SMA 2343
All rights reserved

s3 0 0 0 5 1 1/6 0 25
x 1 0 0 1 0 1/6 0 35
z 0 0 0 40 0 5/3 1 -1000
The optimal and feasible solution is now found to be
x=35, y=10 and minimum z=-1000

Quiz : Solve the LP below using simplex method

M inimize z = 2x + y
subject to
x+y =4
2x − y ≥ 3
x ≥ 0, y ≥ 0

Optimal Solution: p = ; x= , y=

JJ II
JKUAT J.
c M. Kihoro 29
J I
J DocDoc I
Back Close
Operations Research 1

Solutions to Examples

Exercise 3. The solution is as follows

Let x, y and z be the number of boxes, tables and chairs


to be produce respectively, then
Maximize profit p = 20x + 30y + 10z
subject to 2x + 6y + 2z <=40 (restriction on hours)
3x + (-1)y + (-1)z <=0 (customers restrictions)
0.5x + 1y + 0.4z <=10 (restriction on storage space)
x, y, z >=0
Adding slack variables s1 s2 and s3 and constructing the initial
tabuleau leads to
Tableau #1
SMA 2343
All rights reserved

Basis x y z s1 s2 s3 p Soln
s1 2 6 2 1 0 0 0 40
s2 3 -1 -1 0 1 0 0 0
s3 1/2 1 2/5 0 0 1 0 10
p -20 -30 -10 0 0 0 1 0
This solution Not optimal
Entering variable corresponds to largest -ve value in
p-row =>y Maximum y=min( 40/6, 0/-1, 10/1)=20/3,
Departing variable is s1, pivot value =6

New pivot row y=s1/6. Using the new row to reduce


all other elements pivot column to zero gives

Tableau #2
Basis x y z s1 s2 s3 p Soln
y 1/3 1 1/3 1/6 0 0 0 20/3
s2 10/3 0 -2/3 1/6 1 0 0 20/3
s3 1/6 0 1/15 -1/6 0 1 0 10/3
p -10 0 5 0 0 1 1 200

JJ II
JKUAT J.
c M. Kihoro 30
J I
J DocDoc I
Back Close
Operations Research 1

Corresponding solution x=0, y=20/3, z=0, p=200 which is not


optimal. Entering variable corresponds to largest -ve value in
p-row =>x.
Maximum x=min((20/3)/(1/3),(20/3)/(10/3),(10/3)/(1/6))=2
corresponding to s2 row. Departing variable is s2,
pivot value =10/3
New row x=s2/(10/3)
Using the new row to reduce all other elements pivot column
to zero gives

Tableau #3
Basis x y z s1 s2 s3 p Soln
SMA 2343
All rights reserved

y 0 1 2/5 3/20 -1/10 0 0 6


x 1 0 -1/5 1/20 3/10 0 0 2
s3 0 0 1/10 -7/40 -1/20 1 0 3
p 0 0 -2 11/2 3 0 1 220
with corresponding solution x=2, y=6, z=0 and p=220 which is
not optimal. Entering variable corresponds to largest -ve
value in p-row =>z

Maximum z=min(6/(2/5), 2/(-1/5), 3/(1/10))=15,


corresponding to y row. Departing variable is y,
pivot value =2/5, New row z=y/(2/5)
Using the new row to reduce all other elements pivot column
to zero gives

Tableau #4
Basis x y z s1 s2 s3 p Soln
z 0 5/2 1 3/8 -1/4 0 0 15
x 1 1/2 0 1/8 1/4 0 0 5
s3 0 -1/4 0 -17/80 -1/40 1 0 3/2
p 0 5 0 25/4 5/2 0 1 250

JJ II
JKUAT J.
c M. Kihoro 31
J I
J DocDoc I
Back Close
Operations Research 1

which gives the optimal solution as x=5, y=0, z=15 and


optimal p=250.

The carpenter should therefore make 5 boxes, no tables


and 15 chairs in order to maximize his/her profit to $250

Exercise 3

Exercise 4. Let x, y and z be the number of boxes, tables and chairs to be


produce respectively, then the formulated LP becomes

Maximize p = 20x + 30y + 10z


subject to
SMA 2343
All rights reserved

2x + 6y+ 2z ≤ 40, (restrictiononhours)


3x + −1y+ −1z ≤ 0, (customersrestrictions)
1/2x + 1y+ 2/5z ≤ 10, (restrictiononstoragespace)
x ≥ 0, y ≥ 0, z ≥ 0

We convert the problem to canonical form by introducing slack variables s1 ,


s2 and s3 to get

Maximize p = 20x + 30y + 10z


subject to
2x + 6y + 2z +s1 = 40,
6x + −1y + −1z +s2 = 0,
2x + −1y + 2/5z +s3 = 10,
x ≥ 0, y ≥ 0, z ≥ 0, s1 ≥ 0, s2 ≥ 0, s3 ≥ 0

The initial tableau is

Basis x y z s1 s2 s3 Soln
s1 2 6 2 1 0 0 40
s2 3 −1 −1 0 1 0 0
s3 1/2 1 2/5 0 0 1 10
p −20 −30 −10 0 0 0 0

JJ II
JKUAT J.
c M. Kihoro 32
J I
J DocDoc I
Back Close
Operations Research 1

This solution not optimal because there exists -ve values in the last row. En-
tering variable corresponds to the most negative value this row which in this
case is y
Maximum y = min( 40 , 0 , 10 ) = 0 which implies that pivot value = -1 and
6 −1 1
departing variable is s2 , New row y = s2 / − 1.
Performing row operations using the pivot row to reduce all the elements
of y column to zero leads to the following table.

Basis x y z s1 s2 s3 Soln
s1 20 0 −4 1 6 0 40
y −3 1 1 0 −1 0 0
s3 7/2 0 (−3)/5 0 1 1 10
p −110 0 20 0 −30 0 0
SMA 2343
All rights reserved

This solution not optimal because there exists -ve values in the last row.
Entering variable corresponds to the most negative value this row which in
this case is x.
Maximum x = min( 40 , 0 , 10 ) = 2 which implies that pivot value = 20
20 −3 7/2
and departing variable is s1 , New row x = s1 /20.
Performing row operations using the pivot row to reduce all the elements
of x column to zero leads to the following table.

Basis x y z s1 s2 s3 Soln
x 1 0 (−1)/5 1/20 3/10 0 2
y 0 1 2/5 3/20 (−1)/10 0 6
s3 0 0 1/10 (−7)/40 (−1)/20 1 3
p 0 0 −2 11/2 3 0 220

This solution not optimal because there exists -ve values in the last row. En-
tering variable corresponds to the most negative value this row which in this
case is z
2 6 3
Maximum z = min( (−1)/5 , 2/5 , 1/10 ) = 15 which implies that pivot value =
2/5 and departing variable is y, New row z = y/2/5.

JJ II
JKUAT J.
c M. Kihoro 33
J I
J DocDoc I
Back Close
Operations Research 1

Performing row operations using the pivot row to reduce all the elements
of z column to zero leads to the following table.

Basis x y z s1 s2 s3 Soln
x 1 1/2 0 1/8 1/4 0 5
z 0 5/2 1 3/8 (−1)/4 0 15
s3 0 (−1)/4 0 (−17)/80 (−1)/40 1 3/2
p 0 5 0 25/4 5/2 0 250

Since all entries in the last row are negative, this table gives the optimal
solution as; x = 5, z = 15, s3 = 3/2 with a maximum objective function value
of p = 250.
The carpenter should therefore make 5 boxes, no tables and 15 chairs in
SMA 2343
All rights reserved

order to maximize his/her profit to $250 Exercise 4

JJ II
JKUAT J.
c M. Kihoro 34
J I
J DocDoc I
Back Close

Anda mungkin juga menyukai