-
Notifications
You must be signed in to change notification settings - Fork 0
/
hds.rct
102 lines (100 loc) · 1.78 KB
/
hds.rct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
stm ODSSTM {
requires stateInf
const p_ods_green : real
const p_ods_yellow : real
initial i0
state NoHumanDetected {
entry sods = SODS :: noHumanDetected
}
state HumanDetectedInYellow {
entry sods = SODS :: humanDetectedInYellow
}
state HumanDetectedInGreen {
entry sods = SODS :: humanDetectedInGreen
}
event tick
probabilistic p0
probabilistic p1
probabilistic p2
probabilistic p3
transition t0 {
from i0
to NoHumanDetected
}
transition t1 {
from NoHumanDetected
to p0
trigger tick
condition shuman == SHuman :: inGreen
}
transition t2 {
from p0
to HumanDetectedInGreen
probability p_ods_green
}
transition t3 {
from p0
to NoHumanDetected
probability 1 - p_ods_green
}
transition t4 {
from NoHumanDetected
to p1
trigger tick
condition shuman == SHuman :: inYellow
}
transition t5 {
from p1
to HumanDetectedInYellow
probability p_ods_yellow
}
transition t6 {
from p1
to NoHumanDetected
probability 1 - p_ods_yellow
}
transition t7 {
from HumanDetectedInGreen
to p2
trigger tick
condition shuman == SHuman :: inYellow
}
transition t8 {
from p2
to HumanDetectedInYellow
probability p_ods_yellow
}
transition t9 {
from p2
to HumanDetectedInGreen
probability 1 - p_ods_yellow
}
transition t10 {
from HumanDetectedInGreen
to NoHumanDetected
trigger tick
condition shuman == SHuman :: outOfRange
}
transition t11 {
from HumanDetectedInYellow
to NoHumanDetected
trigger tick
condition shuman == SHuman :: outOfRange
}
transition t12 {
from HumanDetectedInYellow
to p3
trigger tick
condition shuman == SHuman :: inGreen
}
transition t13 {
from p3
to HumanDetectedInGreen
probability p_ods_green
}
transition t14 {
from p3
to HumanDetectedInYellow
probability 1 - p_ods_green
}
}