Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question B6 [15 marks] Give a full definition of the concept of simulation. (1 m

ID: 2928206 • Letter: Q

Question

Question B6                                                                                                               [15 marks]

Give a full definition of the concept of simulation.                                       (1 marks)

Set out the general simulation methodology in ten steps using a flow diagram. (5 marks)

At a bakery, the daily demand for bread (in loaves) has the following probability distribution:

Demand (loaves)        Probability

1 000                                       0,10

2 000                                       0,30

3 000                                       0,45

4 000                                       0,15

(c) What is the expected daily demand for bread at the bakery?                                                                                                                                                                   (2 marks)

(d) In a simulation run, the daily demand for bread is generated from the probability distribution by sequentially using the uniformly distributed random numbers U1, U2, : : :, that you can generate from Excel for 20 days.

(i) What is the demand for bread on the first day of the simulation run?                                                                                                                                                      (1 marks)

(ii) What is the average demand for bread over the first four days of the simulation run?                                                                                                                            (3 marks)

(iii) Draw a flow diagram of the logic to calculate the average daily demand for bread over the duration of a year (365 days). (Define any variables that you use clearly.)                                                                                                                                     (3 marks)

ANNEXURE-A:

Table 1: Control Chart parameters

Number of Observations in Subgroup

n

_

Factor for X Chart

A2

FACTORS FOR R CHARTS

Lower Control Limit

D3

FACTORS FOR R CHARTS

Upper Control Limit

D4

2

1.88

0

3.27

3

1.02

0

2.57

4

0.73

0

2.28

5

0.58

0

2.11

6

0.48

0

2.00

7

0.42

0.08

1.92

8

0.37

0.14

1.86

9

0.34

0.18

1.82

10

0.31

0.22

1.78

11

0.29

0.26

1.74

12

0.27

0.28

1.72

13

0.25

0.31

1.69

14

0.24

0.33

1.67

15

0.22

0.35

1.65

16

0.21

0.36

1.64

17

0.20

0.38

1.62

18

0.19

0.39

1.61

19

0.19

0.40

1.60

20

0.18

0.41

1.59

Table 2: Random numbers

The following sequence of 20 random numbers were generated sequentially from a U[0; 1) distribution.

U1 = 0; 48 U5 = 0; 08 U9 = 0; 71 U13 = 0; 69 U17 = 0; 78

U2 = 0; 03 U6 = 0; 23 U10 = 0; 63 U14 = 0; 98 U18 = 0; 92

U3 = 0; 52 U7 = 0; 40 U11 = 0; 57 U15 = 0; 60 U19 = 0; 19

U4 = 0; 83 U8 = 0; 24 U12 = 0; 41 U16 = 0; 20 U20 = 0; 56

Number of Observations in Subgroup

n

_

Factor for X Chart

A2

FACTORS FOR R CHARTS

Lower Control Limit

D3

FACTORS FOR R CHARTS

Upper Control Limit

D4

2

1.88

0

3.27

3

1.02

0

2.57

4

0.73

0

2.28

5

0.58

0

2.11

6

0.48

0

2.00

7

0.42

0.08

1.92

8

0.37

0.14

1.86

9

0.34

0.18

1.82

10

0.31

0.22

1.78

11

0.29

0.26

1.74

12

0.27

0.28

1.72

13

0.25

0.31

1.69

14

0.24

0.33

1.67

15

0.22

0.35

1.65

16

0.21

0.36

1.64

17

0.20

0.38

1.62

18

0.19

0.39

1.61

19

0.19

0.40

1.60

20

0.18

0.41

1.59

Explanation / Answer

Steps for simulating daily demand numbers using uniformly random numbers (0 and 1) given a probability distribution

1. Find the cumulative probability distribution for each of the values in the probability distribution

2. create a lower probability band (LPB) and upper probability band for the probabilty distribution

Upper probability band (UPB) is the cumulative value till that point

Lower probabiliy band (LPB) is the probability value at that point

3. Create n (in this case 20) random numbers using rand() function in excel. It creates values between 0 and 1.

4. Make a rules set such that if the random number falls between the UPB and LPB, the corresponding x value is the simulated number.

Do this n times using the n random numbers (generated by uniform distribution)

c)

Demand and the probability is given as follows.

calculate expected demand E(x) = sum (x * p(x)) for all x values

The expected daily demand is 2650 loaves

d)

For generating 20 daily demand numbers.

Construct the steps given above for simulation

d)

i)

For example the uniformly generated random number for day 1 is 0.48, it falls between 0.41 and 0.85 band.

hence the simulated demand is 3000 loaves.

ii)

For the first 4 days, the simulated demand is

The average demand is 2500 loaves for the first 4 days.

FLOW CHART

x p(x) x * p(x) 1000 0.1 100 2000 0.3 600 3000 0.45 1350 4000 0.15 600 2650