Operations Research Lab Report
Operations Research Lab Report
OBJECTIVE:
LITERATURE REVIEW:
THE ORIGINS OF OPERATIONS RESEARCH
Since the advent of the industrial revolution, the world has seen a remarkable
growth in the size and complexity of organizations. The artisans small shops of an
earlier era have evolved into the billion-dollar corporations of today. An integral part
of this revolutionary change has been a tremendous increase in the division of labor
and segmentation of management responsibilities in these organizations. The results
have been spectacular. However, along with its blessings, this increasing specialization
has created new problems, problems that are still occurring in many organizations.
One problem is a tendency for the many components of an organization to grow into
relatively autonomous empires with their own goals and value systems, thereby losing
sight of how their activities and objectives mesh with those of the overall
organization. What is best for one component frequently is detrimental to another, so
the components may end up working at cross purposes. A related problem is that as
the complexity and specialization in an organization increase, it becomes more and
more difficult to allocate the available resources to the various activities in a way
that is most effective for the organization as a whole. These kinds of problems and
the need to find a better way to solve them provided the environment for the
emergence of operations research (commonly referred to as OR).
The roots of OR can be traced back many decades, when early attempts were
made to use a scientific approach in the management of organizations. However, the
beginning of the activity called operations research has generally been attributed to
the military services early in World War II. Because of the war effort, there was an
urgent need to allocate scarce resources to the various military operations and to the
activities within each operation in an effective manner. Therefore, the British and
then the U.S. military management called upon a large number of scientists to apply a
scientific approach to dealing with this and other strategic and tactical problems. In
effect, they were asked to do research on (military) operations. These teams of
scientists were the first OR teams. By developing effective methods of using the new
tool of radar, these teams were instrumental in winning the Air Battle of Britain.
Through their research on how to better manage convoy and antisubmarine
operations, they also played a major role in winning the Battle of the North Atlantic.
Similar efforts assisted the Island Campaign in the Pacific.
When the war ended, the success of OR in the war effort spurred interest in
applying OR outside the military as well. As the industrial boom following the war was
running its course, the problems caused by the increasing complexity and
specialization in organizations were again coming to the forefront. It was becoming
apparent to a growing number of people, including business consultants who had
served on or with the OR teams during the war, that these were basically the same
problems that had been faced by the military but in a different context. By the early
1950s, these individuals had introduced the use of OR to a variety of organizations in
business, industry, and government.
The rapid spread of OR soon followed. At least two other factors that played a key
role in the rapid growth of OR during this period can be identified.
1- One was the substantial progress that was made early in improving the
techniques of OR
2- A second factor that gave great impetus to the growth of the field was the
onslaught of the computer revolution.
The term Operations Research (OR) describes the discipline that is focused on the
application of information technology for informed decision-making. In other words,
OR represents the study of optimal resource allocation. The goal of OR is to provide
rational bases for decision making by seeking to understand and structure complex
situations, and to utilize this understanding to predict system behavior and improve
system performance. Much of the actual work is conducted by using analytical and
numerical techniques to develop and manipulate mathematical models of
organizational systems that are composed of people, machines, and procedures. This
article introduces some of the methods and application that are affiliated with OR,
and elaborates on some of the benefits that may be gained by incorporating OR into
the actual business framework.
There are mainly four steps in the mathematical formulation of linear programming
problem as a mathematical model. We will discuss formulation of those problems
which involve only two variables.
1- Identify the decision variables and assign symbols x and y to them. These
decision variables are those quantities whose values we wish to determine.
2- Identify the set of constraints and express them as linear equations/in
equations in terms of the decision variables. These constraints are the given
conditions.
3- Identify the objective function and express it as a linear function of decision
variables. It might take the form of maximizing profit or production or
minimizing cost.
4- Add the non-negativity restrictions on the decision variables, as in the physical
problems, negative values of decision variables have no valid interpretation.
Xb = Hat B
2- Objective Function:
Maximize profit: Z= 8 Xa + 5Xb
3- Constraints:
Xa 150
Xb 250
& that
6- Maximum Profit:
Z = 8(100) + 5(300)
Z = 2300 rupees
EXAMPLE 2:
Leather limited manufacturers produces two types of belts, Belt A & Belt B, Each
type requires 1 square yard of leather. Belt B requires 1 hour of labor and Belt A
requires 2 Hour of labor. Each week 40 Sq-Yd of Leather and 60 hours of labor are
available.
Profit on B = 3 rupees and profit on A = 4 rupees
SOLUTION:
1- Assume that Xa = Belt A & Xb = Belt B
2- Objective Function:
Maximize Profit: Z= 4 Xa + 3Xb
3- Constraints:
Xa + Xb 40
2Xa + Xb 60
6- Maximum Profit:
Substituting values into Z to get
Z= 4(20) + 3(20) = 140
EXAMPLE 3:
A company owns a small paint factory that produces both interior and exterior paints
for whole sale distribution; Basic raw material A & B are used. The daily requirements
are shown in the table.
Market survey shows that the daily demand for I.P cannot exceed the E.P by more
than 1 ton. The survey also revealed that the maximum demand for I.P is limited to 2
ton only. The whole sale price per Ton is 3000 for exterior paint and 2000 for interior
paint.
Exterior Paint
(E.P)
Interior Paint
(I.P)
Maximum daily
availability (Tons)
Raw Material, M1
Raw Material, M2
3000
2000
Solution:
1- Assume that Xe = Exterior paint & Xi = Interior paint
2- Objective Function:
Maximize Profit: Z= 3000 Xe + 2000 Xi
3- Constraints:
Xe + 2Xi 6
2Xe + Xi 8
Xi Xe + 1
Xi 2
---------
1
2
3
4
Xe = 10/3, Xi = 4/3
Now substituting the Xi Value into equation 3 to get Xe = 1/3
6- Maximum Profit:
Substituting values into Z to get
Z= 3000(1/3) + 2000(4/3) = 3666.67
LAB REPORT # 2
OBJECTIVE:
LITRATURE REVIEW:
INTRODUCTION TO LINEAR PROGRAMMING PROBLEMS
Linear programming uses a mathematical model to describe the problem of concern.
The adjective linear means that all the mathematical functions in this model are
required to be linear functions. The word programming does not refer here to
computer programming; rather, it is essentially a synonym for planning. Thus, linear
programming involves the planning of activities to obtain an optimal result, i.e., a
result that reaches the specified goal best (according to the mathematical model)
among all feasible alternatives.
Introduction
The mathematical model which tells to optimize (minimize or maximize) the
objective function Z subject to certain condition on the variables is called a Linear
programming problem (LPP).
CONCLUSIONS:
The graphical method of solving an LPP is possible only if there are two
decision variables (say x and y). This method is not suitable if there are
three or more decision variables. In this case, there is a powerful
method called 'simplex method'. The wide usage of liner programming
helps in business and economics, to use the resources available in a
planned and economical way. We have just learnt the basics of LPP;
there is in fact a lot to learn. A lot of research work is carried all over
the world which is based on LPP.
There are a few limitations of linear programming
1- Linear programming is applicable only to problems where the
constraints and objective function are linear i.e., where they can
be expressed as equations which represent straight lines. In real
life situations, when constraints or objective functions are not
linear, this technique cannot be used.
2- Factors such as uncertainty, weather conditions etc. are not taken
into consideration.
LAB REPORT # 3
OBJECTIVE:
LITRATURE REVIEW:
THE ESSENCE OF THE SIMPLEX METHOD
We can solve two variables LP models easily using the graphical
method outlined in the previous section but what should we do in case of
three variable problems, i.e. when our company makes three products we
have to make decisions about. What about four or five variable problems?
This is where the simplex method comes in. It is an iterative method which
by repeated use gives us the solution to any n variable LP model.
The simplex method is a method for solving problems in linear
programming. it has proved to be a remarkably efficient method that is used
routinely to solve huge problems on todays computers. Except for its use on
tiny problems, this method is always executed on a computer, and
sophisticated software packages are widely available. Extensions and
variations of the simplex method also are used to perform post optimality
analysis (including sensitivity analysis) on the model.
This method, invented by George Dantzig in 1947, tests adjacent
vertices of the feasible set in sequence so that at each new vertex the
objective function improves or is unchanged. The simplex method is very
efficient in practice, generally taking 2m to 3m iterations at most (where m is
the number of equality constraints), and converging in expected polynomial
time for certain distributions of random inputs. However, its worst-case
complexity is exponential, as can be demonstrated with carefully constructed
examples.
The advantages of the simplex method are
1) It can be used to tackle problems in which there are more than two
decision variables (not possible with graphical methods).
2) It is a method that can be programmed on a computer fairly easily.
A disadvantage of the simplex method is that it can only be applied to
certain types of linear programming problems. The types of problems for
which the simplex method are suitable are ones that can be expressed in the
following STANDARD FORM:
The constraints must include the non-negativity constraints for all the
decision variables.
The other constraints must be expressed in the form (linear expression)
No. where the No. on the right hand side must be positive.
The objective must be to MAXIMISE some linear expression
While it is always possible to meet the third of these conditions, it is not
always possible to meet the first or second one. For example, if a linear
programming problem specifies that a function P = 3x 4y is to be
minimized, we may solve the problem by maximizing P = -3x +
4y instead. However, if the non-negativity constraints are not present, there
is nothing we can do about it. Similarly, if one of the constraints requires that
2x + 5y 2, we cannot transform this to an inequality of the required form.
Multiplying through by -1 gives -2x 5y -2, but standard form requires the
constant on the right hand side to be POSITIVE.
Source I
P1 (ton)
0.2
0.2
0.3
5
0.3
French fries
Hash brown
Flakes
Profit/ton
Wastage
Solution:
Source II
P2 (ton)
0.3
0.1
0.3
6
0.3
Maximize
5P1+6P2
0.2P+0.3P 1.8
Sales limitation
(ton)
1.8
1.2
2.4
Constraints
0.2P+0.1P 1.2
0.3P+0.3P 2.4
P1 & P2
Solution (I):
P0-5P1-6P2=0
5P1+6P2-P0=0
0.2P1+0.3P2+1P3= 1.8
0.2P1+0.1P2+1P4= 1.2
0.3P1+0.3P2+1P5 =2.4
P2=1.2,
P3=2.4
Solution (II):
STEP (i)
P0-5P1-6P2= 0
1/5P1+3/10P2+1P3= 9/5
Row 0
Row 1
1/5P1+1/10P2+1P4=6/5
Row 2
3/10P1+3/10P2+1P5=10/5
Row 3
STEP (ii)
From Row(0) select that non-basic variable which has maximum
ive value i.e P2and then put
P1=P3=P4=P5=0 in all rows except row (0
3/5P2=9/5
P2=6
1/10P2=6/5
P2=12
3/10P2=12/5
P2=8
STEP (iii)
Choose row that gives minimum value of P i.e Row (1) and
then make coefficient of P unity in that row
10/3* Row
Row
Row (0)
. Row (1)
Row (2)
STEP (IV)
.. Row (1)
(12/3)P1+6P2+20P3=36
. Row (1)*6
P0-P1
+20P3= 36
P0-P1+20P3=36
And
2P1
Row (0)
+ P2 +
_ (2/3) P1
10P4=12
P2 (10/3) P3=6
.. Row (2)*10
. Row (1)
Row (2)
3P1+3P2+1P5= 24
.Row (3)*10
_2P13P210P3=_18
1P1-10P3+10P5=6
Now
P0-P1+20P3=36
.Row (3)
...Row (0)
.Row (1)
(4/3)P1-(10/3)P3+10P4=6
Row (2)
1P1-10P3+10P5=6
Now
..Row (3)
put
P1=P3=0; in all these Rows to get
P0=36; P2=6; P4=3/5; P5=3/5
The solution is not optimal as the objective function contains ive variable i.e P 1
Solution (III)
STEP (I)
P 0-P1+20P3=36
.Row (0)
.Row (1)
Row (2)
1P1-10P3+10P5=6
STEP (II)
then put
..Row (3)
P 1 =9
(4/3)P1=6
P 1 =4.5
P1=6
P 1 =6
STEP (III)
Choose Row that gives minimum value of P i.e Row (2)
and then make coefficient of P unity in that Row i.e Row (2)
i.e
(3/4*4/3)P1-(3/4*10/3) P3 + (3/4*10) P 4=6*3/4
....Row (2)
Rewrite all the equation replacing Row (2) by this new Row.
P0-P1+20P3=36
Row (0)
.Row (2);
Row (1)
P1-10P3+10P5=6
STEP (IV)
....Row (3)
.row (0)
....Row (2)
..Row (0)
Row (2)
..Row (!)
P1-10P3+10P5=6
..Row (3)
..Row (2)
..Row (3)now
Row (0)
Row (1)
-(15/2)P3-(15/2)P4+(10)P5=3/2
P1-(5/2)P3+(15/2)P4=9/2
Put
.Row (1) x
Row (3)
..Row (2)
EXAMPLE NO (2):Suppose that a company has the option of choosing one more different types of
production processes. The 1st & 2nd process yields items product A. 3rd &4th yield
items of product B. the input of each process is measured in pound of material y
and varies in its input requirements, the profits producing the same item. The
manufacture deciding on a weeks production schedule is limited in the range of
possibilities by the available amounts of manpower and of both types of ram w
material. The full technology and input description are given in the table below;
Item
Man weeks
P1
P2
P3
P4
Total
available
15
lb of y
1 Box as of
Z
Unit profit
11
Supposed
production
level
X1
X2
X3
X4
10
120
15
100
constraint
3x1+5x2+10x3+15x4100
x1, x2 ,x3 ,x4 0
SOLUTION (I)
4x1+5x2+9x3+11x4=x
Row (0)
x1+x2+x3+x4+x5=15
7x1+5x2+3x3+2x4+x6= 120
3x1+5x2+10x3+15x4+x7= 100
Put
.Row (1)
. Row (2)
Row (3)
SOLUTION (II)
Step (i)
x 0-4x1-5x2-9x3-11x4=0
X1+x2+x3+x4+x5=15
...Row (0)
...Row (1)
7x1+5x2+3x3+2x4+x6=120
...Row (2)
3x4+5x2+10x3+15x4+x7=100
Row (3)
Step (II)
From Row (0) select the non-basic variable which has maximum
ive value i.e x4 and then
Put
x4=15
2x4=120
x 4=60
15x4=100
x4=20/3
Step (III)
Choose the Row that gives minimum value of x4 i.e Row (3) and then
make coefficient of x4 unity in that row i.e
(3/15) x1+ (5/15)x2+(10/15)x3+x4+(1/15)x7=100/15
Row (3)
(1/15) x
(1/5)x1+(1/3)x2+(2/3)x3+x4+(1/15)x7=20/3
..Row (3)
Rewrite all equation replacing Row (3) by this new Row
x0-4x1-5x2-9x3-11x4=0
...Row (0)
x1+x2+x3+x4+x5=15
Row (1)
7x1+5x2+3x3+2x4+x6=120
.. Row (2)
(1/5)x1+(1/3)x2+(2/3)x3+x4+(1/15)x7=20/3
STEP (IV)
..Row (3)
eliminate chosen variable i.e x from all Rows except Row (3)
x0-4x1-5x2-9x3-11x4=0
row (0)
(11/5)x1+(11/3)x2+(22/3)x3+(11)x4+(11/15)x7=220/3
. (11)
x0-(9/5)X1+(4/3)X2-(5/3)X3+(111)X7= 220/3
Row
x row (3)
(0)
x1 + x 2+ x3 + x4 + x5 = 15
_ (1/5)x1+_(1/3)x2+_(2/3)x3+_x4+_(1/5)x7= 20/3
.Row (1)
..
Row (3)
]
....Row (1)
7x1+5x2+3x3+2x4+x6= 120
Row
(2/5)x1+(2/3)x2+(4/3)x3+2x4+(2/5)x7=40/3
.2 x
(2)
Row(3)
(33/5)x1+(13/3)x2+(5/3)x3+ x6-(2/15)x7= 320/3
.Row(2)
(4/5)x1+(2/3)x2+(1/3)x3+ x5 -(1/15)x7= 25/3
Now
(0)
....Row (1)
x0-(9/5)X1+(4/3)X2-(5/3)X3+(111)X7= 220/3
Row
..Row (3)
x0=220/3 , x5=25/3 ,
The solution is not optimal because objective function contains negative terms
Solution III
STEP I
X0-(9/5)x1-(4/3)x2-(5/3)x3+(11/15)x7= 220/3
.Row(0)
.Row(1)
.Row(2)
.Row(3)
STEP II
FROEM Row(0) select the non-basic variable having maximum negative value i.e x
and
then put
x2=x3=x4=x5=x6=x7=0
in all rows except row (0)
(4/5)x1=25/3
x1=125/12
(33/5)x1=320/3
x1=1600/99
(1/5)x1=20/3
x 1=100/3
from Row(1)
from Row(2)
from Row(3)
STEP III
Choose the Row that gives minimum value of x1 i.e Row(1) and the
make coefficient of x1 unity in that Row i.e
.Row(0)
x1+(5/6)x2+(5/12)x3+(5/4)x5-(1/12)x7= 125/12
..Row(1)
(33/5)x1+(13/5)x2+(5/3)x3-(2/15)x7+ x6= 320/3
(1/5)x1+(1/3)x2+(2/3)x3+(1/15)x7+ x4= 20/3
STEP IV
.Row(2)
.Row(3)
Eliminate chosen variable i.e x1 from all Rows except Row (1)
x0-(9/5)x1-(4/3)x2-(5/3)x3+(11/15)x7= 220/3
.Row(0)
(9/5)x1+(3/2)x2+(3/4)x3+(9/4)x5-(3/20)x7=75/4
........(9/5) x Row(1)
X0+(1/6)x2-(11/12)x3+(9/4)x5+(7/12)x7=1105/12
Row(0)
(33/5)x1 + (13/3)x 2+ (5/3)x 3+ x6 - (2/15)x 7=320/3
Row(2)
..
_(33/5)x1+_(11/2)x2+_(11/4)x3+_(33/4)x5-+(11/20)x7=_275/4
(33/5) x Row(1)
-(7/6)x2-(13/12)x3-(33/4)x5+ x6+(5/12)x7=455/12
..Row(2)
(1/5)x1+(1/3)x2+(2/3)x3+ x4 +(1/15)x7=20/3
Row(3)
_(1/5)x1+_(1/6)x2+_(1/12)x3+_(1/4)x5-+(1/60)x7=_25/12 (1/5) x
Row(1)
(1/6)x2+(7/12)x3+ x4 -(1/4)x5+(1/12)x7=55/12
X0+(1/6)x2-(11/12)x3+(9/4)x5+(7/12)x7=1105/12
x1+(5/6)x2+(5/12)x3+(5/4)x5-(1/12)x7= 125/12
..Row(1)
Row(3)
Now
Row(0)
-(7/6)x2-(13/12)x3-(33/4)x5+ x6+(5/12)x7=455/12
..Row(2)
(1/6)x2+(7/12)x3+ x4 -(1/4)x5+(1/12)x7=55/12
Put
Row(3)
Since the objective function still contains negative coefficient so the solution is not
optimal.
SOLUTI0N IV
Repeat the same process
ANSWER
EXAMPLE NO 3:MINIMIZE
z= 3x1+4x2
subject to
4x1+5x2 30 ; 7x1+2x2 24
WHERE
x1 & x2 0
Put
..Row(0)
4x1+5x2+x3= 30
..Row (1)
7x1+2x2+x4= 24
..Row(2)
&
x4= 24
..Row(0)
4x1+5x2+x3= 30
.Row(1)
7x1+2x2+x4= 24
.. Row (2)
STEP( I)
From Row (0) select the Non-basic variable having Maximum negative
Value I.e x2
And then put
x1=x3=x4=0 in all Rows except Row(0)
STEP (II);
x2=6
from Row(1)
x2=12
from Row(2)
Choose the Row that gives minimum value of x2 i.e Row (1)
.Row(0)
(4/5)x1+ x2 +(1/50)x3=6
..Row(1)
7x1+2x2+x4=24
Row(2)
STEP (III); Eliminate the chosen variable from all rows except Row(1)
z-3x1-4x2=0
(16/5)x1+4x2+(4/5)x3=24
4 x Row(1)
Z+(1/5)x1+(4/5)x3= 24
Row(0)
7x1+ 2x2+ x
Row(2)
=24
_(9/50)x1+_2x2+_(2/5)x3 = 12
2 x Row(1)
(27/5) x1 - (2/5)x3 + x4 = 12
Hence
. Row (2)
z+(1/5)x1 + (4/5)x3= 24
.Row(0)
(4/5)x1 + x2 +(1/5) x 3= 6
..Row(1)
(27/5)x1-(2/5)x3+ x 4=12
Row(2)
STEP IV;
x2=6, x4=12
EXAMPLE NO (4)
MINIMIZE
30x1+23x2+29x3
Subject to
6x1+5x2+3x3 52
4x1+2x2+5x3 14
When
x1 & x2 & x3 0
SOLUTION (I);
30x1+23x2+29x3=x0
Row(0)
6x1+5x2+3x3+x4=52
..Row(1)
4x1+2x2+5x3+x5=14
Row(2)
..Row(0)
6x1+5x2+3x3+x4=52
Row(1)
4x1+2x2+5x3+x5=14
..Row(2)
STEP (I); From Row (0) select a Non-basic variable having maximum negative value
i.e x1 and then
x2=x3=x4=x5=0 in all equation except Row (0) to get
x1=52/6=8.66
x1=14/4=3.5
STEP(II);
Choose the Row that gives minimum value of x1 i.e Row (2)
.Row(0)
6x1+5x2+3x3+x4=52
.Row(1)
X1+(1/2)x+(5/4)x3+(1/4)x5=14/4
..Row(2)
STEP (III); Eliminate the chosen variable i.e x1 from all rows except Row(2)
X0-30x1-23x2-29x3=0
.Row(0)
Hence
put
.Row(0)
6x1+5x2+3x3+x4=52
Row(1)
6x1+_3x2+_(15/2)x3+_(3/2)x5=_21
. 6 x Row(2)
2x2-(9/2)x3+ x 4(3/2)x5=31
. Row(1)
X0- 8x2+(17/2)x3+(15/2)x5=105
.Row(0)
2x2-(9/2)x3+ x 4(3/2)x5=31
. Row(1)
X1+(1/2)x+(5/4)x3+(1/4)x5=14/4
..Row(2)
x4=31,
x1=14/4
from Row(1)
X2=(14/4) 2
from Row(2)
STEP (II);
Choose the Row that yields minimum value of x 2 i.e Row (2)
Now make the coefficient of x2 unity in the chosen Row (2) i.e
2x1+ x 2+ (5/2)x3+(1/2)x5=7
Now rewrite all equations replacing Row (2) by this new Row
X0- 8x2+ (17/2)x3 +(15/2)x5=105
..Row(0)
2x2-(9/2) x3 + x
Row(1)
2x1+ x
STEP (III);
-(3/20)x5=31
+ (5/2)x3+(1/2)x5=7
.Row(2)
Eliminate the chosen variable from all rows Except Row (2)
X0- 8x2+(17/2)x3+(15/2)x5=105
...Row(0)
Hence
16x1+8x2+20x3+4x5=56
. 8 x Row (2)
X0+16x1+ (57/2)x3+(23/2)x5=161
Row (0)
2x2-(9/2)x 3+ x4 -(3/2)x5=31
. Row (1)
X1+_2x2+_5x3+_x5=14
. 2 x Row (2)
4x1-(19/2)x3+ x 4-(5/2)x5=17
Row(1)
X0+16x1+ (57/2)x3+(23/2)x5=161
Row (0)
4x1-(19/2)x3+ x 4-(5/2)x5=17
Row(1)
2x1+ x
..Row(2)
STEP IV;
X0=161,
+ (5/2)x3+(1/2)x5=7
Put
x4=17,
x2=7
LAB REPORT # 4
OBJECTIVE:
LITRATURE REVIEW:
THE BIG M METHOD TO SOLVE LINEAR PROGRAMMING PROBLEMS
In Previous problems we have seen that all the constraints are () with
non-negitive right hand sides, and offer a convenient all-slack starting basic
feasible solution. Models containing (=) and/or () constraints do not.
The procedure for starting such kind of LPs is to use artificial variables that
play the role of slack at the first iteration, and then we dispose them of at a
later iteration.
The Big M Method
If an LP has any () or (=) constraints, a starting basic feasible solution may
not be readily apparent.
The Big M method is a version of the Simplex Algorithm that first finds a
basic feasible solution by adding "artificial" variables to the problem. The
objective function of the original LP must, of course, be modified to ensure
that the artificial variables are all equal to 0 at the conclusion of the simplex
algorithm.
Steps
1-
23456-
If all artificial variables are equal to zero in the optimal solution, we have
found the optimal solution to the original problem.
If any artificial variables are positive in the optimal solution, the original
problem is infeasible!!!
Lets look at some examples
EXAMPLE NO (1)
Maximize
Subject to
2x1-10x3
5x1-3x2+10x3=40
1x1+x2+40x3=10
Solution;
R(0)
5x1-3x2+10x3+y1=40
.. R(1)
1x1+x2+40x3+y2=10
R(2)
M=40
X0-2x1+10x3+40y1+40y2=0
R(0)
5x1-3x2+10x3+y1=40
R (1)
X1+x2+40x3+y2=10
. R(2)
and
R(0)
.. 40 x
.. R(0)
.. R(0)
_40x1+_40x2+_1600x3+_40y2=_400
.40 x R(2)
X0-242x1+80x2-1990x3=-2000
R(0)
R(0)
5x1-3x2+10x3+y1=40
R (1)
X1+x2+40x3+y2=10
. R(2)
y2=0
The solution is not optimal since objective function still contains ve co-efficient.
2nd solution:
Step I:
From R(0) select the non basic variable having maximum ve co-efficient i.e. x 3
& then put
x 1 =x2= y1 = y2in all rows except R(0) to get
X3 =4
from R(1)
------------R(0)
------------R(1)
------------R(2)
Step III:
Eliminate the chosen variable from all except R(2).
X0 -242x1 + 80 x2 -1990 x3 =-200
R(0)
------------
------------R(0)
------------R(1)
------------10R(2)
------------R(1)
------------R(1)
=159/4
------------R(1)
------------R(2)
Step IV:
put x1 =x2= y2 =0 in all rows get
x0 =-3005/2,
x3= 1/4.,
y1 =-53
the solution is not optimal since the objective function still contains ve term.
3rd Solution:
Step I:
From R(0) select the non basic variable having maximum ve co-efficient i.e. x 3
& then put
x 2 = y1 =x3 = 0in all rows except R(0) to get
X1 =159/19
from R(1)
------------R(0)
------------R(1)
------------R(2)
Step III:
Eliminate the chosen variablex1 from all except R(1).
X0 -769/4x1 + 519/4 x2 +1990/40 y2 =-3005/2
769/4x1 -9992/76 x2 - 2307/76 y1 =122271/76
R(1)769/4
------------R(0)
------------
------------R(2)
------------
=159/4
------------R(0)
------------R(1)
------------R(2)
x1= 159/19.,
x3 =31/760
The solution is not optimal since the objective function still contains ve coefficients.
SOLUTION (4)
Do your self
EXAMPLE NO (2);
Maximize
-3x1-2x2
Subject to
x1 + x2=10
x1 4
where x1 & x2 0
M=10
x0+3x1+2x2+10y1+y2=0
.R(0)
Hence
x0+3x1+2x2+10y1+y2=0
.R(0)
10x1+- 10x2+-10y1=-100
..100*R(1)
X0-7x1-8x2+10y2=-100
R(0)
X0-7x1-8x2+10y2=-100
R(0)
10x1-10x3+10y2=40
10*R(2)
X0-17x1+10x3-8x2=-140
R(0)
x0-17x1-8x2+10x3=-140
R(0)
X1+x2+y1=10
X1-x3+y2=4
1ST SOLUTION ;
.R(1)
.R(2)
. From R(1)
. From R(2)
STEP(2): Choose the Row that gives minimum value i.e R(2)
Now make coefficient of x1unity in this row, which already exists
X1-x3+y2=4
STEP(3): Eliminate the chosen variable x1 from all rows except R(2)
X0-17x1-8x2+10x3=-140
R(0)
17x1-17x2+17y3=68
17*R(20)
X0-8x2-7x3+17y2=-72
..R(0)
X1+x2+y1=10
.R(1)
X1-x3+y2=4
Hence
X2+x3+y1-y2=6
R(1)
x0-8x2-7x3+17y2=-72
.R(0)
X2+x3+y1-y2=6
R(1)
X1-x3+y2=4
STEP(4):
.R(2)
Put
.R(2)
X2=6
..from R(1)
STEP(3)
Hence
Eliminate the chosen variable x2 from all rows except R(1) i.e
X0-8x2-7x3+17y2=-72
.R(0)
8x2+8x3+8y1-8y2=48
8*R(1)
X0+x3+8y1+9y2=-24
...R(0)
X0+x3+8y1+9y2=-24
...R(0)
X2+x3+y1-y2=6
R(1)
X1-x3+y2=4
STEP(4)
Put
.R(2)
LAB REPORT # 5
OBJECTIVE:
LITRATURE REVIEW:
PREFACE
In previous lab reports the wide applicability of linear programming has
been greatly emphasized. We will continue broaden our horizons in this lab
report by discussing two particularly important (and related) types of linear
programming problems. One type, called the Transportation problem,
received this name because many of its applications involve determining
how to optimally transport goods. However, some of its important
applications (e.g., production scheduling, employment scheduling, personnel
assignment) actually have nothing to do with transportation.
The second type, called the Assignment problem, involves such
applications as assigning people to tasks. Although its applications appear to
be quite different from those for the transportation problem, we shall see
that the assignment problem can be viewed as a special type of
transportation problem.
In the next lab report we will introduce additional special types of
linear programming problems involving networks, including the Minimum
cost flow problem. There we shall see that both the transportation and
assignment problems actually are special cases of the minimum cost flow
problem.
Applications of the transportation and assignment problems tend to
require a very large number of constraints and variables, so a
straightforward computer application of the simplex method may require an
exorbitant computational effort. Fortunately, a key characteristic of these
problems is that most of the aij coefficients in the constraints are zeros, and
the relatively few nonzero coefficients appear in a distinctive pattern. As a
result, it has been possible to develop special streamlined algorithms that
achieve dramatic computational savings by exploiting this special structure
of the problem. Therefore, it is important to become sufficiently familiar with
these special types of problems that we can recognize them when they arise
and apply the proper computational procedure.
column is crossed out and the amounts of supply and demand are adjusted
accordingly.
If both a row and a column are satisfied simultaneously, only one is crossed
out, the same as in the northwest-corner method. Next, look for the
uncrossed-out cell with the smallest unit cost and repeat the process until
exactly one row or column is left uncrossed out.
3- Vogels Approximation Method (VAM)
VAM is an improved version of the least-cost method that generally, but not
always, produces better starting solutions.
Step 1: For each row (column), determine a penalty measure by subtracting
the smallest unit cost element in the row (column) from the next smallest
unit cost element in the same row (column).
Step 2: Identify the row or column with the largest penalty. Break ties
arbitrarily. Allocate as much as possible to the variable with the least unit
cost in the selected row or column. Adjust the supply and demand, and cross
out the satisfied row or column. If a row and a column are satisfied
simultaneously, only one of the two is crossed out, and the remaining row
(column) is assigned zero supply (demand).
Step 3:
(a) If exactly one row or column with zero supply or demand remains
uncrossed out, stop.
(b) If one row (column) with positive supply (demand) remains uncrossed
out, determine the basic variables in the row (column) by the least-cost
method. Stop.
(c) If all the uncrossed out rows and columns have (remaining) zero supply
and demand, determine the zero basic variables by the least-cost method.
Stop.
(d) Otherwise, go to step 1.
Example:
Destinations
Sources
supply
10
20
11
15
12
20
25
14
16
18
10
Demands
15
15
15
Demands=suppl
y
2
10
20
11
SUPPLY
15
20
25
18
10
1
5
3
DEMAND
1
0
12
14
15
1
5
16
1
015
15
Z=520
1
10
12
2
start
1
5
20
9
1
5
End
5
11
SUPPLY
15
20
25
3
5
DEMAND
14
16
18
10
1
0
15
15
15
Z=475
1
1
0
2
(b)
3
2
4
2
0
11
15
penalties
10-2=8
11-2=9
1
5
2
(a)
1
2
1
4
(c)
1
5
5
10-4=6
-
(d)
20
25
1
0
1
6
DEMAND
penalties
SUPPLY
(e)
18
10
9-7=2
9-7=2
14-4=10
16-14=2
15
7-2=5
7-2=5
15
16-9=7
16-9=7
15
18-11=7
20-18=2
Z=475
COMMENTS:
The linear programming model encompasses a wide variety of specific
types of problems. The general simplex method is a powerful algorithm that
can solve surprisingly large versions of any of these problems. However,
some of these problem types have such simple formulations that they can be
solved much more efficiently by streamlined algorithms that exploit their
special structure. These streamlined algorithms can cut down tremendously
on the computer time required for large problems, and they sometimes make
it computationally feasible to solve huge problems. The special-purpose
algorithms are included in some linear programming software packages like
TORA.
LAB REPORT # 6
OBJECTIVE:
LITRATURE REVIEW:
NETWORK MODELS
The network models include the traditional applications of finding the most
efficient way to link a number of locations directly or indirectly, finding the
shortest route between two cities, determining the maximum flow in a
pipeline network, determining the minimum-cost flow in a network that
satisfies supply and demand requirements at different locations, and
scheduling the activities of a project.
Networks arise in numerous settings and in a variety of guises.
Transportation, electrical, and communication networks pervade our daily
lives. Network representations also are widely used for problems in such
diverse areas as production, distribution, project planning, facilities location,
resource management, and financial planningto name just a few examples.
In fact, a network representation provides such a powerful visual and
conceptual aid for portraying the relationships between the components of
systems that it is used in virtually every field of scientific, social, and
economic endeavor.
One of the most exciting developments in operations research (OR) in recent
years has been the unusually rapid advance in both the methodology and
application of network optimization models. A number of algorithmic
breakthroughs have had a major impact, as have ideas from computer
The two techniques, CPM and PERT, which were developed independently,
differ in that CPM assumes deterministic activity durations and PERT
assumes probabilistic durations. This presentation will start with CPM and
then proceed with the details of PERT.
CPM Computations
The end result in CPM is the construction of the time schedule for the project
(see Figure above). To achieve this objective conveniently, we carry out
special computations that produce the following information:
1. Total duration needed to complete the project.
2. Classification of the activities of the project as critical and noncritical.
An activity is said to be critical if there is no "leeway" in determining its
start and finish times. A noncritical activity allows some scheduling slack, so
that the start time of the activity can be advanced or delayed within limits
without affecting the completion date of the entire project.
To carry out the necessary computations, we define an event as a point in time
at which activities are terminated and others are started. In terms of the
network, an event corresponds to a node. Define
j = Earliest occurrence time of event j
j = Latest occurrence time of event j
Dij = Duration of activity (i, j)
The definitions of the earliest and latest occurrences of event j are specified
relative to the start and completion dates of the entire project. The critical
path calculations involve two passes: The forward pass determines the
earliest occurrence times of the events, and the backward pass calculates
their latest occurrence times.
Example 1:
ACTIVITY
A
B
C
D
E
F
G
H
DURATION
7
3
6
3
3
2
3
2
DEPENDENCY
A
B
D,F
B
C
E,F
1
3
EXAMPLE NO. 2
Activity
A
B
C
D
E
F
G
Predecessor ES
LS
EF
LF
0
0
9
14
20
24
27
0
5
9
14
20
24
27
9
15
14
20
24
27
45
9
20
14
20
24
27
45
A
C
D
B&E
E&F
Slack
time
0
5
0
0
0
0
0
Critical
path
*
*
*
*
*
*
PERT :
27 27
4
5
24
4
5
24
27
2
7
G
,
F,3
18
E,4
2
0
0
2
0
20
24
24
B ,15
D,6
A,9
1
4
1
4
2
0
C,5
9
1
4
1
4
START
0
B,
15
2
4
2
4
9
G,
2
7
C,
D,
6
1
5
F, 3
A,
9
1
4
1
4
1
4
2 18
4
7 5
2
0
2
04
E,
1
4
4
5
2
0
2
0
2
4
2
4
2
4
2
7
2
7
2
0
Activity
Predecessor
Duration
(months)
A
9
B
14
C
22
D
C
14
E
A
28
F
B, D, E
15
G
F
10
H
F
16
I
G, H
13
J
G
20
K
I, J
27
Draw PERT & CPM network & complete the table for ES, LS, EF & LF
PERT
9
6
2
5
2
6
2
5
2
6
2
82
8
2
8
2
6
2
6
9
10
6
2
6
2
3
7
3
7
5
2
5
2
3
7
3
7
1
4
3
7
1
4
2
2
0
1
4
3
7
1
8
2
8
2
11
5
3
3
7
2
3
3
6
0 2
3
8
2 12
6
8
6
8
6
9
6
9
8
1
8
2
3
7
3
7
8
2
6
9
5
2
8
2
2
2
2
3
3
7
9 9
3
7
37
10
9
10
9
7 8 9 10 11 12
=9 + 28 + 0 + 15 + 10 + 20 + 0 + 27
= 109 months
CPM
Start
0
A, 9
C,2
2
2
2
2
3
B,1
0
9 E,23
8 7
3
7
D,1
4
F,1
5
5
2
5 G,1
6
2 02
6
2
2
3
3
7
6
2
8
2
3
6
3
7
8
2
J,20
K,2
7
6
8
6
9
2
3
1
4
3
7
5
2
5
3
6
8
6
9
3
7
5
2
5
2
H,1
6
I,13
6
2
2
2
8
1
8
2
82 82
10
9
10
9
1 2 3 6 7 8 9 11 12
EXAMPLE NO. 4
Transcribe the information from the networking shown below to a matrix and
calculate ES, LS, EF & LF and slack time & critical path.
9
6
12
2
11
10
9
10
3
5
4
3
2
Q,2
1
1
2
7
I,9
1
8
3
2
2
9
4
3
3
7
1
8
2
5
2
6
3
3
2
6
1
2
2
4
3
7
4
3
4
3
3
3
3
10
3
7
2
4
M,10
N,8
1
8
1
8
1
8
G,12
1
8
2
8
2
8
3
7
3
7
2
8
2
8
1 2
4 5
H,1
1
3
4
3
P,6
4
2
2
9
4
1
1
0 O,4
1
3
4
1
1
4
3
3
L,9
2
8
1
7
2
9
3
2
3
3
K,4
C,7
1
9
2
8
F,11
E,5
D,2
6
6
0
0
A, 6
B, 3
CRITICAL
13 14 = 43
1
2
1
7
8
1
2
3
PATH
Days
1
7
5
1
5
3
= A-G-J-L-P or 1 4 7 8
LAB REPORT # 7
OBJECTIVE:
Simulation
Simulation is a descriptive technique in which a model of a process is developed and then
experiments are conducted on the model to evaluate its behavior under various conditions.
Unlike many of the other models described in the text, simulation is not an optimizing technique.
It does not produce a solution per se. Instead, simulation enables decision makers to test their
solutions on a model that reasonably duplicates a real process; simulation models enable decision
makers to experiment with decision alternatives using a what if approach.
The use of simulation as a decision-making tool is fairly widespread, and you are undoubtedly
familiar with some of the ways it is used. For instance, space engineers simulate space flight in
laboratories to permit future astronauts to become accustomed to working in a weightless
environment. Similarly, airline pilots often undergo extensive training with simulated landings
and takeoffs before being allowed to try the real thing. Many video games are simulations, and
universities use management games as a means of simulating business environments. Tire
designers evaluate alternative tread designs using machines that simulate conditions that produce
tire wear and handling problems.
INTRODUCTION
Simulation has applications across a broad spectrum of operations management problems.
In some instances, the simulations are quite modest, while others are rather complex. Their
usefulness in all cases depends on the degree to which decision makers are able to answer their
what if questions.
A list of operations management topics would reveal that most have simulation applications. For
instance, simulation is often helpful in product design and testing, facilities layout, line
balancing, job design, aggregate planning, testing alternative inventory policies, scheduling, and
project management. Actually, the list is quite long. The books and articles in the bibliography
indicate the richness and breadth of those applications and offer the interested reader an
opportunity to explore this fascinating and useful subject in more detail.
Generally, analysts use the simulation approach either because optimization techniques are
unavailable or because the assumptions required by an optimizing technique are not reasonably
satisfied in a given situation. Waiting-line problems are a good example of the latter reason.
Although waiting-line problems are pervasive, the rather restrictive assumptions of arrival and
service distributions in many cases are simply not met. Very often, analysts will then turn to
simulation as a reasonable alternative for obtaining descriptive information about the system in
question.
The next step is model development. Typically, this involves deciding on the structure of the
model and using a computer to carry out the simulations. (For instructional purposes, the
examples and problems in this chapter are primarily manual, but in most real-life applications
computers are used. This stems from the need for large numbers of runs, the complexity of
simulations, and the need for record-keeping of results.) Data gathering is a significant part of
model development. The amount and type of data needed are a direct function of the scope and
level of detail of the simulation. The data are needed for both model development and evaluation.
Naturally, the model must be designed to enable evaluation of key decision alternatives. The
validation phase is closely related to model development. Its main purpose is to determine if the
model adequately depicts real system performance. An analyst usually accomplishes this by
comparing the results of simulation runs with known performance of the system under the same
circumstances. If such a comparison cannot be made because, for example, real-life data are
difficult or impossible to obtain, an alternative is to employ a test of reasonableness, in which the
judgments and opinions of individuals familiar with the system or similar systems are relied on
for confirmation that the results are plausible and acceptable. Still another aspect of validation is
careful consideration of the assumptions of the model and the values of parameters used in
testing the model. Again, the judgments and opinions of those familiar with the real-life system
and those who must use the results are essential. Finally, note that model development and model
validation go hand in hand: Model deficiencies uncovered during validation prompt model
revisions, which lead to the need for further validation efforts and perhaps further revisions.
The fourth step in simulation is designing experiments. Experiments are the essence of a
simulation; they help answer the what if questions posed in simulation studies. By going through
the process, the manager or analyst learns about system behavior.
The fifth step is to run the simulation model. If a simulation model is deterministic
and all parameters are known and constant, only a single run will be needed for
each what if question. But if the model is probabilistic, with parameters subject to
random variability, multiple runs will be needed to obtain a clear picture of he
results. In this text, probabilistic simulations are the focal point of the discussion,
and the comments are limited to them. Probabilistic simulation is essentially a form
of random sampling, with each run representing one observation. Consequently,
statistical theory can be used to determine appropriate sample sizes. In effect, the
larger the degree of variability inherent in simulation results, the greater the
number of simulation runs needed to achieve a reasonable level of confidence in
the results as true indicators of model behavior.
The last step in the simulation process is to analyze and interpret the results. Interpretation of the
results depends to a large extent on the degree to which the simulation model approximates
reality; the closer the approximation, the less need to adjust the results. Moreover, the closer
the approximation of the model to reality, the less the risk inherent in applying the results.
2. Work out an assignment so that intervals of random numbers will correspond to the
probability distribution.
3. Obtain the random numbers needed for the study.
4. Interpret the results.
The random numbers used in Monte Carlo simulation can come from any source that exhibits the
necessary randomness. Typically, they come from one of two sources: Large studies depend on
computer-generated random numbers, and small studies commonly make use of numbers from a
table of random digits like the one shown in Table 1. The digits are listed in pairs for
convenience, but they can be used singly, in pairs, or in whatever grouping a given problem calls
for.
Two important features of the sets of random numbers are essential to simulation.
One is that the numbers are uniformly distributed. This means that for any size grouping
Table 1
of digits (e.g., two-digit numbers), every possible outcome (e.g., 34, 89, 00) has the same
probability of appearing. The second feature is that there are no discernible patterns in sequences
of numbers to enable one to predict numbers further in the sequence (thus the name random
digits). This feature holds for any sequence of numbers; the numbers can be read across rows and
up or down columns.
When using the table, it is important to avoid always starting in the same spot; that would result
in the same sequence of numbers each time. Various methods exist for choosing a random
starting point. One can use the serial number of a dollar bill to select the row, column, and
direction of number selection. Or use rolls of a die. For our purposes, the starting point will be
specified in each manual example or problem so that every one obtains the same results.
The process of simulation will become clearer as we work through some simple problems.
Example
The manager of a machine shop is concerned about machine breakdowns. He has made a
decision to simulate breakdowns for a 10-day period. Historical data on breakdowns over the last
100 days are given in the following table:
Simulate breakdowns for a 10-day period. Read two-digit random numbers from Table 19S-1,
starting at the top of column 1 and reading down.
a. Develop cumulative frequencies for breakdowns:
(1) Convert frequencies into relative frequencies by dividing each frequency by the sum of
the frequencies. Thus, 10 becomes 10/100 = .10, 30 becomes 30/100 = .30, and so on.
(2) Develop cumulative frequencies by successive summing. The results are shown; in the
following table:
Assign random-number intervals to correspond with the cumulative frequencies for breakdowns.
(Note: Use two-digit numbers because the frequencies are given to two decimal places.) You
want a 10 percent probability of obtaining the event 0 breakdowns in our simulation.
Therefore, you must designate 10 percent of the possible random numbers as corresponding to
that event. There are 100 two-digit numbers, so we can assign the 10 numbers 01 to 10 to that
event. Similarly, assign the numbers 11 to 40 to one breakdown, 41 to 65 to two
breakdowns; 66 to 85 to three breakdowns, 86 to 95 to 4 breakdowns and 96 to 00 to five
breakdowns.
Obtain the random numbers from Table 1, column 1, as specified in the problem:
18 25 73 12 54 96 23 31 45 01 d. Convert the random numbers into numbers of breakdowns:
18 falls in the interval 11 to 40 and corresponds, therefore, to one breakdown on day 1.
25 falls in the interval 11 to 40, which corresponds to one breakdown on day 2.
73 corresponds to three breakdowns on day 3.
12 corresponds to one breakdown on day 4.
54 corresponds to two breakdowns on day 5.
96 corresponds to five breakdowns on day 6.
23 corresponds to one breakdown on day 7.
31 corresponds to one breakdown on day 8.
45 corresponds to two breakdowns on day 9.
01 corresponds to no breakdowns on day 10.
0(.10) +
The simulation results are shown in the following screen. Use key F4 to do a simulation or
another simulation.
Example-2
The manager of a small truck dealership wants to acquire some insight into how a proposed
policy for reordering trucks might affect order frequency. Under the new policy, two trucks are to
be ordered whenever the number of trucks on hand is five or fewer. Due to the nearness of the
dealer to the home office, orders can be filled over night. According to the dealers records, the
probability distribution for daily demand is:
b. Use two-digit random numbers from Table 1, column 11, reading down. Assume a beginning
inventory of seven trucks.
(2) Obtain random numbers, convert to demand, update inventory accordingly, and reorder when
necessary:
That is:
Simulated value = Mean + Random number X Standard deviation
In effect, the random number equates to a normal z value, which indicates how far a particular
value is above or below the distribution mean.
Example-3
The number of lost-time accidents at a large plant has been determined from historical records to
be two per day. Moreover, it has been determined that this accident rate can be well
approximated by a Poisson distribution that has a mean of 2.0. Simulate five days of accident
experience for the plant. Read random numbers from columns 1 and 2 of Table 1.
First obtain the cumulative distribution from Appendix Table C for a mean of 2.0, and make the
range assignments:
Next obtain three-digit numbers from Table 1. Reading from column 1and 2as instructed, you
find 182, 251, 735, 124, and 549.
Finally, convert the random numbers into number of lost-time accidents using the established set
of ranges. Since 182 falls in the second range, it corresponds to one accident on day 1.The second
random number, 251, falls in the same range, indicating one accident on day 2. The number 735 falls
between 678 and.857, which corresponds to three accidents on day 3; 124 corresponds to 0
accidents on day 4; and 549 corresponds to two accidents on day 5.
Example-4
It has been determined that the time required to perform a certain task can be described by a
normal distribution that has a mean of 30 minutes and a standard deviation of 4 minutes.
Simulate times for three jobs using the first three values in column1 of Table 2.
The first three values are: 1.46, -1.05, and 0.15. The simulated values are:
For 1.46,30 + 1.46(4) = 35.84 minutes.
For - 1.05,30 - 1.05(4) = 25.80 minutes.
For 0.15, 30 + 0.15 (4) = 30.60 minutes.
It is important to recognize that Example 4 involves a continuous variable, whereas the previous
examples have involved discrete variables. (Remember that discrete variables typically take on
only integer values, whereas continuous variables can take on integer and non integer values.)
Whenever possible, a model of a continuous variable should be able to simulate non integer
values as well as integer values. Another continuous type of distribution we can consider is the
uniform distribution, in which values may occur anywhere over a continuous range between two
extremes, a and b, as illustrated in Figure 1.
Simulated value = a + (b - a) (Random number as a percentage)
Converting the random number to a percentage simply involves placing a decimal
point to the left of the number. For example, 77 becomes 77
A third continuous distribution is the exponential distribution. We will concern
ourselves with simulating values of negative exponential distributions, as portrayed
in Figure 2.
Example-5
Job times vary uniformly between 10 and 15 minutes. Use Table 1 to simulate job times for four
jobs. Read numbers from column 9, going down.
a = 10 minutes, b = 15 minutes, b - a = 5 minutes Sc
a. Obtain the random numbers: 15, 88, 57, and 28.
b. Convert to simulated values:
With a negative exponential distribution, the probability is fairly high that the random variable
will assume a value close to zero. Moreover, the probability decreases as the specified value of
the random variable increases. The probability that a random variable will take on a value greater
than some specified value T, given that the variable can be described by an exponential
distribution with a mean equal to
P t T e t
To simulate exponential values, we obtain a random number, place a decimal point to ; the left of
it, set this equal to the probability P(T), and solve Formula (1) for t. The result is a simulated
value from an exponential distribution with a mean of .
We can obtain an expression for t by taking the natural logarithm of both sides of the equation.
Thus, with P(T) = .RN (for random number), we have
ln . RN ln e t
ln . RN ln e t t
(2)
Then
t
1
ln . RN
The mean,
times are:
, is 5 hours. The random numbers are 84 and 05. Using Formula (2), the simulated
Note that the smaller the value of the random number, the larger the simulated
value of t.
COMPUTER SIMULATION
Although the emphasis in this supplement has been on manual simulation in order to convey the
main concepts, most real-life simulations involve the use of a computer. Computers offer
relatively quick and easy means of obtaining results. Many real-life applications involve fairly
complex simulation models that have substantial recordkeeping requirements for which
computers offer a practical solution.
Over the years, programmers have developed a number of simulation languages that make the
task of writing simulation programs much simpler. Some of the general-purpose languages are
SIMSCRIPT 11.5, GPSS/H, GPSS/PC, and RESQ. In addition, a number of other simulation
packages are available, some of which have very narrow focuses that relate to queuing or
network problems. Most of the simulation packages have certain features in common. For
example, they generally provide for random number generation from a variety of statistical
distributions, as well as collection and tabulation of simulation results and time keeping.
It should be noted that some managers prefer to write their own simulations or have a member of
their staff do so, using spreadsheet software such as MSExcel rather than a simulation language.
In cases where simulation is used infrequently, it can be more practical to use that approach
rather than go through the time and effort required to use a specialty language. For simple
problems, the slight inefficiency related to the use of a standard language is not usually an
important consideration.
b. Simulations are based on models, and models are only approximations of reality.
2.
For large-scale simulation, it can require considerable effort to develop a suitable model as
well as considerable computer time to obtain simulations. Because simulation produces an
approximate answer rather than an exact solution, and because of the cost of running a
simulation study, simulation is not usually the first choice of a decision maker. Instead,
depending on the complexity of the situation, intuitive or analytical methods should first be
investigated. In simple cases, an intuitive solution very often is acceptable. In more complex
cases, an analytical solution is preferable, assuming an appropriate technique is available. If
not, it may be possible to develop an analytical model that could be used to generate a
solution. If these measures do not suffice, simulation becomes the next logical possibility.
Of course, if that is not economically justifiable, the decision maker will have to rely on
judgment and experience; in effect, after reevaluating all of the alternatives, the decision
maker may revert to an intuitive solution, even though initially that approach did not appear
acceptable. Figure 19S-3 on page 857 outlines this process.
LAB REPORT # 8
OBJECTIVE:
Introduction to TORA
LITRATURE REVIEW:
INTRODUCTION
TORA is a prominent software package for linear programming and its
extensions. It is simple and has an easy to use interface for first time users.
Almost all the work that has been done manually in the previous lab reports
can be done on TORA.
TORA is a powerful software developed by Hamady A. Taha, the author of the
Operations Research book. Needless to say that there are plenty of other
software in the market as well. Some of the major are CPLEX, LINDO and the
most powerful of all Excel. Spreadsheet based solvers are becoming
increasingly popular for linear programming problems and its extensions.
Unfortunately due to lack of time, this lab report concentrates only on TORA.
This is the main TORA screen, where we choose the type of problem to be solved. Click
Linear Programming
Now Click on GO TO INPUT SCREEN to start a problem from scratch, Click Select
Existing File if you have already saved the data and want to reopen it.
Now enter the data as seen in the image above & then click on SOLVE menu, a
screen pops up, saying Do you wish to save data, Choose the desired option