-
Notifications
You must be signed in to change notification settings - Fork 1
/
masterModel.conf
176 lines (123 loc) · 3.61 KB
/
masterModel.conf
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name = Master algorithm for the Incubator example.
scenario = {
fmus = {
Room_r = {
inputs = {
},
outputs = {
T_room_out = {dependencies-init=[], dependencies=[]}}
}
Plant_p = {
inputs = {
heater_on_in = {reactivity=delayed}
T_room_in = {reactivity=delayed}},
outputs = {
T_bair_out = {dependencies-init=[], dependencies=[]}}
}
Supervisor_s = {
inputs = {
T_heater_in = {reactivity=reactive}
T_room_in = {reactivity=reactive}
T_bair_in = {reactivity=reactive}
T_bair_plant_in = {reactivity=reactive}
heater_on_in = {reactivity=reactive}},
outputs = {
H_out = {dependencies-init=[], dependencies=[]}
UL_out = {dependencies-init=[], dependencies=[]}
LL_out = {dependencies-init=[], dependencies=[]}
C_out = {dependencies-init=[], dependencies=[]}}
}
KalmanFilter_k = {
inputs = {
T_room_in = {reactivity=reactive}
T_bair_in = {reactivity=reactive}
heater_on_in = {reactivity=reactive}},
outputs = {
T_heater_out = {dependencies-init=[T_bair_in], dependencies=[]}
T_bair_out = {dependencies-init=[T_bair_in], dependencies=[]}}
}
Controller_c = {
inputs = {
LL_in = {reactivity=delayed}
UL_in = {reactivity=delayed}
T_bair_in = {reactivity=delayed}
H_in = {reactivity=delayed}
C_in = {reactivity=delayed}},
outputs = {
heater_on_out = {dependencies-init=[], dependencies=[]}}
}}
connections = [
Controller_c.heater_on_out -> Plant_p.heater_on_in
Controller_c.heater_on_out -> KalmanFilter_k.heater_on_in
Supervisor_s.LL_out -> Controller_c.LL_in
Supervisor_s.UL_out -> Controller_c.UL_in
Supervisor_s.H_out -> Controller_c.H_in
Supervisor_s.C_out -> Controller_c.C_in
Plant_p.T_bair_out -> Controller_c.T_bair_in
Plant_p.T_bair_out -> KalmanFilter_k.T_bair_in
Plant_p.T_bair_out -> Supervisor_s.T_bair_plant_in
Room_r.T_room_out -> Plant_p.T_room_in
Room_r.T_room_out -> KalmanFilter_k.T_room_in
Room_r.T_room_out -> Supervisor_s.T_room_in
KalmanFilter_k.T_heater_out -> Supervisor_s.T_heater_in
KalmanFilter_k.T_bair_out -> Supervisor_s.T_bair_in
Controller_c.heater_on_out -> Supervisor_s.heater_on_in]
}
initialization = [
{get: Supervisor_s.C_out}
{set: Controller_c.C_in}
{get: Plant_p.T_bair_out}
# Mistake is here: the following two instructions are flipped
{get: KalmanFilter_k.T_bair_out}
{set: KalmanFilter_k.T_bair_in}
{set: Supervisor_s.T_bair_in}
{set: Supervisor_s.T_bair_plant_in}
{set: Controller_c.T_bair_in}
{get: KalmanFilter_k.T_heater_out}
{set: Supervisor_s.T_heater_in}
{get: Supervisor_s.UL_out}
{set: Controller_c.UL_in}
{get: Supervisor_s.H_out}
{set: Controller_c.H_in}
{get: Supervisor_s.LL_out}
{set: Controller_c.LL_in}
{get: Room_r.T_room_out}
{set: Supervisor_s.T_room_in}
{set: KalmanFilter_k.T_room_in}
{set: Plant_p.T_room_in}
{get: Controller_c.heater_on_out}
{set: Supervisor_s.heater_on_in}
{set: Plant_p.heater_on_in}
{set: KalmanFilter_k.heater_on_in}
]
cosim-step = {conf1 = [{step: Room_r }
{get: Room_r.T_room_out}
{set: Supervisor_s.T_room_in}
{step: Plant_p }
{get: Plant_p.T_bair_out}
{set: Supervisor_s.T_bair_plant_in}
{set: Plant_p.T_room_in}
{set: KalmanFilter_k.T_bair_in}
{step: Controller_c }
{set: Controller_c.T_bair_in}
{set: KalmanFilter_k.T_room_in}
{get: Controller_c.heater_on_out}
{set: Supervisor_s.heater_on_in}
{set: Plant_p.heater_on_in}
{set: KalmanFilter_k.heater_on_in}
{step: KalmanFilter_k }
{get: KalmanFilter_k.T_bair_out}
{set: Supervisor_s.T_bair_in}
{get: KalmanFilter_k.T_heater_out}
{set: Supervisor_s.T_heater_in}
{step: Supervisor_s }
{get: Supervisor_s.H_out}
{set: Controller_c.H_in}
{get: Supervisor_s.LL_out}
{set: Controller_c.LL_in}
{get: Supervisor_s.UL_out}
{set: Controller_c.UL_in}
{get: Supervisor_s.C_out}
{set: Controller_c.C_in}
]
}