You are on page 1of 26

2nd lecture of

Operations Research (O.R)


Chapter two:

Linear Programming Models


?What is linear programming

 Linear Programming (LP) is a widely used mathematical

techniques designed to help managers in planning and decision


making relative to resource allocations.
 The applications of linear programming in business environment:
 the selection of the product-mix in a factory to make best use of machine and machine hours
available while maximizing profit, that is, to find out which product to include in production
plan and in what quantities that should be produced.
 the selection of different blends of raw materials to produce the best combinations at minimum
cost e.g. food drinks, etc.
 developing a production schedule that will satisfy future demands for a firm’s product and at the
same time minimize production and inventory cost.
 determination of how much quantity to produce of different grades of petroleum product (for
example) to yield maximum profit.
 determining a distribution system that will minimize total shipping cost from several warehouses
to various market locations.
 the allocation of limited advertising budget among radio, TV and newspaper spots in order to
maximize the returns on investment.
 selecting investment port-folio from a variety of stocks and bonds available in such a way as to
maximize the returns on investment.
 the development of a work scheduled that allows a large restaurant to meet staff needs at all
hours of the day, while minimizing the total number of employees.
How to formulate the linear programming model?
In order to formulate a linear programming model there are
some conditions to be met:
 There must be well defined objective for maximizing profit
or Minimizing cost.
 The objective function must be linear.
 There must be a constraint on availability of resources for the
objective functions.
 Alternative course of action must be available to select the
best.
 Objective function must be expressed mathematically.
We also formulate the linear programming model
:based on the following assumptions
 Certainty

We assume that numbers in the objective and constraints are known with
certainty and does not change during the period being study

 Proportionality

We are sure that proportionality exists in the objective and the constraints. This
means that, if production of one unit of product uses two of a particular scare
resource; then making five units of that product uses ten resources.

 Additivity

This means that the total of all activities equals the sum of each individual activity.
We also formulate the linear programming model
:based on the following assumptions

 Divisibility

This means that solution may take fractional values and need not be in
whole numbers (integers). If a fraction of a product cannot be produced,
integer programming problem exist.

 Non-negativity

We assume that all answers or variables are non-negative. Negative


values of physical quantities are an impossible solution.
Steps of linear programming model formulation:

 Step 1: Choose variables and notations that will be used to form the
objective and constraints functions.

 Step 2: Identify the objective function to either maximize or


minimize e.g. maximizes profit or minimizes cost.

 Step 3: Develop mathematical relationships to describe objective


and constraints.

 Step 4: Using the equations in any method of solving LP problem


i.e. Graphical or Simplex method
For Example

Alhamd company manufactures two products shirts and trousers, by

using the three machines A, B, and C. Each unit of shirts takes 1 hour

on machine A, 3 hours on machine B and 10 hours on machine C.

Similarly, trousers take one hour, 8 hours and 7 hours on Machine A, B,

and C respectively. In the coming planning period, 40 hours of machine

A, 240 hours of machine B and 350 hours of machine C is available

for production. Each unit of shirts brings a profit of L.E 5/- and

trousers brings L.E7 per unit. How much of shirts and trousers are to

be manufactured by the company for maximizing the profit?


:The previous example could be summarized in the following table

Machines
Products A B C profit

Shirts
1 hour 3hours 10hours L.E 5

Trousers 1 hour 8 hours 7 hours L.E7

Maximum capacity 40hours 240 hours 350 hours  


Step 1: Choose the decision variables that will be used to form the objective
.and constraints functions

Machines
A B C profit
Products
Shirts 1 hour 3hours 10hours L.E 5
Trousers 1 hour 8 hours 7 hours L.E7
Maximum capacity 40hours 240 hours 350 hours  
 Our decision variables are the items for which we need to maximize profit
or minimize cost, in our example we have two products (variables) shirts
and trousers.

 Suppose that the number of units produced from shirts is the variable X1,

 and the number of units produced from trousers is the variableX2


Step 2: Identify the objective function to either maximize or minimize e.g.
.maximizes profit or minimizes cost

Machines
A B C profit
Products
Shirts 1 hour 3hours 10hours L.E 5
Trousers 1 hour 8 hours 7 hours L.E7
Maximum capacity 40hours 240 hours 350 hours  
 Our objective in this example is to maximize the profit from the two
products X1 & X2

 the profit is symbolled as Z

 the objective function will be as follow:

Maximize Z = 5 X1+ 7X2


Step 3: Develop mathematical relationships to describe objective and
.constraints

Machines
A B C profit
Products
Shirts 1 hour 3hours 10hours L.E 5
Trousers 1 hour 8 hours 7 hours L.E7
Maximum capacity 40hours 240 hours 350 hours  
 Constraint 1 1X1 + 1X2 ≤ 40
 Constraint2 3X1 + 8X2 ≤ 240
 Constraint 3 10X1 + 7X2 ≤ 350

 The nonnegativity constraint: X1, X2 ≥ 0


 The complete model can be presented as
follow:
Maximize Z = 5 X1+ 7X2

Subject to:

1X1 + 1X2 ≤ 40

3X1 + 8X2 ≤ 240

10X1 + 7X2 ≤ 350

X1, X2 ≥ 0
:For Example
 Abdallah, a retired government officer, has recently received his retirement benefits,
provident fund, gratuity, etc. He is contemplating how much money he should invest in
various alternatives open to him, so as to maximize return on investment. The investment
alternatives are Government securities, fixed deposits of a public limited company, equity
shares, time deposits in a bank, and house construction. He has made a subjective estimate
of the risk involved on a five-point scale. The data on the return on investment, the number
of years for which the funds will be blocked to earn this return on investment and the
subjective risk involved are as follows;

  Return % No. of years Risk

Government securities X1 6 15 1

Company depositsX2 13 3 3

Time depositsX3 10 5 2

Equity sharesX4 20 6 5

House constructionX5 25 10 1
 He was wondering as to what percentage of funds he should invest

in each alternative so as to maximize the return on investment. He

decided that the risk should not be more than 4, and funds should
not be locked up for more than 15 years. He would necessarily

invest at least 25% in house construction. Formulate this problem as

an LP model.
 The model will be:

Max Z = 6X1 + 13X2 + 10X3 + 20X4 + 25X5

Subject to

15X1 + 3X2 + 5X3 + 6X4 + 10X5 ≤ 15

X1 + 3X2 + 2X3 + 5X4 + X5 ≤ 4

X5 ≥ 0.25

X1 + X2 + X3 + X4 + X5 = 1

X1, X2, X3, X4, X5 ≥ 0


Solving the linear programming model
:graphically

 There are different methods for solving the linear programming

model, If the objective function Z is a function of two variables only

the problem can be solved by graphical method.


:For Example
 Solve the following model graphically:
Al-Rahman company produces two kinds of pasta spaghetti and ring from two raw
materials M1, M2 the following table summarize the basic data of the problem:
  Tons of raw material per ton of Maximum daily
Spaghetti Ring availability

M1 6 4 24
M2 1 2 6
Profit per ton
If you 5
know that a market survey indicates that the 4daily demand for ring  pasta can't
exceed that of spaghetti pasta by more than one ton. Also, the maximum daily demand of
ring pasta is 2 tons. Al-Rahman company wants to determine the optimum product mix of
ring and spaghetti that maximizes the total daily profit.
 In order to solve the previous example graphically we should follow the following
steps:
1. Formulate the problem into linear programming model
Suppose that X1 = the tons produced from spaghetti pasta
X2 =the tons produced from ring pasta
The model will be as follow:
Maximize Z = 5X1+ 4X2
Subject to:
6X1+4X2 ≤ 24
X1+2X2 ≤ 6
-X1 +X2 ≤ 1
X2 ≤ 2
X1, X2 ≥ 0
.Consider each inequality constraints as equation

Maximize Z = 5X1+ 4X2


 Subject to:
1. 6X1+4X2 = 24
2. X1+2X2 = 6
3. -X1 +X2 = 1
4. X2 = 2

X1, X2 ≥ 0
2. Plot each equation on the graph as each equation will geometrically represent a
straight line.

According to the nonnegativity constraint the variables are restricted to the first
(positive) quadrant.
 Let the horizontal axis X1 and the vertical Axis X2

 To represent the equations on the graph for constraint 1 6X1+4X2=24 , set


X1= 0 and determine the value of X2= 24/4= 6 , then set X2 = 0 and determine
the value of X1 = 24/6 = 4, so the line of constraint 1 passes through (0,6) and
(4,0) as shown by line 1 in the figure
 To represent the equations on the graph for constraint 1 6X1+4X2=24 ,
set X1= 0 and determine the value of X2= 24/4= 6 , then set X2 = 0 and
determine the value of X1 = 24/6 = 4, so the line of constraint 1 passes
through (0,6) and (4,0) as shown by line 1 in the figure
 To represent the equations on the graph for constraint 2 X1+2X2= 6 , set
X1= 0 and determine the value of X2 = 6/2= 3 , then set X2 = 0 and
determine the value of X1=6, so the line of constraint 1 passes through
(0,3) and (6,0) as shown by line 1 in the figure
 To represent the equations on the graph for constraint 3 -X1+X2=1 , set
X1= 0 and determine the value of X2 =1, then set X2 = 0 and determine
the value of X1 = -1, so the line of constraint 1 passes through (0,1) and (-
1,0) as shown by line 1 in the figure
 To represent the equations on the graph for constraint 1 X2=2, draw a
straight line from the point 2 on x2 axis
4. Shade the feasible region and identify the feasible solutions
Every point on the line will satisfy the equation of line.

Feasible
solution
The corner points of this region are identified.
The corner points in the previous example are A, B, C, D, E, F
1. Finding the optimal solutions, the value of Z at various corners points of the region of
feasible solution are calculated. The optimum (maximum or minimum) Z among these
values is noted. Corresponding solution is the optimal solution. As in the following table:

Corner point (X1, X2) Z Value


A (0,0) 0

B (4,0) 20
C (3,1.5) 21(Optimum)

D (2,2) 18
E (1,2) 13

F (0,1) 4

You might also like