You get a bonus - 1 coin for daily activity. Now you have 1 coin

An example of the Monte Carlo method and simulation.

Lecture



For a given system structure

1) find the Monte Carlo method P * of the probability of the system’s failure-free operation, knowing the probability of the failure-free operation of its elements

2) find the absolute error | PP * |, where P is the system reliability, calculated analytically. Perform at least 100 tests.

Note Monte-Carlo simulation on a computer, attach a test program in any programming language (you can also use Excel, Mathcad, Scilab Matlab, etc.)

Initial data

No. Var.

P (A)

P (B)

P (C)

P (D)

P (E)

P (F)

P (H)

four

0.5

0.1

0.2

0.9

0.3

0.8

0.3

An example of the Monte Carlo method and simulation.

Decision

1. find the Monte Carlo method for estimating P * the probability of system uptime

P AB = P A + P B -P A P B = 0.5 + 0.1-0.5 * 0.1 = 0.6-0.05 = 0.55

P CE = P C + P E -P C P E = 0.2 + 0.3-0.2 * 0.3 = 0.5-0.06 = 0.44

P DF = P D P F = 0.9 * 0.8 = 0.72

P DFH = P DF + P H -P DF P H = 0.72 + 0.3-0.72 * 0.3 = 0.804

P ABCE = P AB P CE = 0.55 * 0.44 = 0.242

P ABCEDFH = P ABCE P DFH = 0.242 * 0.804 = 0.1946

P analytical = 0,1946

2) find the absolute error.

we first define the simulation probability using Excel

P (A) = IF ($ B4 <$ I $ 3; 1; 0)

P (B) = = IF ($ C4 <$ J $ 3; 1; 0)

P (C) = = IF ($ D4 <$ K $ 3; 1; 0)

P (D) = = IF ($ F4 <$ L $ 3; 1; 0)

P (E) = = IF ($ F4 <$ M $ 3; 1; 0)

P (F) = = IF ($ G4 <$ N $ 3; 1; 0)

P (H) = = IF ($ H4 <$ O $ 3; 1; 0)

P (ABCE) = IF (AND (OR (I4; J4); OR (K4; M4)); 1; 0)

P (DFH) = IF (OR (AND (L4; N4); O4); 1; 0)

P (System) = IF (AND (P4; Q4); 1; 0)

X is a random number from 0 to 1

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

n

X

X

X

X

X

X

X

A

B

C

D

E

F

H

ABCE

Dfh

System

0.5

0.1

0.2

0.9

0.3

0.8

0.3

one

0.52

0.38

0.25

0.90

0.51

0.13

0.68

0

0

0

one

0

one

0

0

one

0

2

0.60

0.97

0.59

0.43

0.85

0.04

0.30

0

0

0

one

0

one

0

0

one

0

3

0,69

0.79

0.35

0.05

0.37

0.44

0.82

0

0

0

one

0

one

0

0

one

0

four

0.73

0.56

0.87

0.08

0.92

0.24

0.33

0

0

0

0

0

one

0

0

0

0

five

0.85

0.38

0.84

0.61

0.07

0.68

0.71

0

0

0

one

one

one

0

0

one

0

6

0.36

0.79

0.66

0.31

0.12

0.27

0.90

one

0

0

one

one

one

0

one

one

one

7

0.63

0.24

0.46

0.64

0.74

0.93

0.17

0

0

0

one

0

0

one

0

one

0

eight

0.54

0.29

0.57

0.05

0.09

0.14

0.01

0

0

0

one

one

one

one

0

one

0

9

0.05

0.20

0.87

0.01

0.88

0.30

0.24

one

0

0

one

0

one

one

0

one

0

ten

0.30

0.99

0.59

0.59

0.76

0.50

0.37

one

0

0

one

0

one

0

0

one

0

eleven

0.85

0.07

0.37

0.25

0.39

0.31

0.46

0

one

0

one

0

one

0

0

one

0

12

0.45

0.05

0.87

0.92

0.19

0.34

0.86

one

one

0

one

one

one

0

one

one

one

13

0.46

0.66

0.53

0.47

0.75

0.11

0.36

one

0

0

one

0

one

0

0

one

0

14

0.22

0.02

0.63

0.39

0.33

0.51

0.19

one

one

0

one

0

one

one

0

one

0

15

0.16

0.72

0.81

0.45

0.89

0.91

0.62

one

0

0

one

0

0

0

0

0

0

sixteen

0.25

0.50

0.15

0.59

0.50

0.45

0.18

one

0

one

one

0

one

one

one

one

one

17

0.53

0.11

0.33

0.52

0.83

0.45

0.56

0

0

0

one

0

one

0

0

one

0

18

0.65

0.96

0.58

0.58

0.47

0.58

0,69

0

0

0

one

0

one

0

0

one

0

nineteen

0.58

0.70

0.61

0.31

0.31

0.20

0.51

0

0

0

one

0

one

0

0

one

0

20

0.28

0.99

0.08

0.47

0.44

0.73

0.94

one

0

one

one

0

one

0

one

one

one

21

0.62

0.32

0.70

0.19

0.07

0.36

0.88

0

0

0

one

one

one

0

0

one

0

22

0.09

0.21

0.27

0.31

0.93

0.84

0.75

one

0

0

0

0

0

0

0

0

0

23

0.54

0.45

0.26

0.71

0.56

0.07

0.99

0

0

0

one

0

one

0

0

one

0

24

1.00

0.90

0.21

0.56

0.33

0.79

0.31

0

0

0

one

0

one

0

0

one

0

25

0.15

0.16

0.19

0.94

0.62

0.94

0.22

one

0

one

one

0

0

one

one

one

one

26

1.00

0.18

0.28

0.80

0.91

0.03

0.79

0

0

0

0

0

one

0

0

0

0

27

0.13

0.86

0.35

0.04

0.20

0.05

0.93

one

0

0

one

one

one

0

one

one

one

28

0.32

0.36

0.60

0.41

0.96

0.56

0.30

one

0

0

0

0

one

0

0

0

0

29

0.80

0.45

0.49

0.54

0.58

0.25

0.79

0

0

0

one

0

one

0

0

one

0

thirty

0.68

0.36

0.31

0.80

0.27

0.96

0.57

0

0

0

one

one

0

0

0

0

0

31

0.10

0.49

0.34

0.80

0.89

0.02

0.91

one

0

0

one

0

one

0

0

one

0

32

0.92

0.83

0.57

0.29

0.38

0.08

0.53

0

0

0

one

0

one

0

0

one

0

33

0.14

0.11

0.81

0.38

0.77

0.30

0.88

one

0

0

one

0

one

0

0

one

0

34

0.22

0.73

0.39

0.45

0.83

0.13

0.43

one

0

0

one

0

one

0

0

one

0

35

0.85

0.29

0.83

0.24

0.46

0.01

0.64

0

0

0

one

0

one

0

0

one

0

36

0.35

0.83

0.78

0.35

0.41

0.98

0.27

one

0

0

one

0

0

one

0

one

0

37

0.20

0.04

0.47

0.83

0.29

0.78

0.21

one

one

0

one

one

one

one

one

one

one

38

0.71

0.63

0.99

0.26

0.27

0.41

0.19

0

0

0

one

one

one

one

0

one

0

39

0.42

0.60

0.67

0.17

0.48

0.71

0,69

one

0

0

one

0

one

0

0

one

0

40

0.44

0.58

0.50

0.80

0.35

0.34

0.30

one

0

0

one

0

one

one

0

one

0

41

0.48

0.34

0.01

0.93

0.98

0.18

0.44

one

0

one

0

0

one

0

one

0

0

42

0.48

0,69

0.71

0.25

0.70

0.45

0.12

one

0

0

one

0

one

one

0

one

0

43

0.27

0.83

0.35

0.86

0.76

0.89

0.60

one

0

0

one

0

0

0

0

0

0

44

0.61

0.60

0.35

0.31

0.59

0.27

0.25

0

0

0

one

0

one

one

0

one

0

45

0.61

0.70

0.54

0.13

0.24

0.36

0.86

0

0

0

one

one

one

0

0

one

0

46

0.70

0.85

0.53

0.18

0.14

0.11

0.70

0

0

0

one

one

one

0

0

one

0

47

0.57

0.35

0.19

0.48

0.38

0.64

0.25

0

0

one

one

0

one

one

0

one

0

48

0.94

0.02

0.88

0.45

0.59

0.07

0.47

0

one

0

one

0

one

0

0

one

0

49

0.86

0.89

0.20

0.15

0.40

0.47

0.22

0

0

one

one

0

one

one

0

one

0

50

0.95

0.28

0.71

0.59

0.45

0.28

0.97

0

0

0

one

0

one

0

0

one

0

51

0.24

0.14

0.41

0.49

0.32

0.00

0.75

one

0

0

one

0

one

0

0

one

0

52

0.58

0.00

0.13

0.39

0.92

0.96

0.00

0

one

one

0

0

0

one

one

one

one

53

0.35

0.62

0.98

0.83

0.25

0.33

0.65

one

0

0

one

one

one

0

one

one

one

54

0.35

0.79

0.88

0.73

0.24

0.51

0.46

one

0

0

one

one

one

0

one

one

one

55

0.03

0.99

0.35

0.34

0.50

0.76

0.63

one

0

0

one

0

one

0

0

one

0

56

0.34

0.22

0.26

0.94

0.76

0.81

0.22

one

0

0

one

0

0

one

0

one

0

57

0.73

0.01

0.96

0.77

0.38

0.84

0.93

0

one

0

one

0

0

0

0

0

0

58

0.39

0.73

0.84

0.95

0.55

0.29

0.24

one

0

0

one

0

one

one

0

one

0

59

0.33

0.39

0.64

0.84

0.89

0.28

0.25

one

0

0

one

0

one

one

0

one

0

60

0.27

0.51

0.63

0.38

0.77

0.61

0.01

one

0

0

one

0

one

one

0

one

0

61

0.38

0.91

0.76

0.04

0.87

0.36

0.90

one

0

0

one

0

one

0

0

one

0

62

0.93

0.94

0.56

0.66

0.41

0.98

0.72

0

0

0

one

0

0

0

0

0

0

63

0.39

0.73

0.71

0.91

0.73

0.51

0.84

one

0

0

one

0

one

0

0

one

0

64

0.60

0.08

0.72

0.09

0.72

0.58

0.79

0

one

0

one

0

one

0

0

one

0

65

0.19

0.61

0.05

0.89

0.46

0.13

0.57

one

0

one

one

0

one

0

one

one

one

66

0.89

0.18

0.34

0.08

0.42

0.35

0.23

0

0

0

one

0

one

one

0

one

0

67

0.17

0.38

0.50

0.03

0.59

0.45

0.94

one

0

0

one

0

one

0

0

one

0

68

0.59

0.40

0.42

0.95

0.12

0.99

0.07

0

0

0

one

one

0

one

0

one

0

69

0.56

0.54

0.07

0.54

0.82

0.65

0.57

0

0

one

one

0

one

0

0

one

0

70

0.25

0.08

0.94

0.38

0.49

0.42

0.48

one

one

0

one

0

one

0

0

one

0

71

0.50

0.14

0.76

0.79

0.17

0.75

0.97

one

0

0

one

one

one

0

one

one

one

72

0.86

0.47

0.15

0.58

0.92

0.45

0.19

0

0

one

0

0

one

one

0

one

0

73

0.95

0.64

0.88

0.95

0.64

0.35

0.76

0

0

0

one

0

one

0

0

one

0

74

0.33

0.35

0.10

0.58

0.14

0.36

0.59

one

0

one

one

one

one

0

one

one

one

75

0.20

0.65

0.72

0.56

0.54

0.25

0.74

one

0

0

one

0

one

0

0

one

0

76

0.13

0.77

0.41

0.01

0.99

0.95

0.25

one

0

0

0

0

0

one

0

one

0

77

0.10

0.45

0.87

0.15

0.75

0.02

0.15

one

0

0

one

0

one

one

0

one

0

78

0.15

0.04

0.94

0.14

0.54

0.58

0,69

one

one

0

one

0

one

0

0

one

0

79

0.95

0.66

0.99

0.35

0.21

0.30

0.42

0

0

0

one

one

one

0

0

one

0

80

0.99

0.79

0.42

0.36

0.70

0.83

0.51

0

0

0

one

0

0

0

0

0

0

81

0.59

0.74

0.19

0.49

0.50

0.11

0.29

0

0

one

one

0

one

one

0

one

0

82

0.99

0.64

0.40

0.24

0.20

0.89

0.17

0

0

0

one

one

0

one

0

one

0

83

0.19

0.43

0.71

0.78

0.19

0.89

0.53

one

0

0

one

one

0

0

one

0

0

84

0.71

0,69

0.87

0.33

0.14

0.85

0.48

0

0

0

one

one

0

0

0

0

0

85

0.00

0.56

0.05

0.21

0.67

0.38

0.51

one

0

one

one

0

one

0

one

one

one

86

0.53

0.81

0.26

0.72

0.63

0.84

0.70

0

0

0

one

0

0

0

0

0

0

87

0.18

0.05

0.91

0.12

0.17

0.16

0.84

one

one

0

one

one

one

0

one

one

one

88

0.04

0.30

0.46

0.19

0.77

0.58

0.46

one

0

0

one

0

one

0

0

one

0

89

0.70

0.71

0.43

0.20

0.48

0.36

0.27

0

0

0

one

0

one

one

0

one

0

90

0.49

0.88

0.64

0.30

0.14

0.72

0.73

one

0

0

one

one

one

0

one

one

one

91

0.68

0.33

0.41

0.12

0.79

0.25

0.74

0

0

0

one

0

one

0

0

one

0

92

0.64

0.99

0.32

0.39

0.59

0.98

0.88

0

0

0

one

0

0

0

0

0

0

93

0.29

0.13

0.04

0.37

0.41

0.96

0.27

one

0

one

one

0

0

one

one

one

one

94

0.66

0.55

0.76

0.44

0.16

0.04

0.27

0

0

0

one

one

one

one

0

one

0

95

0.71

0.08

0.12

0.88

1.00

0.07

0.59

0

one

one

0

0

one

0

one

0

0

96

0.55

0.72

0.87

0.90

0.08

0.64

0.81

0

0

0

one

one

one

0

0

one

0

97

0.21

0.78

0.01

0.02

0,69

0.39

0.27

one

0

one

one

0

one

one

one

one

one

98

0.93

0.92

0.40

0.00

0.93

0.48

0.71

0

0

0

0

0

one

0

0

0

0

99

0.63

0.76

0.19

0.32

0.62

0.31

0.56

0

0

one

one

0

one

0

0

one

0

##

0.28

0.43

0.82

0.25

0.46

0.41

0.47

one

0

0

one

0

one

0

0

one

0

18

0.18

absolute error of failure-free operation of the system calculated by the Montecarlo method and the method of imitation modeling

| PP * | = | 0,1946-0.18 | = 0.01

created: 2016-02-03
updated: 2023-05-09
132556



Rating 9 of 10. count vote: 2
Are you satisfied?:



Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

System modeling

Terms: System modeling