Sunteți pe pagina 1din 73

LAB REPORT # 1

OBJECTIVE:

Introduction to Operation Research

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.

INTRODUCTION TO OPERATIONS RESEARCH

Operations research (OR): is an interdisciplinary branch of applied mathematics that


uses methods such as mathematical modeling, statistics, and algorithms to arrive at
optimal or near optimal solutions to complex problems. It is typically concerned with
determining the maxima (of profit, assembly line performance, crop yield,
bandwidth, etc) or minima (of loss, risk, etc.) of some objective function. Operations
research helps management achieve its goals using scientific methods.

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.

INTRODUCTION TO LINEAR PROGRAMMING


The development of linear programming has been ranked among the most important
scientific advances of the mid-20th century, and we must agree with this assessment.
Its impact since just 1950 has been extraordinary. Today it is a standard tool that has
saved many thousands or millions of dollars for most companies or businesses of even
moderate size in the various industrialized countries of the world; and its use in other
sectors of society has been spreading rapidly. The most common type of application
involves the general problem of allocating limited resources among competing
activities in a best possible (i.e., optimal) way. More precisely, this problem involves
selecting the level of certain activities that compete for scarce resources that are
necessary to perform those activities. The choice of activity levels then dictates how
much of each resource will be consumed by each activity. The variety of situations to
which this description applies is diverse, indeed, ranging from the allocation of
production facilities to products to the allocation of national resources to domestic
needs, from portfolio selection to the selection of shipping patterns, from agricultural
planning to the design of radiation therapy, and so on. However, the one common
ingredient in each of these situations is the necessity for allocating resources to
activities by choosing the levels of those activities.
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.

BASIC CONCEPT OF LINEAR PROGRAMMING

Objective Function: The Objective Function is a linear function of variables which


is to be optimized i.e., maximized or minimized. e.g., profit function, cost function
etc. The objective function may be expressed as a linear expression.
Constraints: A linear equation represents a straight line. Limited time, labor etc.
may be expressed as linear in equations or equations and are called constraints.
Optimization: A decision which is considered the best one, taking into
consideration all the circumstances is called an optimal decision. The process of
getting the best possible outcome is called optimization.
Solution of a LPP: A set of values of the variables x 1, x2,.xn which satisfy all the
constraints is called the solution of the LPP..
Feasible Solution: A set of values of the variables x1, x2, x3,.,xn which satisfy all
the constraints and also the non-negativity conditions is called the feasible solution of
the LPP.
Optimal Solution: The feasible solution, which optimizes (i.e., maximizes or
minimizes as the case may be) the objective function is called the optimal solution.
Important terms Convex Region and Non-convex Sets.

MATHEMATICAL FORMULATION OF LINEAR PROGRAMMING PROBLEMS

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.

LINEAR PROGRAMMING PROBLEMS (LLP)


EXAMPLE 1:
A company produces two types of hats. Hat A & Hat B, Hat A requires twice the labor
as Hat B. If the company produces only Hat B, then it can produce a total of 500 hats
a day. The market limit for the daily sales of hat A and Hat B is 150 & 250 respectively.
Profit on Hat A = 8 rupees & Hat B = 5 rupees.
SOLUTION:
1- Assume that Xa = Hat A

Xb = Hat B
2- Objective Function:
Maximize profit: Z= 8 Xa + 5Xb
3- Constraints:
Xa 150
Xb 250

which implies that Xa + Xb 400 --- 1

& that

2Xa + Xb 500 --- 2

4- Applying Non-Negativity Restrictions


Xa, Xb 0

5- Solving 1 & 2 Simultaneously to get


Xa = 100
Xb = 300

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

4- Applying Non-Negativity Restrictions


Xa, Xb 0

5- Solving simultaneously to get


Xa =20, Xb = 20

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

Profit Per ton

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

4- Applying Non-Negativity Restrictions


Xe, Xi 0

5- Solving equations 1 & 2 simultaneously to get

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:

Introduction to Linear Programming Problems


(LPP
)

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).

Linear Programming Problems (LPP)


The standard form of the linear programming problem is used to develop the
procedure for solving a general programming problem.
A general LPP is of the form
Max (or min) Z = c1x1 + c2x2 + +cnxn
x1, x2, ....xn are called decision variable.

MATHEMATICAL FORMULATION OF LINEAR PROGRAMMING PROBLEMS

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/inequations 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.

GRAPHICAL METHOD SOLUTION OF LINEAR PROGRAMMING PROBLEMS


The graphical method is applicable to solve the LPP involving two decision
variables x1, and x2, we usually take these decision variables as x, y instead of x 1, x2.
To solve an LPP, the graphical method includes two major steps.
a) The determination of the solution space that defines the feasible
solution (Note that the set of values of the variable x 1, x2, x3,....xn which
satisfy all the constraints and also the non-negative conditions is called the
feasible solution of the LPP).
b) The determination of the optimal solution from the feasible region.
There are two techniques to find the optimal solution of an LPP. Corner
Point Method and ISO- PROFIT (OR ISO-COST).

Some Exceptional Cases


We may come across LPP which may have no feasible (infeasible)
solution or may have unbounded solution. If the intersection of the
constraints is empty and the problem has no feasible solution. Therefore the
given L.P.P has no solution.

LINEAR PROGRAMMING PROBLEMS SOLVED USING GRAPHICAL


METHODS

COMMENTS, OBSERVATIONS & REMARKS:


Operations research proved to be quite difficult at the beginning, after
the first lab session a much clearer picture regarding operations
Research and the methods used in Operations Research was
presented. Lab session 2 proved to be extremely helpful as this lab
reinforced all the ideas presented in lab session 1.
The Graphical solution proved to be challenging at first but then after
solving problems it became very clear that Graphical solution of a
Linear Programming Problem is an efficient way to find the optimum
solution to a problem.

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:

Introduction to Simplex Method

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.

EXAMPLES ON HOW TO SOLVE LP USING SIMPLEX METHOD


EXAMPLE # 1
A company purchases potatoes from two sources for the production of three types
of products, the information is given in the table below:
Solve the problem for maximum profit
Product

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

The LP model of the problem is objective function

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

from row (0)

0.2P1+0.3P2+1P3= 1.8

from row (1)

0.2P1+0.1P2+1P4= 1.2

from row (2)

0.3P1+0.3P2+1P5 =2.4

from row (3)

Put non basic variables P1&P2=o in all equations, to get


P0=0
P1=1.8,

P2=1.2,

P3=2.4

The profit is zero, the solution is not optimal.

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

.from row (1)

1/10P2=6/5

P2=12

from row (2)

3/10P2=12/5

P2=8

from row (3)

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*1/5)P1+1P2 + (10/3) P3= (10/3*9/5)


(1)

(2/3)P1+1P2+ (10/3) P3=6


(1)

10/3* Row
Row

Rewrite all equations replacing row (1) by this new row


P0-5P1-6P2=0

Row (0)

(2/3)P1+P2+ (10/3) P3=6

. Row (1)

(1/5)P+ (1/5) P+P=6/5

Row (2)

(3/10)P+ (3/) 10P+P=12/5 . Row (3)

STEP (IV)

Eliminate choose variable i.e P from all Rows except Row(1)


P0-5P1-6P2=0

.. 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

(4/3)P1 - (10/3) P3 + 10P4=6


And

.. 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)

(2/3)P1+ (10/3) P3+P2=6

.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)

(2/3)P1+ (10/3) P3+P2=6


(4/3)P1-(10/3)P3+10P4=6

.Row (1)
Row (2)

1P1-10P3+10P5=6
STEP (II)
then put

..Row (3)

select P as it has max ive variable in objective function and


P2=P3=P4=P5=0 in all rows except Row (0)
(2/3)P1=6

P 1 =9

from row (1)

(4/3)P1=6

P 1 =4.5

from Row (2)

P1=6

P 1 =6

from Row (3)

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

.... (4/3)*Row (2)

P1-(5/2) P3+ (15/2) P4 = 9/2

....Row (2)

Rewrite all the equation replacing Row (2) by this new Row.
P0-P1+20P3=36

Row (0)

P1-(5/2) P3+ (15/2) P4= 9/2

.Row (2);

(2/3)P1+P2+ (10/3) P3= 6

Row (1)

P1-10P3+10P5=6
STEP (IV)

....Row (3)

Eliminate chosen variable i.e P1 from al rows except Row (2)


P0-P1+20P3=36

.row (0)

P1-(5/2) P3+ (15/2) P4=9/2

....Row (2)

P0+ (35/2) P3+ (15/2) P4=81/2

..Row (0)

(3/2*2/3)P1+ (3/2) P2+ (3/2*10/3) P3= 3/2*6


3/2
P1-+ (5/2) P3 (15/2) P4=9/2
(3/2)P+ (15/2) P-(15/2) P=9/2

Row (2)
..Row (!)

P1-10P3+10P5=6

..Row (3)

P1-(5/2) P3+ (15/2) P4 =9/2

..Row (2)

-(15/2) P3-(15/2) P4+10 P5=3/2

..Row (3)now

P0+ (35/2) P3+ (15/2) P4=81/2

Row (0)

(3/2)P2+ (15/2) P3-(15/2) P4=9/2

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)

P3=P4=0 in all equations we get


P=40.5; P=3; P=4.5; P=0.15

Since objective function contains no ive coefficient so it is the optimal solution


The company will get maximum profit of 40.5 if it purchases 4.54.5 ton from source
(I) &3 ton from source (II)
NOTE:- Note that solutions continue in the same manner until the objective function
contains no ive term

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

One item of product A


B

One item of product

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

Solution:objective function maximize 4x1+5x2+9x3+11x4


x1-x2+x3+x4 15
7x1+5x2+3x3+2x4 120

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)

x1=x2=x3=x4=0 in all equations to get


x0=0, x5=15, x6=120, x7=100
No profit, so the solution is not optimal

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

x1=x2=x3=x4=x5=x6=x7=0 in all rows except row (0)

x4=15

from Row (1)

2x4=120

x 4=60

from row (2)

15x4=100

x4=20/3

from row (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)
]

(4/5)x1+(2/3)x2+(1/3)x3+ x5 -(1/15)x7= 25/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

(33/5)x1+(13/3)x2+(5/3)x3+ x6-(2/15)x7= 320/3


.Row(2)
(1/5)x1+(1/3)x2+(2/3)x3+x4+(1/15)x7=20/3
Put
x1=x2=x3=x7=0 in all Rows to get
x6=320/3 , x4=20/3

..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)

(4/5)x1+(2/3)x2+(1/3)x3-(1/5)x7+ x5= 25/3

.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

.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

(5/4) [ (4/5)x1+(2/3)x2+(1/3)x3-(1/5)x7+(1)x5=(5/4) (25/3)


(5/4) x Row(1)
x1+(5/6)x2+(5/12)x3+(5/4)x5-(1/12)x7= 125/12
..Row(1)
Rewrite all equations replacing Row(1) by this new Row(1)
x0-(9/5)x1-(4/3)x2-(5/3)x3+(11/15)x7= 220/3

.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)

x2=x3=x5=x7=0 in all Rows to get


x0= 1105/12 , x1= 125/12 , x6= 455/12 , x4= 55/12

Since the objective function still contains negative coefficient so the solution is not
optimal.
SOLUTI0N IV
Repeat the same process
ANSWER

x0=690/7, x1=50/7 , x3=35/7 , x6=325/7

this is the optimal solution.

EXAMPLE NO 3:MINIMIZE

z= 3x1+4x2

subject to

4x1+5x2 30 ; 7x1+2x2 24

WHERE

x1 & x2 0

Solution I; The LP model of pb is the objective function


3x1-4x2=z

Put

..Row(0)

4x1+5x2+x3= 30

..Row (1)

7x1+2x2+x4= 24

..Row(2)

x1=x2=0 in all equations


z=0
x3= 30

&

x4= 24

The solution is not optimal, as no profit


Solution ii;
z-3x1-4x2=0

..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)

Now make the coefficient of x2 unity in Row (1) i.e


(4/5)x1+ x2 +(1/5)x3=6
Now rewrite all the equations , replacing Row(1) by this new Row
z-3x1-4x2=0

.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;

put x1=x3=0 in all Rows to get


z=24,

x2=6, x4=12

The solution is optimal, since objective function contains no negative variable

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)

Put Non-basic variable


x0=0, x4=52,

x1=x2=x3=0 in all Rows to get


x5=14

The solution is not optimal, as no profit


Solution (II);
X0-30x1-23x2-29x3=0

..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);

from Row (1)


from Ro w(2)

Choose the Row that gives minimum value of x1 i.e Row (2)

Now make the coefficient of x1 unity in Row (2) i.e


x1+(1/2)x2+(5/4)x3+(1/4)x5=14/4
Rewrite all the equations replacing Row (2) by this new Row
x0-30x1-23x2-29x3=0

.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)

30x1+15x2+(75/2)x3+(15/2)x5=105 .30 x Row(2)


X0- 8x2+(17/2)x3+(15/2)x5=105

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)

x2=x3=x5=0 in all Rows to get


x0=105,

x4=31,

x1=14/4

the solution is not optimal as the objective function contains negative


coefficient
SOLUTION (3);
STEP (I);
i.e x2
Put

Select the variable having negative coefficient from objective function

x1=x3=x4=x5=0 in all Rows except Row(0) to get


X2=31/2=15.5

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

x1=x3=x5=0; in all Rows to get

x4=17,

x2=7

The solution is optimal, as the objective function contains no negative coefficient.

LAB REPORT # 4

OBJECTIVE:

Introduction to the Big M Method

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-

Modify the constraints so that the RHS of each constraint is


nonnegative (This requires that each constraint with a negative RHS
be multiplied by -1. Remember that if you multiply an inequality by
any negative number, the direction of the inequality is reversed!).
After modification, identify each constraint as a , , or = constraint.
Convert each inequality constraint to standard form (If constraint i is a
constraint, we add a slack variable s, and if constraint i is a
constraint, we subtract the slack variable.
Add an artificial variable R1 to the constraints identified as or =
constraints at the end of Step 1. Also add the sign restriction R1 0.
If the LP is a maximization problem, add (for each artificial variable)
MR1 to the objective function; where M denote a very large positive
number.
If the LP is a minimization problem, add (for each artificial variable)
MR1 to the objective function.
Solve the transformed problem by the simplex method.

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;

The standard LP form is already exists applying M-method


X0-2x1+10x3+My1+My2=0

R(0)

5x1-3x2+10x3+y1=40

.. R(1)

1x1+x2+40x3+y2=10

R(2)

Now see which coefficient or constant is maximum in R(1) i.e 40


So

M=40
X0-2x1+10x3+40y1+40y2=0

R(0)

5x1-3x2+10x3+y1=40

R (1)

X1+x2+40x3+y2=10

. R(2)

Now eliminate y1& y2 from R(0)


X0-2x1+10x3+40y1+40y2=0
_200x1-+120x2+_400x3+_40y1=_1600
R(1)

and

R(0)
.. 40 x

X0- 202x1+120x2-390x3+40y2= -1600

.. R(0)

X0- 202x1+120x2-390x3+40y2= -1600

.. R(0)

_40x1+_40x2+_1600x3+_40y2=_400

.40 x R(2)

X0-242x1+80x2-1990x3=-2000

R(0)

Now rewrite all equations


X0-242x1+80x2-1990x3=-2000

R(0)

5x1-3x2+10x3+y1=40

R (1)

X1+x2+40x3+y2=10

. R(2)

Next same as SIMPLEX METHOD .


1st solution:
X0 =-200, y1= 40

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)

X3 = 1/4 from R(2)


Step II:
Select the row that gives minimum values of x 3 i.e. R(2)
Now make the co-efficient of x1 as unity in this row i.e.
1/4 x1 + 1/40 x2 + x3 +1/40 y2 =
Rewrite all equations replacing row(2) by this row
X0 -242x1 + 80 x2 -1990 x3 =-200

------------R(0)

5x1 - 3 x2 +10 x3 + y1 =40

------------R(1)

1/40x1 + 1/40 x2 + x3 + 1/40y2 =1/4

------------R(2)

Step III:
Eliminate the chosen variable from all except R(2).
X0 -242x1 + 80 x2 -1990 x3 =-200
R(0)

------------

1190/40x1 + 1990/40 x2 +1990 x3 +1990/40 y1 =1990/4


------------R(1)1990
-769/4x1 + 519/4 x2 +1990/40 y1 =-3005/2

-x1 -3x2 +10 x3 +y1 =40

------------R(0)

------------R(1)

x1 +1/4x2 +10 x3 +1/4y2 =1/4

------------10R(2)

x1 -13/4x2 -3/4y1 =159/4

------------R(1)

-19/41 -13x2 +y1 -1/4y2 =159/4

------------R(1)

X0 -769/4x1 + 519/4 x2 +990 /40y2 =-3005/2 ------------R(0)


19/41 -13x2 -3/4y1

=159/4

------------R(1)

1/40x1 +1/40x2 + x3 +1/40y2 =1/4

------------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)

X1 = 40/4 =10 from R(2)


Step II:
Select the row that gives minimum values of x 1 i.e. R(1)
Now make the co-efficient of x1 as unity in this R(1) i.e.
x1 - 13/19 x2 9/19 y1 = 159/19
Rewrite all equations replacing row(1) by this new row
X0 -769/4x1 + 519/4 x2 -1990/40 y2 =-3005/2

------------R(0)

x1 -1 3/19 x2 -3/19 y1 =159/19

------------R(1)

1/40x1 + 1/40 x2 + x3 + 1/40y2 =1/4

------------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)
------------

X0 - 131/76 x2 -2307/76 y1 +1990/40 y2 =8081/76 ------------R(0)

1/40x1 +1/40x2 + x3 +1/40y1 =1/4

------------R(2)

1/40x1 -13/760x2 -3/760y1 =1549/760


R(1)1/40

------------

4/95x2 +x3 +3/760y1++1/40y2 =31/760 ------------R(2)


Hence
X0 - 131/76 x2 -2307/76 y1 +1990/40 y2 =8081/76
(19/4)x1 -13x2 -3/4y1

=159/4

------------R(0)
------------R(1)

(1/40) x1 +1/40x2 + x3 +1/40y2 =1/4

------------R(2)

(4/95) x2 +x3 +(3/760)y1++(1/40)y2 =31/760


------------R(2)
Step IV:
put x2 =y1= y2 =0 in all rows to get
x0 =-8081/76,

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

SOLUTION; The standard LP from is


-3x1-2x2=x0
x0+3x1+2x2=0
x1+x2= 10
x1 x3=4
Now by M-method
x0+3x1+2x2+My1+My2=0
x1+x2+y1=10
x1-x3+y2=4
Now see which coefficient or constant is maximum in R(1) i.e 10
So

M=10
x0+3x1+2x2+10y1+y2=0

.R(0)

Now eliminate y1& y2 from 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)

Put x1=x2=x3=0; in all rows to get

X0=-140; y1=10 & y2=4


Since the profit is ive; Solution is not optimal (-ive profit shows loss)
2ND SOLUTION;
Step(1) From R(0) select the Non basic variable having max, -ive coefficient i.e
x1 and then put
x2=x3=y1=y2=0; in all rows except R(0) to get
x1=10
x1=4

. 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=x3=y2=0; in all rows to get

X0=-72, y1=6, x1=4


the solution is not optimal, since the objective function still contains ive term
SOLUTION(3):
Step(1)
From R(0) select the non basic variable having maximum ive
coeeficient i.e x2 and then put
X1=x3=y1=y2=0; in all rows except R(0) to get

X2=6

..from R(1)

X2= does not exist in R(2)


STEP(2)

The coeeficient of x2 in R(1) is already unity


X2+x3+y1-y2=6

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)

x3=y1=y2=0; in all rows tp get

X0=-24, x2=6, x1=4


The solution is optimal, as the objective function contains no ive term
Verification

Put determined values in equation R(0)


X0+3x1+2x2+10y1+10y2 = 0
-24+3(4)+2(6)+10(0)+10(0) = 0
-24+24 = 0
0=0
Hence verified

LAB REPORT # 5
OBJECTIVE:

Introduction to the Transportation problems

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.

DEFINATION OF TRANSPORTATION MODEL


The general transportation problem is concerned (literally or figuratively)
with distributing any commodity from any group of supply centers, called
sources, to any group of receiving centers, called destinations, in such a
way as to minimize the total distribution cost.

THE TRANSPORTATION ALGORITHM MODEL


The model for a transportation problem makes the following assumption
about these supplies and demands.
The requirements assumption: Each source has a fixed supply of
units, where this entire supply must be distributed to the destinations.
(We let si denote the number of units being supplied by source i, for i =
1, 2 ... m.) Similarly, each destination has a fixed demand for units,
where this entire demand must be received from the sources. (We let dj
denote the number of units being received by destination j, for j= 1,
2
...
n.)
This assumption that there is no leeway in the amounts to be sent or
received means that there needs to be a balance between the total
supply from all sources and the total demand at all destinations.
The feasible solutions property: A transportation problem will have
feasible solutions if and only if the total demand equals the total
supply. If the model is unbalanced, we can always add a dummy source
or a dummy destination to restore balance.
The cost assumption: The cost of distributing units from any
particular source to any particular destination is directly proportional to
the number of units distributed. Therefore, this cost is just the unit cost
of distribution times the number of units distributed. (We let cij denote
this unit cost for source i and destination j.)The only data needed for a
transportation problem model are the supplies, demands, and unit
costs. These are the parameters of the model. All these parameters
can be summarized conveniently in a single parameter table as shown
below
The model: Any problem (whether involving transportation or not) fits
the model for a transportation problem if it can be described
completely in terms of a parameter table shown below and it satisfies
both the requirements assumption and the cost assumption. The
objective is to minimize the total cost of distributing the units. All the
parameters of the model are included in this parameter table.

SUMMARY OF THE TRANSPORTATION MODEL


The steps of the transportation algorithm are exact parallels of the simplex
algorithm.
Step 1. Determine a starting basic feasible solution, and go to step 2.
Step 2. Use the optimality condition of the simplex method to
determine the entering variable from among all the non basic
variables. If the optimality condition is satisfied, stop. Otherwise, go to
step 3.
Step 3. Use the feasibility condition of the simplex method to
determine the leaving variable from among all the current basic
variables, and find the new basic solution. Return to step 2.

DETERMINATION OF A BASIC FEASIBLE SOLUTION


The special structure of the transportation problem allows securing a non
artificial starting basic solution using one of three methods:
1. Northwest-corner method
2. Least-cost method
3. Vogels approximation method
The three methods differ in the "quality" of the starting basic solution
they produce, in the sense that a better starting solution yields a smaller
objective value. In general, though not always, the Vogel method yields the
best starting basic solution, and the northwest-corner method yields the
worst. The tradeoff is that the northwest-corner method involves the least
amount of computations.
1- Northwest-Corner Method
The method starts at the northwest-corner cell (route) of the tableau
(variable x11).
Step 1: Allocate as much as possible to the selected cell, and adjust the
associated amounts of supply and demand by subtracting the allocated
amount.
Step 2: Cross out the row or column with zero supply or demand to indicate
that no further assignments can be made in that row or column. If both a row
and a column net to zero simultaneously, cross out one only, and leave a
zero supply (demand) in the uncrossed-out TOW (column).
Step 3: If exactly one row or column is left uncrossed out, stop. Otherwise,
move to the cell to the right if a column has just been crossed out or below if
a row has been crossed out. Go to step 1.
2- Least Cost Method
The least-cost method finds a better starting solution by concentrating on
the cheapest routes. The method assigns as much as possible to the cell with
the smallest unit cost (ties are broken arbitrarily). Next, the satisfied row or

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

This Example is solved using all three methods mentioned above

1- Northwest Corner Method


COST PER UNIT DISTRIBUTED
DESTINATION
SOURCE

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

Least Cost = 5*10+10*2+5*7+15*9+5*20+10*18=520

2- Least Cost Method


COST PER UNIT DISTRIBUTED
DESTINATION
SOURCE

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

Least Cost= 15*2+5*4+15*9+0*11+10*18+5*20 = 475

3- VAM (Vogels Approximation Method)


COST PER UNIT DISTRIBUTED
DESTINATION
SOURCE

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

Least Cost = 5*4+15*2+15*9+10*20+5*18 = 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:

Introduction to the CPM (Critical Path Method)


and Transshipment Model

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

science concerning data structures and efficient data manipulation.


Consequently, algorithms and software now are available and are being used
to solve huge problems on a routine basis that would have been completely
intractable two or three decades ago.
Many network optimization models actually are special types of linear
programming problems. For example, both the transportation problem and
the assignment problem discussed in the preceding Lab reports fall into this
category because of their network representations

THE TERMINOLOGY OF NETWORKS


A network consists of a set of points and a set of lines connecting certain
pairs of the points. The points are called nodes (or vertices). The lines are
called arcs (or links or edges or branches); Arcs are labeled by naming the
nodes at either end If flow through an arc is allowed in only one direction
(e.g., a one way street), the arc is said to be a directed arc.
The direction is indicated by adding an arrowhead at the end of the line
representing the arc. When a directed arc is labeled by listing two nodes it
connects, the from node always is given before the to node; e.g., an arc that
is directed from node A to node B must be labeled as AB rather than BA.
Alternatively, this arc may be labeled as A
B. If flow through an arc is
allowed in either direction (e.g., a pipeline that can be used to pump fluid in
either direction), the arc is said to be an undirected arc. To help you
distinguish between the two kinds of arcs, we shall frequently refer to
undirected arcs by the suggestive name of links.
When two nodes are not connected by an arc, a natural question is whether
they are connected by a series of arcs.
A path between two nodes is a sequence of distinct arcs connecting these
nodes.A directed path from node i to node j is a sequence of connecting
arcs whose direction (if any) is toward node j, so that flow from node i to
node j along this path is feasible. An undirected path from node i to node j
is a sequence of connecting arcs whose direction (if any) can be either
toward or away from node j. (Notice that a directed path also satisfies the
definition of an undirected path, but not vice versa.)
A path that begins and ends at the same node is called a cycle. Two nodes
are said to be connected if the network contains at least one undirected
path between them. (Note that the path does not need to be directed even if
the network is directed.) A connected network is a network where every
pair of nodes is connected.
For nodes, a distinction is made among those that are net generators of flow,
net absorbers of flow, or neither. A supply node (or source node or source)
has the property that the flow out of the node exceeds the flow into the
node. The reverse case is a demand node (or sink node or sink), where the
flow into the node exceeds the flow out of the node. A transshipment node
(or intermediate node) satisfies conservation of flow, so flow in equals flow
out.

THE TRANSSHIPMENT MODEL


The transshipment model recognizes that it may be cheaper to ship through
intermediate or transient nodes before reaching the final destination. This
concept is more general than that of the regular transportation model, where
direct shipments only are allowed between a source and a destination.

CRITICAL PATH METHOD


CPM (Critical Path Method) and PERT (Program Evaluation and Review
Technique) are network-based methods designed to assist in the planning,
scheduling, and control of projects. A project is defined as a collection of
interrelated activities with each activity consuming time and resources. The
objective of CPM and PERT is to provide analytic means for scheduling the
activities. Figure shown below summarizes the steps of the techniques.
First, we define the activities of the project, their precedence
relationships, and their time requirements. Next, the precedence
relationships among the activities are represented by a network. The third
step involves specific computations to develop the time schedule for the
project. During the actual execution of the project things may not proceed as
planned, as some of the activities may be expedited or delayed. When this
happens, the schedule must be revised to reflect the realities on the ground.
This is the reason for including a feedback loop between the time schedule
phase and the network phase, as shown in Figure below

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.

Network Representation in CPM


Each activity of the project is represented by an arc pointing in the direction
of progress in the project. The nodes of the network establish the precedence
relationships among the different activities. Three rules are available for
constructing the network.
Rule 1: Each activity is represented by one, and only one, arc.
Rule 2: Each activity must be identified by two distinct end nodes.
Rule 3: To maintain the correct precedence relationships, the following
questions must be
answered as each activity is added to the network:
(a) What activities must immediately precede the current activity?
(b) What activities must follow the current activity?
(c) What activities must occur concurrently with the current activity?

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

Critical path = A-C-D-E-F-G = 9 + 5 + 6 + 4 + 3 + 18


= 45 days
CPM:
0

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

Critical path = = A-C-D-E-F-G = 9+5+6+4+3+18 = 45 days


EXAMPLE NO. 3:

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

Critical path = A-E-F-G-J-K or 1 2 3 4 5 6

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

Critical path = A-E-F-G-J-K or or


= 9 + 2 + 8 + 15 + 10 + 20 + 27 =109 months

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:

Introduction to Simulation Modeling

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.

Other reasons for the popularity of simulation include:


1. Many situations are too complex to permit development of a mathematical solution; the
degree of simplification needed would seriously affect the results. In contrast, simulation
models are often able to capture the richness of a situation without sacrificing simplicity,
thereby enhancing the decision process.
2. Simulation models are fairly simple to use and understand.
3. Simulation enables the decision maker to conduct experiments on a model that will help in
understanding process behavior while avoiding the risks of conducting tests on the models
real-life counterpart.
4. Extensive computer software packages make it easy to use fairly sophisticated models.
5. Simulation can be used for a wide range of situations.
6. There have been numerous successful applications of these techniques.

STEPS IN THE SIMULATION PROCESS


Regardless of the type of simulation involved, certain basic steps are used for all simulation
models:
1.
2.
3.
4.

Identify the problem and set objectives.


Develop the simulation model.
Test the model to be sure that it reflects the system being studied.
Develop one or more experiments (conditions under which the models behavior will be
examined).
5. Run the simulation and evaluate the results.
6. Repeat steps 4 and 5 until you are satisfied with the results.
The first step in problem solving of any sort is to clearly declare the problem and set objectives
that the solution is intended to achieve; simulation is no exception. A clear statement of the
objectives can provide not only guidance for model development but also the basis for evaluation
of the success or failure of a simulation. In general, the goal of a simulation study is to determine
how a system will behave under certain conditions.
The more specific a manager is about what he or she is looking for, the better the
chances that the simulation model will be designed to accomplish that. Toward that
end, the manager must decide on the scope and level of detail of the simulation.
This indicates the necessary degree of complexity of the model and the information
requirements of the study.

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.

MONTE CARLO SIMULATION


There are many different kinds of simulation techniques. The discussion will focus on
probabilistic simulation using the Monte Carlo method. The technique gets its name from the
famous Mediterranean resort associated with games of chance. The chance element is an
important aspect of Monte Carlo simulation, and this approach can be used only when a process
has a random, or chance, component. In the Monte Carlo method, a manager identifies a
probability distribution that reflects the random component of the system under study. Random
samples taken from this probability distribution are analogous to observations made on the
system itself. As the number of observations increases, the results of the simulation will more
closely approximate the behavior of the real system, provided an appropriate model has been
developed. Sampling is accomplished by the use of random numbers.
The basic steps in the process are as follows:
1. Identify a probability distribution for each random component of the system.

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.

The following table summarizes these results:


The mean number of breakdowns for this 10-period simulation is 17/10 = 1.7 break
downs per day. Compare this to the expected number of break downs based on the
historical data:

0(.10) +

1(.30) + 2(.25) + 3(.20) + 4(.10) + 5(.05) = 2.05 per day

Several points are worth noting:


1. This simple example is intended to illustrate the basic concept of Monte Carlo simulation.
If our only goal were to estimate the average number of breakdowns, we would not have
to simulate; we could base the estimate on the historical data alone.
2. The simulation should be viewed as a sample; it is quite likely that additional runs of 10
numbers would produce different means.
3. Because of the variability inherent in the results of small samples, it would be unwise to
attempt to draw any firm conclusions from them; in an actual study, much larger sample
sizes would be used.
In some cases, it is helpful to construct a flowchart that describes a simulation, especially if the
simulation will involve periodic updating of system values (e.g., amount of inventory on hand).
The excel spreadsheet formulation for this problem is shown below. Note that the alignment of
values in columns B, C, and D must be exactly as shown.

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:

a. Construct a flowchart that describes a 10-day simulation.

b. Use two-digit random numbers from Table 1, column 11, reading down. Assume a beginning
inventory of seven trucks.

b. (1) Specify random number ranges for demand:

(2) Obtain random numbers, convert to demand, update inventory accordingly, and reorder when
necessary:

Simulating Theoretical Distributions


In many instances, a simulation will involve the use of theoretical distributions. Among the most
frequently encountered theoretical distributions are the Poisson, normal, and exponential
distributions. Being able to simulate these distributions will greatly enhance your knowledge and
appreciation of simulation.
Simulation of a Poisson distribution requires the mean of the distribution. Knowledge of the
mean enables one to obtain cumulative probabilities for the distribution from Appendix Table C;
these, in turn, provide the basis for random-number assignments. You can use Table 19S-1 to
obtain random numbers; you must read three-digit random numbers from Table 19S-1 to achieve
correspondence. Example S-3 illustrates these concepts.
The normal distribution can be important in many problems. There are a number of ways to
simulate a normal distribution, but perhaps the simplest is to use a table of normally distributed
random numbers, such as Table 19S-2. The basis of the table is a normal distribution with a mean
of 0 and a standard deviation of 1.00. Like all such tables, the numbers are arranged randomly, so
that when they are read in any sequence they exhibit randomness. In order to use the table, we
must have the parameters of a normal distribution (i.e., its mean and standard deviation) in mind.
Numbers obtained from the random number table can then be converted to actual values by
multiplying the standard deviation by the random number and adding this amount to the mean.

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.

Table -2 Normal distributed random numbers

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.

Figure 1: A uniform distribution

Figure 2: A negative exponential distribution

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

, is given by the equation.


(1)

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

The natural logarithm of a power of e is equal to the power itself, so

ln . RN ln e t t

(2)

Then
t

1
ln . RN

This concept is illustrated in Figure 12.


Values of random numbers can be obtained using Table 1, as demonstrated in the following
example.
Example-6
Times between breakdowns of a certain type of equipment can be described by an exponential
distribution with a mean of five hours. Simulate the time between two breakdowns. Read twodigit random numbers from column 3 of Table 1.

The mean,
times are:

, is 5 hours. The random numbers are 84 and 05. Using Formula (2), the simulated

For 84, t = -5[ln(.84)] = -5[-0.1744] = 0.872hours.


For 05, t = -5[ln(.05)] = -5[-2.9957] = 14.979hours.

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.

ADVANTAGES AND LIMITATIONS OF USING SIMULATIONS


Among the main advantages of simulation are these:
1. It lends itself to problems that are difficult or impossible to solve mathematically.
2. It permits an analyst to experiment with system behavior while avoiding possible risks
inherent in experimenting with the actual system.
3. It compresses time so that managers can quickly discern long-term effects.
4. It can serve as a valuable tool for training decision makers by building up their experience
and understanding of system behavior under a wide range of conditions.

Figure 3: Choosing a solution technique


Certain limitations are also associated with simulation. Chief among these are:
1. Simulation does not produce an optimum solution; it merely indicates an approximate
behavior for a given set of inputs. There are two reasons for this:
a. By design, there is inherent randomness (i.e., random numbers) in simulation.

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.

SOLVING LLPS USING 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

S-ar putea să vă placă și