Vous êtes sur la page 1sur 18

SIMULATION

Simulation is to imitate reality to represent reality.


Simulation is a technique for conducting experiments
Simulation is descriptive and not optimizing technique
Simulation is a process often consists of repetition of an experiment in many, many times
to obtain an estimate of the overall effect of certain actions.
Simulation is usually called for only when the problem under investigation is too
complex to be treated by analytical models or by numerical optimization techniques.

In a simulation, a given system is copied and the variables and constants associated with
it are manipulated in that artificial environment to examine the behaviour of the system.

In general terms, Simulation involves developing a model of some real life phenomenon
and then performing experiments on the model evolved.

Often we do not find a mathematical technique that; a model once constructed may
permit us to predict what will be the consequences of taking a certain action. In particular
we could experiment on the model by trying alternative actions or parameters and
compare their consequences. This experimentation allow us to answer what if
questions relating the effects of your assumption on the model response.
The availability of the computers makes it possible for us to deal with an extraordinary
large quantity of details which can be incorporated into a model and the ability to
manipulate the model over many experiments (i.e. replicating all the possibilities that
may be imbedded in the external world and events would seem to recur).
For example,

Testing of an aircraft model in a wind tunnel to test the aerodynamic properties of


an the model

A model of a traffic signal system

Military war games

Business games for training

Planetarium etc.

Simulation defined
A simulation of a system or an organism is the operation of a model or simulator which is
a representation of the system or organism. The model is amenable to manipulation
which would be impossible, too expensive or unpractical to perform on the entity it
portrays. The operation of the model can be studied and for it, properties concerning the
behaviour of the actual system can be inferred.
-Shubik
Simulation is the process of designing a model of a real system and conducting the
experiments with this model for the purpose of understanding the behaviour (within the
limits imposed by a criterion or set of criterion) for the operation of the system.
-

Shannon

Steps of Simulation process


Step 1: Identify the problem.
If an inventory system is being simulated, then the problem may concern the
determination of the size of the order (number of units to be ordered) when the inventory
falls up to the reorder level (point).
Step 2: Identify the decision variables, performance criterion (objective) and the decision
rules.
In the context of the above defined inventory problem, the demand (consumption rate),
lead time and safety stock are identified as the decision variable. These variables shall be
responsible to measure the performance of the system in terms of total inventory cost
under the decision rule- when to order.
Step 3: Construct a numerical model.
Numerical model is constructed to be analyzed on the computer. Some times the model is
written in a particular simulation language which is suited for the problem under the
analysis.
Step 4: Validate the model
Validation is necessary to ensure whether it is truly representing the system being
analyzed and the results will be reliable.
Step 5: Design the experiments

Conduct experiments with the simulation model by listing specific values of variables to
be tested (i.e. list courses of action for testing) at each trail (run).
Step 6: Run the simulation model.
Run the model on the computer to get the results in form of operating characteristics.
Step 7: Examine the results.
Examine the results of the problem as well as their reliability and correctness. If the
simulation is complete, then select the best course of action (or alternative) otherwise
make the desired changes in the model decision variables, parameters or design and
return to step 3.
Advantages of simulation
1. Simulation is a straight forward and simple technique
2. The technique is very useful to analyze large and complex problems which are not
amenable to mathematical or quantitative methods.
3. It is an interactive method, which enables the decision maker to study the changes and
their effects on the performance of the system.
4. The experiments in a simulation are run on the model and not on the system itself.
Limitations of simulation
1. At times simulation models can be very costly and expensive
2. It is trail and error technique to produce different solutions in repeated runs.
3. The solution obtained from the simulation may not be optimal.
4. The simulation model needs to be examined and analyzed for decision making. It only
creates an alternative and not an optimal solution by itself.

Monte-Carlo techniques or Monte-Carlo simulation.


The Monte-Carlo method is a simulation technique in which statistical distribution
functions are created by using series of random numbers
Random numbers.
The underlying theory in random number is that, each number has an equal opportunity
of being selected.

There are various ways in which random numbers may be generated. These could be:
result of some device like coin or die; published table of random numbers, mid-square
method, or some other sophisticated method.
It may be mentioned here that random numbers generated by some method may not be
really random in nature. In fact such numbers are called pseudo-random-numbers.
Rand corporation (of USA): A million random digits, is a random number table used in
simulation situations. The numbers in these tables are in random arrangement.
The Monte-Carlo simulation technique consists of the following steps.
1. Setting up a probability distribution for variables to be analyzed.
2. Building a cumulative probability distribution for each random variable.
3. Generating random numbers. Assign an appropriate set of random numbers to
represent value or range (interval) of values for each random variable.
4. Conduct the simulation experiment by means of random sampling
5. Repeat Step 4 until the required number of simulation runs has been generated.
6. Design and implement a course of action and maintain control.

Example 1.
A bakery keeps stock of popular brand of cake. Previous experience shows the daily
demand pattern for the item with associated probabilities, as given below:
Daily demand(number)

10

20

30

40

50

Probability

0.01

0.20

0.15

0.50

0.12

0.02

Use the following sequence of random numbers to simulate the demand for next 10 days.
Random Numbers

40

19

87

83

73

84

29

09

02

20

Also estimate the daily average demand for the cakes on the basis of simulated data.
Solution:
Using the daily demand distribution, we obtain a probability distribution as shown in the
following Table.

Daily demand distribution


Daily Demand

Probability

Cumulative Probability

Random Number Interval

0.01

0.01

00

10

0.20

0.21

01-20

20

0.15

0.36

21-35

30

0.50

0.86

36-85

40

0.12

0.98

86-97

50

0.02

1.00

98-99

By conducting the simulation experiment for demand by taking a sample of 10 random


numbers from the table of random numbers we get,
Days

Random Number

Demand

40

30

Because 0.36 < 0.40 < 0.85

19

10

Because 0.01 < 0.19 < 0.20

87

40

and so on

83

30

73

30

84

30

29

20

09

10

02

10

10

20

10
Total

Expected demand = 220/10 = 22 units per day.

220

Example 2.
XYZ spare parts company wishes to determine the level of stock it should carry for items
in its range. Demand is not certain and there is a lead time for stock replenishment. For
one item X, the following information is obtained.

Demand

0.10

0.20

0.30

0.30

0.10

(Units/day)
Probability
Carrying

Rs.2

cost(Per unit
per day)
Ordering

Rs.50

cost(per
order)
Lead time for

3 days

replenishment
Stock on hand at the beginning of the simulation exercise was 20 units.
Carry out a simulation run over a period of 10 days with the objective of evaluating the
inventory rule:
Order 15 units when present inventory plus outstanding falls below 15 units.
The sequence of random numbers to be used is :0,9,1,1,5,1,8,6,3,5,7,1,1,2,9 using the
first number for day one.
Solution:
Let us begin the simulation by assuming that
i) orders are placed at the end of the day and received after 3 days at the end of the day.
ii) back orders are accumulated in case of short supply and are supplied when stock is
available.
The cumulative probability distribution and the random number range for daily demand is
shown in the table.

Daily Demand Distribution


Daily Demand

Probability

Cumulative

Random Number

Probability

Range

0.10

0.10

00

0.20

0.30

01-02

0.30

0.60

03-05

0.30

0.90

06-08

0.10

1.00

09

The results of the simulation experiment conducted are as shown below.


Days Opening Random
Stock

Resulting Closing

Order

Order

Average stock

Number

Demand

Placed

Delivered

in the evening

Stock

20

17

18.5

17

10

15

13.5

10

0(-3)*

15

15

12

10

0(-4)*

15

15

11

8.5

10

3.5

*Negative figure indicates back orders.


Average ending stock = 73/10 = 7.3 units/day
Daily ordering cost = (Cost of placing one order) x (Number of orders placed per
day)
= 50 x 0.3 = Rs.15
Daily carrying cost = (Cost of carrying one unit per day) x (Average ending stock)
= 2 x 7.3 = Rs.14.6
Total daily inventory cost = Daily ordering cost + Daily carrying cost
= 15 + 14.6
= Rs.29.6

Example 3.
A small retailer deals in a perishable commodity, the daily demand and supply of which
are random variables. The past 500 days data show the following:
Supply

Demand

Available ( kg )

Number of Days

Demand (kg )

Number of Days

10

40

10

50

20

50

20

110

30

190

30

200

40

150

40

100

50

70

50

40

The retailer buys the commodity at Rs.20 per kg and sells at Rs.30 per kg. If any
commodity remains at the end the day it has no resale value and is a dead loss. Moreover,
the loss on any unsatisfied demand is Rs.8 per kg
Given the following random numbers. Simulate six day sales.
31

18

63

84

15

79

07

32

43

75

81

27

Using the random numbers alternatively, for example, first pair (31) to simulate supply
and second pair (18) to simulate demand, etc.
Solution:
Probability and Random Number Interval for Daily Demand and Supply
Available

Probability

(kg)

Random

Demand

Number

(kg)

Probability

Random
Number

10

40/500=0.08

00-07

10

50/500=0.10

20

50/500=0.10

08-17

20

110/500=0.22 10-31

30

190/500=0.38 18-55

30

200/500=0.40 32-71

40

150/500=0.30 56-85

40

100/500=0.20 72-91

50

70/500=0.14

50

40/500=0.08

85-99

00-09

92-99

Simulation Experimentation Sheet


Day

Random Supply

Random Demand Cost

Revenue Shortage Profit

Number

Number

(Rs)

(kg)

(kg)

(Rs)

(Loss)

31

30

18

20

600

600

63

40

84

40

800

1,200

400

15

20

79

40

400

600

160

40

07

10

32

30

200

300

160

-60

43

30

75

40

600

900

80

220

81

40

27

20

800

600

-200

The above table shows that during these six days period retailer makes a net profit
of Rs.400.

Example 4.
A sample of 100 arrivals of a customer at a retail sales depot is according to the following
distribution.
Time between arrival(Minutes)

Frequency

0.5

1.0

1.5

10

2.0

25

2.5

20

3.0

14

3.5

10

4.0

4.5

5.0

A study of the time required to service customers by adding up the bills, receiving
payments and placing packages, yields the following distribution

Time between service(Minutes)

Frequency

0.5

12

1.0

21

1.5

36

2.0

19

2.5

3.0

Estimate the average percentage of customer waiting time and average percentage of idle
time of the server by simulation for the next 10 arrivals.
Solution:
Arrival
Arrivals

Frequency

Probability

Cumulative

Random No.

Probability

Interval

0.5

0.02

0.02

00-01

1.0

0.06

0.08

02-07

1.5

10

0.10

0.18

08-17

2.0

25

0.25

0.43

18-42

2.5

20

0.20

0.63

43-62

3.0

14

0.14

0.77

63-76

3.5

10

0.10

0.87

77-86

4.0

0.07

0.94

87-93

4.5

0.04

0.98

94-97

5.0

0.02

1.00

98-99

Service
Time between

Frequency

Probability

service(Minutes)

Cumulative

Random No.

Probability

Interval

0.5

12

0.12

0.12

00-11

1.0

21

0.21

0.33

12-32

1.5

36

0.36

0.69

33-68

2.0

19

0.19

0.88

69-87

2.5

0.07

0.95

88-94

3.0

0.05

1.00

95-99

Arrival Random Inter

Arrival Random Service Service Service Wt.time

Wt.time

No.

Arrival

Time

of the

of the

Time

(Mins)

end

Server

No.

No.

Time

Start

End

(Mins)

(Mins.)

customer

93

4.0

4.0

78

2.0

4.0

22

2.0

6.0

76

2.0

53

2.5

8.5

58

1.5

8.5

10.0

0.5

64

3.0

11.5

54

1.5

11.5

13

1.5

39

2.0

13.5

74

2.0

13.5

15.5

0.5

07

1.0

14.5

92

2.5

15.5

18

1.0

10

1.5

16.0

38

1.5

18.0

19.5

2.0

63

3.0

19.0

70

2.0

19.5

21.5

0.5

76

3.0

22.0

96

3.0

22.0

25.0

0.5

10

35

2.0

24.0

92

2.5

25.0

27.5

1.0

Total

4.5

7.0

Average waiting time per customer is 4.5/10 = 0.45 minutes


Average waiting time or idle time of the server = 7.0/10 = 0.7 minutes.

Example 5.
A tourist car operator finds that during the past few months the cars use has varied so
much that the cost of maintaining the car varied considerably. During the past 200 days
the demand for the car fluctuated as below.
Trips per week

Frequency

16

24

30

60

40

30

Using the random numbers simulate the demand for a 10 week period.
Solution:

Trips per

Frequency

Probability

week/

Cumulative

Random

Probability

Number

Demand per

Interval

week
0

16

0.08

0.08

00-07

24

0.12

0.20

08-19

30

0.15

0.35

20-34

60

0.30

0.65

35-64

40

0.20

0.85

65-84

30

0.15

1.00

85-99

The simulated demand for the cars for the next 10 weeks period is given in the table
below

Week

Random Number

Demand

82

96

18

96

20

84

56

11

52

10

03

Total

28

Average Demand = 28/10 = 2.8 cars per week

Example 6.
An automobile production line turns out about 100 cars a day, but deviations occur owing
to many causes. The production is more accurately described by the probability
distribution given below.
Production per day

Probability

95

0.03

96

0.05

97

0.07

98

0.10

99

0.15

100

0.20

101

0.15

102

0.10

103

0.07

104

0.05

105

0.03

Finished cars are transported across the bay at the end of each day by the ferry. If the
ferry has space for only 101 cars, what will be the average numbers of waiting to be
shipped and what will be the average number of empty space on the ship?
Solution:
Production per day

Probability

Cumulative

Random Number

Probability

Interval

95

0.03

0.03

00-02

96

0.05

0.08

03-07

97

0.07

0.15

08-14

98

0.10

0.25

15-24

99

0.15

0.40

25-39

100

0.20

0.60

40-59

101

0.15

0.75

60-74

102

0.10

0.85

75-84

103

0.07

0.92

85-91

104

0.05

0.97

92-96

105

0.03

1.00

97-99

The simulated production of cars for the next 15 days is given in the following table.
Day

Random

Production per

No. of cars

No. of empty

Number

day

waiting

space in the
ship

97

105

02

95

80

102

66

101

96

104

55

100

50

100

29

99

58

100

10

51

100

11

04

96

12

86

103

13

24

98

14

39

99

15

47

100

Total

10

23

Average number of cars waiting to be shipped = 10/15 = 0.67 per day


Average number of empty space on the ship = 23/15 = 1.53 per day

Example 7.
A company manufactures 30 units per product. The sale of these items depends upon
demand which has the following distribution.
Sale (units)

Probability

27

0.10

28

0.15

29

0.20

30

0.35

31

0.15

32

0.05

The production cost and sale price of each unit are Rs.40 and Rs.50 respectively. Any
unsold product is to be disposed off at a loss of Rs.15 per unit. There is a penalty of Rs.5
per unit if the demand is not met. Using the following random numbers, estimate the total
profit/loss for the company for the next 10 days.
Random Numbers: 10, 99, 65,99,95,01,79,11,16 and 20.
If the company decides to produce 29 units per day, what is the advantage or
disadvantage to the company?
Sale (units)

Probability

Cumulative

Random Number

Probability

Interval

27

0.10

0.10

00-09

28

0.15

0.25

10-24

29

0.20

0.45

25-44

30

0.35

0.80

45-79

31

0.15

0.95

80-94

32

0.05

1.00

95-99

Set up the simulation for next 10 days


Day

Random

Simulated

Number of

Number of

Number

Sales

units Unsold

units short

10

28

30-28=2

99

32

32-30=2

65

30

99

32

95

32

01

27

30-27=3

79

30

11

28

30-28=2

16

28

10

20

28

11

Total

At the production rate of 30 per day, total number of units produced in 10 days = 30 X 10
= 300 Nos, since the production cost is Rs.40 and the sales price is Rs.50, the per unit
profit is Rs.10

Day

Demand

Actual Sales

Profit on

Loss due to

Loss due to

Actual sales

the unsold

penalty for

units

shortage

10

28

280

2 X 15 = 30

99

30

300

2 X 5 = 10

65

30

300

99

30

300

2 X 5 = 10

95

30

300

2 X 5 = 10

01

27

270

3 X 15 = 45

79

30

300

11

28

280

2 X 15 = 30

16

28

280

2 X 15 = 30

10

20

28

280

2 X 15 = 30

289

Rs.2890

Rs.165

Rs.30

(a) Total profit for next 10 days when production is 30 units per day = (2890) (165 +30)
= 2890-195
= 2695
(b) If the company decides to produce 29 units per day. The calculation of profit and loss
is as shown below.
Day

Demand

Production

Actual

Profit on

Loss due to

Loss due to

units

Sales

Actual

the unsold

penalty for

sales

units

shortage

28

29

28

280

1 X 15 = 15

32

29

29

290

3 X 5= 15

30

29

29

290

1X5=5

32

29

29

290

3 X 5= 15

32

29

29

290

3 X 5= 15

27

29

27

270

1 X 15 = 15

30

29

29

290

1X5=5

28

29

28

280

1 X 15 = 15

28

29

28

280

1 X 15 = 15

10

28

29

28

280

1 X 15 = 15

Total

284

Rs.2840

Rs.90

Rs.55

Total profit for next 10 days when production is 29 units per day = (2840) (90 + 55)
= Rs.2695
Since the profit is same for both the cases there is no disadvantage to the company.

Vous aimerez peut-être aussi