0% found this document useful (0 votes)
117 views88 pages

Operation Research and Optimization Techniques

Uploaded by

sorihhailus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views88 pages

Operation Research and Optimization Techniques

Uploaded by

sorihhailus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 88

Operation Research and

Optimization Techniques
(CsEg3071)

By Diriba A.
BHU, 2024
Chapter 1: Operations Research Dev’t

Basic Content:
 Overview
 Characteristics and Phases
 Models
 Linear Programming Problem Formulation
1.1: What is Operations Research?
 Operations (US), Operational(Brit/Europe)
 is an analytical method of problem-solving and decision-
making that is useful in the management of
organizations.
 In OR, problems are broken down into basic
components and then solved in defined steps by
mathematical analysis.
Cont.
 OR Purpose: to provide a rational basis for decisions
making in the absence of complete information.

 Related Disciplines: statistical analysis, management

science, game theory, optimization theory, artificial


intelligence, and network analysis.
1.2.1 Primary Characteristics of OR

1. Optimization: involves comparing and narrowing down


potential options.
2. Simulation: involves building models or replications in order
to try out and test solutions before applying them.
3. Probability and Statistics: includes using mathematical
algorithms and data to uncover helpful insights and risks,
make reliable predictions, and test possible solutions.
1.2.2 Steps in OR Process(Phase)

1. Problem Formulation:
 Identifying a problem that needs to be solved.
Who and What?
 Analyst, expert teams examines situation
 Clearly define what exactly happening
 Identify objective, constraint and variables.
How?
 System Study: gather info, consult and develop problem.
Cont.

2. Constructing a model around the problem that resembles the


real world and variables: Analyze and define the problem.
3. Using the model to derive solutions to the problem.
4. Testing each solution on the model and analyzing its
success.
5. Implementing the solution to the actual problem and
maintain for further.
1.3. OR Models
 It is an idealized representation of a real-life situation and
represents one or more aspects of reality.
 Model is a representation of a system (a unit or process that
exists and operates through the interaction of its parts).
 Modelling is the process of developing a model, conducting
experiments using the model, and evaluating alternative
management policies as well as decision-making practices.
Cont.

Model representation:
 diagrams, maps, flowcharts, mathematical equations, graphs,
computer simulations, or physical replicas of the system.
2 Basic Purposes of Models:
i. to convey the current understanding of a system or
ii. to generate a new understanding of the system or both.
Cont.

Aim of Models :
 to offer ways for examining the performance of the
system for further improvement.
Cont.

Steps in Modelling:
1.Defining the problem
2.Collecting data
3.Building a model of the system
4.Deriving a solution
5.Testing to validate the model and the solution
6.Implementing the solution
Cont.

Principles of Modelling:
 If a simple model will be adequate, never choose a
complicated model.
 Remember, models never replace decision-makers.
 Deduction phase of modeling must be performed diligently.
 Validation of models is necessary before implementation.
 A model is only as good as the information that it is given.
Cont.

Characteristics of a Good Model


 Should have a few simple assumptions.
 Fewer variables for a model to be simple and easy to
understand.
 Open to the parametric type of approach.
 Should not take too much time in its
 Should be flexible and open to adjustments.
 Should be able to show the associations and interrelations of
cause and effect in operational conditions.
Types of Models in OR
Broadly classified as:
i. Mathematical and Descriptive
ii. Static and Dynamic
Types of Models in OR
Based on the Degree of Abstraction
1. Mathematical models
 is a set of equations that are used to represent a real-life
situation or problem.
e.g. linear programming problems for maximizing profits or
transportation problems.
Cont.
2. Concreate models
 are the least abstract models and a viewer can observe
the shape and characteristics of the modeled entity
immediately.
e.g. a globe of the earth or a 3-D model of human DNA.
Cont.
3. Language models
 are more abstract than concrete models but less
abstract than mathematical models.
e.g. speech recognition.
Cont.
Based on the Function
1. Descriptive model
 is one in which all the operations involved in a system
are represented using non-mathematical language.
 The relationships and interactions among different
operations are also defined using non-mathematical
language.
Cont.
NB: Descriptive models are used to define and represent a
system but they cannot predict its behavior. e.g. a layout
plan.
2. Predictive Models
 is developed and validated using known results and is
used to predict future events or outcomes.
Cont.
 Predictive models are used to increase the probability of
forecasting future outcomes and risks by incorporating
historical information.
 Unlike mathematical models, predictive models are not
easy to explain in the equation form, and simulation
techniques are often needed to generate a prediction.
Cont.
 Curve and surface fitting, time series regression, or
machine learning techniques may be used to construct
predictive models
Cont.
3. Normative or Perspective Models
 Are used for recurring problems.
 Decision rules or criteria are developed for finding the
optimal solutions.
 Solution process can be programmed easily without the
management’s involvement.
e.g. linear programming
Cont.
Based on the Nature of the Environment
1. Deterministic model
 One that allows you to precisely calculate an outcome,
without the involvement of uncertainty or unpredictability, or
randomness.
 always provides the same output for a certain set of input
variables and data available to predict outcomes with certainty.
Cont.
2. Probabilistic model
 handles uncertainties or randomness in the applied
inputs.
 Also called stochastic (property of having a random
probability distribution that can be statistically analyzed but
may not be predicted accurately) model.
Cont.
 Unlike deterministic, probabilistic models may not
always provide the same output for a certain set of input
variables because of the randomness it includes, but
more sophisticated than deterministic as they
incorporate historical data to demonstrate the probability
of the occurrence of an event.
Cont.
Based on the behavior of problem variables and constraints
1. Static model
 Assumes no change in variable values in given problem for
environment or condition change in the system.
 All given values are time-independent.
 Mostly, one decision is desirable for given planning period.
Cont.
2. Dynamic model
 Variable values changes with time, system condition, env’t.
 Serious of, independent decision exist in planning period.
Cont.
Based on the method of getting solution
1. Analytical model
 Has well-defined mathematical structure. e.g. assignment,
resource allocation, sequencing and transportation model.
 Solved by mathematical methods.
Cont.
2. Simulation model
 Has mathematical structure but not solved by mathematical
methods.
 Needs experimental studies(system behavior)
 Doesn’t have general solution method.
Cont.

Limitations of Models
 Constructed only to understand and attempt to solve the
problem  not to be considered as real problem or system.
 Validity of any model is verified by experimental analysis
with relevant data characteristics.
1.4. Linear Programming Problem Formulation in OR

 Linear Programming (LP) or Linear Optimization is


the problem of maximizing or minimizing a linear
function that is subjected to linear constraints which may
be equalities or inequalities.
 The optimization problems involve the calculation of
profit and loss.
Basic Components of LP

 Decision Variables
 Constraints
 Data
 Objective Functions
Cont.

i. Decision Variables: quantities to be calculated, decision


maker control over.
 are continuous, controllable and non-negative represented as:
x1>=0, x2>=0,…, xn>=0
ii. Objective Function: used to maximize or minimize some
numerical values to be optimized representing cost, profit,
quantity and product.
Cont.

General form of Objective Function:


Optimize(Maximize/Minimize) Z = c1x1+c2x2, … + cnxn, Where:
 Z represents measure of performance variable(x 1x2, xn),
 c1, c2, …, cn represent parameters contributing for variables.

iii. Constraint: restriction on use of resource.


iv. Data: measures connection between objective function and
constraint
Cont.

e.g. Maximize 65*y1+ 90*y2 subjected to:

0.25*y1 + 1.25*y2 >= 15, 1* y1 + 0.5* y2 >=10 where y1 & y2 >=0


Characteristics of LP

 Constraints: limitations should be expressed in the mathematical


form, regarding the resource.
 Objective Function: should be specified in a quantitative way.
 Linearity: there must be a linear relationship between two or
more variables in the function (the degree of the variable is one).
 Finiteness: there should be finite and infinite input and output
numbers in case, if the function has infinite factors, and the
optimal solution is not feasible.
Cont.

 Non-negativity: variable value should be positive or zero (not


be a negative value).
 Decision Variables: will decide the output (gives the ultimate
solution to the problem). For any problem, the first step is to
identify the decision variables.
Cont.

 Linear Programming Problems (LPP) is a problem that is


concerned with finding the optimal value (maximum or
minimum) of the given linear function called an objective
function.  Optimization Problem
Methods to Solve Linear Programming Problem

 Graphical method
 Simplex method
 Tools such as R, open solver, etc.
Cont.

i. Graphical Method:
 Used to optimize the two-variable linear programming.
 If the problem has two decision variables, a graphical method is
the best method to find the optimal solution.
 The set of inequalities is subjected to constraints are plotted in
the XY plane.
Cont.

 Once, all the inequalities are plotted in the XY graph, the


intersecting region will help to decide the feasible region.
 The feasible region will provide the optimal solution as well as
explains what all values our model can take.
Formulating Linear Programming Problem

Process: steps to define LPP generically:


1.Identify the decision variables
2.Write the objective function
3.Mention the constraints
4.Explicitly state the non-negativity restriction
Example1: Linear Programming Problem (Graphical)

 A farmer has recently acquired a 110 hectares piece of land. He


has decided to grow Wheat and barley on that land.
 Due to the quality of the sun and the region’s excellent climate,
the entire production of Wheat and Barley can be sold.
 He wants to know how to plant each variety in the 110 hectares,
given the costs, net profits, and labor requirements according to
the data shown: See the next slide
Cont.

Man-days/
Variety Cost (Price/Hec) Net Profit (Price/Hec)
Hec

Wheat 100 50 10

Barley 200 120 30

The farmer has a budget of US$10,000 and an availability of 1,200


man-days during the planning horizon. Find the optimal solution
and the optimal value.
Cont.

Solution: 1st formulate LPP


Step 1: Identify the decision variables
 The total area for growing Wheat = X (in hectares)
 The total area for growing Barley = Y (in hectares)
 X and Y are decision variables
Cont.

Step 2: Write the Objective function


Since the production from the entire land can be sold in the
market, the farmer would want to maximize the profit for his total
produce. We are given net profit for both Wheat and Barley. The
farmer earns a net profit of $50 for each hectare of Wheat and
$120 for each Barley.
Our objective function (given by Z) is, Max Z = 50X + 120Y
Cont.

Step 3: Write the Constraint


1. It is given that the farmer has a total budget of US$10,000.
The cost of producing Wheat and Barley per hectare is also
given to us. We have an upper cap on the total cost spent by
the farmer. So our equation becomes:100X + 200Y ≤ 10,000
Cont.

2. The next constraint is the upper cap on the availability of the


total number of man-days for the planning horizon.
 The total number of man-days available is 1200.
 As per the table, we are given the man-days per hectare for
Wheat and Barley.10X + 30Y ≤ 1200
Cont.

3. The third constraint is the total area present for the plantation.
The total available area is 110 hectares. So the equation
becomes, X + Y ≤ 110
Step 4. Non-Negative Restriction
The values of X and Y will be greater than or equal to 0.
X ≥ 0, Y ≥ 0
Cont.

 Now, after Problem Formulation, Solve by Graphical


Method:
 Since we know that X, Y ≥ 0, will consider only the first
quadrant.
Cont.

 To plot the graph for the above equations, first, simplify all the
equations.
 100X + 200Y ≤ 10,000 can be simplified to X + 2Y ≤ 100 by
dividing by 100.
 10X + 30Y ≤ 1200 can be simplified to X + 3Y ≤ 120 by
dividing by 10.
 The third equation is in its simplified form, X + Y ≤ 110.
Cont.

 Plot the first 2 lines on a graph in the first quadrant


Cont.

 The optimal feasible solution is achieved at the point of


intersection where the budget & man-days constraints are
active. This means the point at which the equations X + 2Y ≤
100 and X + 3Y ≤ 120 intersect gives us the optimal solution.
 The values for X and Y which gives the optimal solution at
(60,20).
 To maximize profit the farmer should produce Wheat and
Barley on 60 hectares and 20 hectares of land respectively.
Cont.

 The maximum profit the company will gain is:


Max Z = 50 * (60) + 120 * (20) = US$5400
Cont.

ii. Simplex Method:


 One of the most popular methods to solve LPP that is an
iterative process to get the feasible optimal solution.
 The value of the basic variable keeps transforming to obtain the
maximum value for the objective function.
 The optimal solution to a linear programming problem if it exists,
always occurs at one of the corner points of the feasible solution
space.
Cont.

Steps to solve LPP using Simplex Method


1. Set up the problem: write the objective function and the
inequality constraints.
2. Convert the inequalities into equations: add one slack
variable for each inequality.
3. Construct the initial simplex tableau: write the objective
function as the bottom row.
Cont.

4. The most negative entry in the bottom row identifies the pivot
column.
5. Calculate the quotients: the smallest quotient identifies a row.
 The element in the column intersection identified in step 4 and the row
identified in this step is the pivot element.
 The quotients are computed by dividing the far right column by the
identified column in step 4.
 A quotient that is a zero, a negative number, or a zero in the
denominator, is ignored.
Cont.

6. Perform pivoting to make all other entries in this column


zero.
7. When there are no more negative entries in the bottom
row, we are finished; otherwise, we start again from step 4.
8. Read off your answers: get the variables using the columns
with 1 and 0s.
 All other variables are zero.
 The maximum value you are looking for appears in the bottom right-
hand corner.
Cont.

Slack Variable: a non-negative variable that is added to the left-


hand side of the constraint that has <= sign to convert it into an
equation.

7x1 + 4x2 ≤ 5, where x1, x2 ≥ 0


e.g. 3x1 + 5x2 ≤ 2,

 We add the slack variables s1 ≥ 0, and s2 ≥ 0 on the left-hand


sides of the above inequalities respectively to obtain
3x1+5x2+s1 = 2
7x1+4x2+s2 = 5
x,x,s,s ≥0
Cont.

Surplus Variable: a positive variable that is subtracted from the


left-hand side of the constraint that has a >= sign to convert it into
an equation.
e.g. 3x1 + 5x2 ≥2,
7x1 + 4x2 ≥ 5, where x1, x2 ≥ 0
 We subtract the surplus variables s 3 ≥ 0, and s4 ≥ 0 on the left-
hand sides of the above inequalities respectively to obtain
3x1+5x2- s3 = 2
7x1+4x2- s4 = 5, where x1, x2, s3, s4 ≥ 0
Example 2: Linear Programming Problem (Simplex Method)

e.g. Niki holds two part-time jobs, Job I and Job II.
 She never wants to work more than a total of 12 hours a week. She
has determined that for every hour she works at Job I, she needs 2
hours of preparation time, and for every hour she works at Job II, she
needs one hour of preparation time, and she cannot spend more than
16 hours on preparation.
 If she makes $40 an hour at Job I, and $30 an hour at Job II, how
many hours should she work per week at each job to maximize her
income?
Cont.

Step 1. Set up the problem: write the objective function and the
constraints.
Since the simplex method is used for problems that consist of
many variables, it is not practical to use the variables x, y, z, etc.
We use symbols x1, x2, x3, and so on.
Let
 x1 = The number of hours per week Niki will work at Job I and

 x2 = The number of hours per week Niki will work at Job II.
Cont.

Choose a variable to be maximized as Z.


Problem formulation:

Step 2. Convert the inequalities into equations: done by adding


one slack variable for each inequality.
e.g. to convert the inequality into an equation, we add a non-
negative variable y1, and we get x1+x2+y1=12
Cont.

Now re-write the objective function(


After adding the Slack variable:
=0
Cont.

Step 3. Construct the initial simplex tableau: each inequality


constraint appears in its own row. (The non-negativity constraints
do not appear as rows in the simplex tableau.)
 Write the objective function as the bottom row.
Cont.

Now that the inequalities are converted into equations, we can


represent the problem into an augmented matrix called the initial
simplex tableau as follows:

Here the vertical line separates the left hand side of the equations
from the right side. The horizontal line separates the constraints
from the objective function. The right side of the equation is
represented by the column C.
Cont.

If we arbitrarily choose x1, x2=0 we get:

which reads y1=12, y2=16 and Z=0


 We can label the basic solution (above) variable in the right of
the last column as shown in the table below:
Cont.

Step 4. The most negative entry in the bottom row identifies


the pivot column.
 The most negative entry in the bottom row is -40; therefore the
column 1 is identified.
Cont.

Q: Why do we choose the most negative entry in the bottom row?


Answer: it represents the largest coefficient in the objective
function, the coefficient whose entry will increase the value of the
objective function quickest.
 Job I pays $40 per hour as opposed to Job II which pays only

$30, the variable x1 will increase the objective function by $40


for a unit of increase in the variable
Cont.

Step5. Calculate the quotients. The smallest quotient identifies a


row. The element in the intersection of the column identified in step
4 and the row identified in this step is identified as the pivot
element.
 In order to calculate the quotient, we divide the entries in the far
right column by the entries in column 1, excluding the entry in
the bottom row.
Cont.

The smallest of the two quotients, 12 and 8, is 8. Therefore row 2


is identified. The intersection of column 1 and row 2 is the entry 2,
which has been highlighted. This is our pivot element.
Cont.

Question Why do we find quotients, and why does the smallest


quotient identify a row?
Answer When we choose the most negative entry in the bottom
row, we are trying to increase the value of the objective function by
bringing in the variable x1.
Cont.

Step 6. Perform pivoting to make all other entries in this


column zero: make our pivot element a 1 by dividing the entire
second row by 2

To obtain a zero in the entry first above the pivot element, we


multiply the second row by -1 and add it to row 1. We get
Cont.

To obtain a zero in the element below the pivot, we multiply the


second row by 40 and add it to the last row.

Now determine the basic solution associated with this tableau. By


arbitrarily choosing x2 = 0 and y2 = 0, we obtain x1 = 8, y1 = 4, and z
= 320.
Cont.

Niki works 8 hours at Job I, and no hours at Job II, her profit Z will
be $320.
Here y_1 = 4 and y_2 = 0 mean that she will be left with 4 hours of
working time and no preparation time.
Cont.

STEP 7. When there are no more negative entries in the


bottom row, we are finished; otherwise, we start again from
step 4.
Since there is still a negative entry, -10, in the bottom row, we need
to begin, again, from step 4. This time we will not repeat the details
of every step, instead, we will identify the column and row that give
us the pivot element, and highlight the pivot element.
Cont.

1
Make the pivot element 1 by multiplying row 1 by 2
Cont.

Now to make all other entries as zeros in this column, we first


multiply row 1 by -1/2 and add it to row 2, and then multiply row 1
by 10 and add it to the bottom row.
Cont.

We no longer have negative entries in the bottom row, therefore we


are finished.
STEP 8. Read off our answers.
Look at the columns that have a 1 and all other entries zeros.
Since the columns labeled y1 and y2 are not such columns, we

arbitrarily choose y1 = 0, and y2 = 0

The matrix reads x1 = 4, x2= 8 and z = 400.


Cont.

The final solution says that:


 if Niki works 4 hours at Job I and 8 hours at Job II, she will
maximize her income to $400.
 Since both slack variables are zero, it means that she would
have used up all the working time, as well as the preparation
time, and none will be left.
Cont.

iii. R:
 is an open-source tool that is very popular among data scientists
for essential data science tasks.
 Performing linear programming is very easy and we can attain
an optimum solution in very few steps.
 Used for more than two decision variables or complex problems.
 Lpsolve package used for LPP to evaluate the optimum solution.
Example 3: Linear Programming Problem (R Programming)

e.g3. Solve Using R


A toy manufacturing organization manufactures two types of toys A
and B. Both the toys are sold at $25 and $20 respectively. There
are 2000 resource units available daily from which toy A requires
20 units while toy B requires 12. Both of these toys require a
production time of 5 minutes. Total working hours are 9 hours a
day. What should be the manufacturing quantity for each of the
pipes to maximize the profits?
Cont.

Solution:
The objective function is: Max.Z=25x+20y, where x are pipe A
units and y are pipe B units.
Constraints: 20x+12y<=2000
5x+5y<=540
Cont.

Output
Cont.

From the output, we see that the organization should produce 88


units of toy A and 20 units of toy B and the maximum profit for the
organization will be $2600.
Cont.

iv. Artificial Variable Techniques:


 is a device to get the starting basic feasible solution, so that
simplex procedure may be adopted as usual until the optimal
solution is obtained.
 Artificial variable refers to the kind of variable which is
introduced in the linear program model to obtain the initial basic
feasible solution. It is utilized for equality constraints and for
greater than or equal inequality constraints.
Cont.

 Variable(data item) refers to the number, characteristics, or


quantity that can be counted or measured.
 Some kinds of variables are control variables, discrete variables,
random variables, continuous variables, observed variables,
moderating variables, dummy variables, binary variables, and
scale variables.
Cont.

 In order to ensure that only the basic feasible solution needs to


be considered, the artificial variable satisfies the nonnegative
constraint.
 To solve LPP using artificial variable techniques, there are two
methods:
i. Big M Method or Method of Penalties.
ii. Two-phase Method.

You might also like