Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
13 views

Operational Research - Linear Programming Part I

Here are the key steps to solve a linear programming problem using the simplex method: 1. Write the linear programming problem in standard form: Maximize cTx Subject to Ax ≤ b x ≥ 0 2. Find a starting basic feasible solution. This becomes the initial tableau. 3. Identify the entering variable - the variable in c with the most positive coefficient that is not already in the basis. 4. Identify the leaving variable - the variable in the basis whose ratio is most negative. 5. Perform a pivot operation to bring the entering variable into the basis and remove the leaving variable. 6. Check for optimality. If all variables in c are nonpositive,

Uploaded by

Iraguha Faustin
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Operational Research - Linear Programming Part I

Here are the key steps to solve a linear programming problem using the simplex method: 1. Write the linear programming problem in standard form: Maximize cTx Subject to Ax ≤ b x ≥ 0 2. Find a starting basic feasible solution. This becomes the initial tableau. 3. Identify the entering variable - the variable in c with the most positive coefficient that is not already in the basis. 4. Identify the leaving variable - the variable in the basis whose ratio is most negative. 5. Perform a pivot operation to bring the entering variable into the basis and remove the leaving variable. 6. Check for optimality. If all variables in c are nonpositive,

Uploaded by

Iraguha Faustin
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 55

REPUBLIC OF RWANDA

KIGALI INDEPENDENT UNIVERSITY (ULK)


P.O Box 2280, KIGALI
Website: http://www.ulk.ac.rw
E-mail:ulk@rwandatel.com

MODULE:OPERATIONAL RESEARCH
YEAR III: COMPUTER SCIENCE
CSC 407: OPERATIONAL RESEARCH

By:
RUBYAGIZA Eric
MSc in Data Science
ericrubyagiza@gmail.com
0788588447
TABLE OF CONTENTS

1. INTRODUCTION

2. LINEAR PROGRAMMING

3. OPTIMIZATION TECHNIQUES
I:INTRODUCTION
In this session:
•What is Operational Research (OR)?
•Origin of OR
•When OR is useful
•Scope of OR
•Limitations of OR
I.1:What is Operational Research?
• Operational Research (OR) is the application of scientific methods to tackle real-life
problems associated with decision-making in businesses and other enterprises.

A way of thinking
• OR combines: & communicating + Analytical
techniques

to provide the means for making more informed and better decisions.

Operations Research can be defined simply as combination of two words operation and
research where operation means some action applied in any area of interest and
research imply some organized process of getting and analysing information about
the problem environment

• A rose by any other name: Management Science, Systems Engineering, Industrial


Engineering, Operations Management, Applied Mathematics
I.2:Origins of OR
World War II
• German U-Boats targeted merchant ships bound for Britain, which
were loaded with important goods.
• The British Royal Navy decided to respond by deploying warships
within convoys of merchant ships in order to offer vital protection.

• Travel faster than large


convoys and may evade the
threat of combat

• Slower than a small


convoy but heavily
armed to fight off an
attack
I.2: Origins of OR CONT’s …….
• The formal activities of Operations Research (OR) were initiated in England
during World War II by McClosky and Trefthen in 1940. A team of British
scientists set out to make decisions regarding the best utilization of war
material.
• Following the end of the war, the ideas advanced in military operations were
adapted to improve efficiency and productivity in the civilian sector.
• Today, OR is a dominant decision making tool, that seeks the optimum
state in all conditions and thus provides optimum solution to
organizational problems
I.3:When is OR Useful?

• When a decision is complex or it’s unclear what the main problem is


• When it’s uncertain what the outcome of different actions will be
• When you don’t know how well things are working or think they
could work better
• When you are worried about risks
• When you need to take account of the views of different stakeholder
groups
I.4:SCOPE OF OR
Scope of O.R. is very wide in today’s world as it provides better solution to various
decision-making problems with great speed and efficiency. examples
In Agriculture: With the explosion of population and consequent shortage of food,
every country is facing the problem of optimum allocation of land to various crops in
accordance with the climatic conditions, optimum distribution of water from different
resources.

In Defense operations: Since Second World War operation research have been used
for Defence operations with the aim of obtaining maximum gains with minimum
efforts.

In Finance: In these modern times, government of every country or every organisation


wants to introduce such type of planning/policies regarding their finance and
accounting which optimize capital investment, determine optimal replacement
strategies, apply cash flow analysis for long range capital investments, formulate credit
policies, credit risk.
In Marketing: A Marketing Administrator has to face many problems like production
selection, formulation of competitive strategies, distribution strategies, selection of
advertising media with respect to cost and time, finding the optimal number of
salesmen, finding optimum time to launch a product.
I.5:LIMITATION OF OR
• Formulation of mathematical models may take into account all possible factors
for defining a real life problem and hence is difficult. As a result, the help of
computers is required for the large number of cumbersome computations for such
problems. This discourages small companies and other organisations from using
O.R. techniques

• Unquantifiable factors: Some problems may involve a large number of intangible


factors such as human emotions, human relationship, etc. which cannot be
quantified. Hence, the best solution cannot be determined for such problems
because such factors have to be excluded.

• Dependence on experts: A specialist, who may be a mathematician or a


statistician, is needed to understand the formulation of models, find solutions and
recommend their implementation. Managers, who deal with such problems, may
not have such specialisation. Managers, who deal with such problems, may not
have such specialisation and hence the results may not be optimal.
• Model is abstraction of real-life situations and not the reality.

• Assumptions need to be made about the nature and importance of some factors in
order to construct an Operation Research model.
RECAP 1
1. What do you understand by Operation Research?
2. Explain 5 scenarios when Operation Research is very useful?
3. Describe 4 limitations of Operational Research
II:LINEAR PROGRAMMING
In this session:
•What is Linear programming
•Mathematical Formulation of Linear Programming model
•Prototype Example,
•Matrices operations
•Solving Linear Programming Problems,
•Graphical Method,
•Simplex Method,
•Algebra of the simplex method
•Simplex method in Tabular Form
•Adapting to Other Model Forms,
•Post optimality Analysis;
II.1: What is Linear programming

Recognition and Formulation and


Real-World Definition of the Construction of the
Problem Problem Mathematical
Model

Interpretation
Validation and Solution
Implementation Sensitivity Analysis of the Model
of the Model

12
II.1: What is Linear programming Cont’..

• In mathematics, linear programming (LP) is a technique for optimization of


a linear objective function, subject to linear equality and linear inequality
constraints.

• Linear programming determines the way to achieve the best outcome (such
as maximum profit or lowest cost) in a given mathematical model and given
some list of requirements represented as linear equations.

13
II.2: Mathematical Formulation of Linear Programming model

Study the given situation

Formulate the objective function

Formulate the constraints

Add non-negativity
restrictions
14
II.3: Prototype Example
An enterprize has 3 different products: P1, P2, and P3,needs 3 hours to produce
P1; 2 h to produce P2 and 3 h to produce P3 and the enterprize can pay only 20
h.
The enterprize needs 2 units of volume to stock P1; 4 units of volume to stock P2
and 3 units of volume to stock P3 but it possesses 35 units of volume in its stock.
The prices for the different products are: 10 F for P1; 15 F for P2 and 25 F for
P3.
The problem of the owner is to know how many units for each product he has to
make such that he can get the maximum profit.

15
II.3: Prototype Example
A manufacturing of electronic instrument would like to know how much TV,
how much amplifiers, how much receivers, must it manufacture taking into
account stock of a component of which it lays out and those to maximize its
profits. The data concerning the components necessary by apparatus are included
in the table hereafter.
Formulate Mathematical model

16
Questions
Recap 2
18

1.What does optimization mean?

2. What do you understand by constraints?

3. Describes steps to formulate Mathematical model

4. A restaurant has 30 sea urchins, 24 shrimps and 18 oysters. It


wants to offer two types of plate: P1, P2.
P1 = 5 sea urchins + 2 shrimps + 1 oyster on $ 8.
P2 = 3 sea urchins + 3 shrimps +3 oysters on $6.
Formulate the mathematical Model for the above Scenario
II.4: Matrices and matrix operations

A matrix is a rectangular array of numbers. For example, a matrix


A(3x2) is said matrix A , three by two and it is a rectangular array
of numbers with 3 rows and 2 columns

The numbers in the rectangular array are called the elements of the
matrix.
Thus, in more general terms,

is an mxn matrix, where a11;……… amn represent the numbers that


are the elements of this matrix.
II.4.1: Matrices and matrix operations cont’s…
Let A = (aij) and B = (bij) be 2 matrices having the same number
of columns.
A. Matrices A and B are said to be equal (A=B) if and only if all the corresponding
elements are equal (i.e. aij = bij for all i and j).
B.  If any matrix A is added to the zero matrix of the same size, the result is clearly
equal to A:

B. The operation of multiplying a matrix by a number k is performed by


multiplying each element of the matrix by k, so that k:A = (k:aij)

C. To add two matrices A and B, simply add the corresponding elements, so that A
+ B = (aij + bij)

D. Matrix multiplication AB is defined if and only if the number of columns of A


equals the number of rows of B. Thus, if A is a (mxn) matrix and B is a (nxS)
matrix, then their product is (mxS) matrix.

Remark: In general, AB ≠BA.


II.4.1: Addition
If A and B are matrices of the same size, then they can be added. (This is similar to the
restriction on adding vectors, namely, only vectors from the same space R n can be
added ; you cannot add a 2‐vector to a 3‐vector, for example.) If A = [aij] and B = [bij]
are both m x n matrices, then their sum, C = A + B, is also an m x n matrix.
Example 1: Consider the following matrices: Which two can be added? What is their
sum?

Since only matrices of the same size can be added, only the sum F + H is defined
(G cannot be added to either F or H). The sum of F and H is 

Since addition of real numbers is commutative, it follows that addition of matrices (when it is
defined) is also commutative; that is, for any matrices A and B of the same size, A + B will
always equal B + A.
 If any matrix A is added to the zero matrix of the same size, the result is clearly.
II.4.1: Addition Cont…
Properties of Matrix Addition: If a, B and C are matrices of same order, then
(a) Commutative Law: A + B = B + A
(b) Associative Law:  (A + B) + C = A + (B + C)
(c) Identity of the Matrix: A + O =  O + A = A, where O is zero matrix which is
additive identity of the matrix,
(d) Additive Inverse: A + (-A) = 0 = (-A) + A, where (-A) is obtained by changing
the sign of every element of A which is additive inverse of the matrix,

1. Find the matrix B such that A + B = C, where


II.4.2: Subtraction of Matrices
If A and B are two matrices of the same order, then we define

Consider the two matrices A & B of order 2 x 2. Then the difference is given
by:

We can subtract the matrices by subtracting each element of one matrix from the
corresponding element of the second matrix. i.e. A – B = [aij – bij]mxn
II.4.2: Subtraction of Matrices Cont.'s….
Properties of Matrix Addition:
The order of the matrices must be the same
Subtract corresponding elements
Matrix subtraction is not commutative (neither is subtraction of real numbers)
•Matrix subtraction is not associative (neither is subtraction of real numbers)

1. Find the matrix B = A -C  and Check the subtraction properties


II.4.3: Scalar Multiplication of Matrices
Properties of Matrix Addition:
A scalar is a number, not a matrix.
•The matrix can be any order
•Multiply all elements in the matrix by the scalar
•Scalar multiplication is commutative

then the scalar multiple 2 A is obtained by multiplying every entry of A by 2:
II.4.4:Matrix Multiplication
Properties of Matrix multiplicatio: Am×n × Bn×p = Cm×p
•The number of rows in the first matrix must be equal to the number of columns in
the second matrix.

•The order of the product is the number of rows in the first matrix by the number of
columns in the second matrix.

•Each element in row i from the first matrix is paired up with an element in


column j from the second matrix.

•The element in row i, column j, of the product is formed by multiplying these


paired elements and summing them.

•Each element in the product is the sum of the products of the elements from
row i of the first matrix and column j of the second matrix.
.
II.4.4:Matrix Multiplication Cont’s…

Multiply matrix A   and B


II.4.4:Matrix Multiplication Cont’s…

Given  A and B , find AB and BA


Questions
Continuous Assessment Test 1
30

1.1. Given that B=3A find C= 6A (2pts)

2. Describe at least two limitations of Operational Research (2pts)

3. An enterprize has 3 different products: P1, P2, and P3,needs 3


hours to produce P1; 2 h to produce P2 and 3 h to produce P3 and
the enterprize can pay only 20 h.
The enterprize needs 2 units of volume to stock P1; 4 units of
volume to stock P2 and 3 units of volume to stock P3 but it
possesses 35 units of volume in its stock.
The prices for the different products are: 10 F for P1; 15 F for P2
and 25 F for P3.
The problem of the owner is to know how many units for each
product he has to make such that he can get the maximum profit.
Give the mathematical model for the above Scenario (6pts)
II.5 SOLVING LINEAR PROGRAMMING PROBLEMS

II.5: 1. Graphical Method

In this section, we discuss one of the methods of solving linear program


that is graphical method. This method is often used when solving two-
variable models (i.e. models with two decision variables).

Although a two-dimensional graphical solution is hardly useful in real-life


situations (which encompass hundreds or thousands of variables and
constraints), the procedure does offer an unusual opportunity to understand
how the Linear Programming optimization

Example: Consider the problem (P):


Maximize Z = x1 + 3x2
Subject to
−x1 + x2 ≤ 1
x1 + x2 ≤ 2
x1 ≥ 0;x2 ≥ 0
II.5.1 :Graphic Method

Formulate the Construct a graph and plot


LP  the constraint lines

Determine the valid side of each


constraint line

Interpret the Identify the feasible


optimal value. solution region

Evaluate the value of objective function at


Find the vertex at which
each of the vertices of the feasible region
the objective function
attains the optimum (max.
or min.)
STEPS TO SOLVE LINEAR
Solve the following linear programming problems

1. Max. F(x,y) = 60x + 100y


subject to,
x + 2y ≤ 12
2x + y ≤ 12
x,y ≥ 0

2.

33
Questions
Recap 3
1. Differentiate infeasible, feasible and optimal solution
2. Solve below LP problem using Graphic Method
Maximize Z = 30X1 + 40X2
Subject to
3X1 + 2X2 ≤ 600
3X1 + 5X2 ≤ 800
5X1 + 6X2 ≤ 1100
and X1 ≥ 0, X2 ≥ 0
II.5.2: Simplex Method
Solving Linear programming problem using graphic method is of limited as the
number of variables is substantially large. If the linear programming problem has
larger number of variables, the suitable method for solving is Simplex Method.

The simplex method is an iterative process, through which it reaches ultimately to


the minimum or maximum value of the objective function.

The concept behind the simplex method is to start at one extreme feasible point and
compute f(x). The method then moves to another extreme feasible point at the original
point along the boundary of the convex set of feasible points such that a larger value of
f(x) is obtained.

This process continues until f(x) can no longer be increased and a solution point
results or until it is seen that no solution exists.
II.5.2: Simplex Method
In order to apply the simplex method the form of the general linear programming
problem is modified by the introduction of slack variables
t1;t2;...;tm
These slack variables are added to the left-hand side of the inequalities in order to
produce equalities.
Thus, the set of constraints given is rewritten as:

a11x1 + a12x2 + ... + a1nxn + t1 = b1 a21x1 + a22x2 + ... + a2nxn + t2 = b2


.....................................
am1x1 + am2x2 + ... + amnxn + tm = bm

Like the original variables xi; i = 1,...,n the slack variables are also non-negative. If we
have a constraint of the form
ai1x1 + ai2x2 + ... + ainxn ≥ bi
then we introduce a surplus variable instead of a slack variable, and we get
ai1x1 + ai2x2 + ... + ainxn − ti = bi.
II.5.2: Simplex Method
The simplex method process consists of two steps:
1. Find a feasible solution (or determine that none exists).

2. Improve the feasible solution to an optimal solution.


II.5.2: Simplex Method
Basics of Simplex Method
The basic of simplex method is explained with the following linear programming
problem.
Maximize: 12X1 + 16X2
Subject to:
10X1 + 20X2 ≤ 120;
8X1 + 8X2 ≤ 80;
X1, X2 ≥ 0

Solution :
Maximize: 12X1 + 16X2+0S1+0S2
10X1 + 20X2 +S1=120;
8X1 + 8X2+S2=80;
X1, X2, S1, S2 ≥ 0
II.5.2: Simplex Method
CB Cj 12 16 0 0 Solution Ration
i
BV X1 X2 S1 S2

0 S1 10 20 1 0 120  
0 S2 8 8 0 1 80  
               
Zj 0(10)+0(8) 0(20)+) 0(1)+0(0) 0(0)+0(1)  
= (8)= = =

0 0 0 0
Cj-Zj 12 16 0 0    
II.5.2: Simplex Method
Optimality Condition:
For Max
All Cj-Zj ≤0
For Min
All Cj-Zj ≥0
Checking the Optimality , our solution is not optimal as we have Cj-Zj ≥0
Select the maximum value of Cj-Zj to find key column, find the least ration to determine key
row and their intersection is key element
Iteration I
CB Cj 12 16 0 0 Solutio Ratio
i n n
BV X1 X2 S1 S2

16 X2 1/2 1 1/20 0 6  

0 S2 8-8(10)/20=4 0 -2/5 1 32  

               

Zj 16(1/2)+0(4)= 4/5 0  
8 16

Cj-Zj 12-8=4 0 -4/5 0    


Iteration 2
CB Cj 12 16 0 0 Solutio Ration
i n
BV X1 X2 S1 S2

16 X2 1/2 1 1/20 0 6  6/1/2=12

0 S2 8-8(10)/20=4 0 -2/5 1 32  32/4=8

               

Zj 16(1/2)+0(4)= 4/5 0  
8 16

Cj-Zj 12-8=4 0 -4/5 0    


Iteration 2
CB Cj 12 16 0 0 Solutio Ration
i n
BV X1 X2 S1 S2

16 X2 1/2-1/2(4)/4=0 1 1/10 -1/8 2  6/1/2=12

12 X1 1 0 -1/10 1/4 8  32/4=8

               

Zj 16(0)+12(1)=1 16 2/5 1 128  


2

Cj-Zj 12-12=0 0 -2/5 -1    

Check the optimality , for max all Cj-Zj ≤ 0, so with second iteration
we reach the optimality
X1=12, x2=16 and Z(opt)=128
Questions
Recap 4
Solve the below LPP using Simplex Method

Maximize Z = 10X1 + 20X2


Subject to the following constraints
3X1 + 2X2 < 1200
2X1 + 6X2 < 1500
X1 < 350
X2 < 200
X1 , X2 > 0
II.5.3: Dual Simplex Method
The primal and dual solutions are closely related that the optimal solution of either
problem yields the optimal solution to the other.

For LP model in which the number of variables is considerably smaller than the
number of constraints, the computation saving maybe realized by solving the dual

Suppose a “basic solution” satisfies the optimality conditions but not feasible, we
apply dual simplex algorithm.
In regular Simplex method, we start with a Basic Feasible solution (which is not
optimal) and move towards optimality always retaining feasibility. In the dual
simplex method, the exact opposite occurs. We start with an (more than) “optimal”
solution (which is not feasible) and move towards feasibility always retaining
optimality conditions.
The algorithm ends once we obtain feasibility.
II.5.3: Example: Dual Simplex Method
Solve the following LPP by Dual simplex method
Min Z=5x1+6x2
Subject to:
x1+x2≥2
4X1+x2≥4
X1, x2 ≥0
II.5.3: Example: Dual Simplex Method
II.5.3: Example: Dual Simplex Method
II.5.3: Example: Dual Simplex Method
II.5.3: Example: Dual Simplex Method
II.5.3: Example: Dual Simplex Method
II.5.3: Example: Dual Simplex Method
Text Books:
1. Frederick S. Hillier and Gerald J. Lieberman: Introduction to Operations Research,
8th Edition, Tata McGraw Hill, 2005. (Chapters: 1, 2, 3.1 to 3.4, 4.1 to
4.8, 5, 6.1 to 6.7, 7.1 to 7.3, 8, 13, 14, 15.1 to 15.4)
Reference Books:
1. Wayne L. Winston: Operations Research Applications and Algorithms, 4th
Edition, Thomson Course Technology, 2003.
2. Hamdy A Taha: Operations Research: An Introduction, 8th Edition, Prentice
Hall India, 2007

You might also like