1 |
4748b215
|
hbourbou
|
-- This file has been generated by CoCoSim2.
|
2 |
|
|
|
3 |
|
|
-- Compiler: Lustre compiler 2 (ToLustre.m)
|
4 |
|
|
-- Time: 03-Dec-2018 22:06:06
|
5 |
|
|
(*
|
6 |
|
|
Original block name: if_multi_test_PP/IfActionSubsystem4
|
7 |
|
|
*)
|
8 |
|
|
node IfActionSubsystem4_74_009_automaton(In2_1 : real;
|
9 |
|
|
In2_2 : real;
|
10 |
|
|
In2_3 : real;
|
11 |
|
|
In3_1 : bool;
|
12 |
|
|
_isEnabled : bool;
|
13 |
|
|
__time_step : real;
|
14 |
|
|
__nb_step : int;)
|
15 |
|
|
returns(Out2_1 : bool;
|
16 |
|
|
Out2_2 : bool;
|
17 |
|
|
Out2_3 : bool;
|
18 |
|
|
Out3_1 : real;
|
19 |
|
|
Out3_2 : real;
|
20 |
|
|
Out3_3 : real;
|
21 |
|
|
Out4_1 : bool;
|
22 |
|
|
Out4_2 : bool;
|
23 |
|
|
Out4_3 : bool;);
|
24 |
|
|
var pre_Out2_1 : bool;
|
25 |
|
|
pre_Out2_2 : bool;
|
26 |
|
|
pre_Out2_3 : bool;
|
27 |
|
|
pre_Out3_1 : real;
|
28 |
|
|
pre_Out3_2 : real;
|
29 |
|
|
pre_Out3_3 : real;
|
30 |
|
|
pre_Out4_1 : bool;
|
31 |
|
|
pre_Out4_2 : bool;
|
32 |
|
|
pre_Out4_3 : bool;
|
33 |
|
|
let
|
34 |
|
|
pre_Out2_1 = if (__nb_step > 0) then
|
35 |
|
|
(pre Out2_1)
|
36 |
|
|
else false;
|
37 |
|
|
pre_Out2_2 = if (__nb_step > 0) then
|
38 |
|
|
(pre Out2_2)
|
39 |
|
|
else false;
|
40 |
|
|
pre_Out2_3 = if (__nb_step > 0) then
|
41 |
|
|
(pre Out2_3)
|
42 |
|
|
else false;
|
43 |
|
|
pre_Out3_1 = if (__nb_step > 0) then
|
44 |
|
|
(pre Out3_1)
|
45 |
|
|
else 0.000000000000000;
|
46 |
|
|
pre_Out3_2 = if (__nb_step > 0) then
|
47 |
|
|
(pre Out3_2)
|
48 |
|
|
else 0.000000000000000;
|
49 |
|
|
pre_Out3_3 = if (__nb_step > 0) then
|
50 |
|
|
(pre Out3_3)
|
51 |
|
|
else 0.000000000000000;
|
52 |
|
|
pre_Out4_1 = if (__nb_step > 0) then
|
53 |
|
|
(pre Out4_1)
|
54 |
|
|
else false;
|
55 |
|
|
pre_Out4_2 = if (__nb_step > 0) then
|
56 |
|
|
(pre Out4_2)
|
57 |
|
|
else false;
|
58 |
|
|
pre_Out4_3 = if (__nb_step > 0) then
|
59 |
|
|
(pre Out4_3)
|
60 |
|
|
else false;
|
61 |
|
|
automaton enabled_IfActionSubsystem4_74_009
|
62 |
|
|
state Active_IfActionSubsystem4_74_009:
|
63 |
|
|
unless (not _isEnabled) restart Inactive_IfActionSubsystem4_74_009
|
64 |
|
|
let
|
65 |
|
|
(Out2_1, Out2_2, Out2_3, Out3_1, Out3_2, Out3_3, Out4_1, Out4_2, Out4_3) = IfActionSubsystem4_74_009(In2_1, In2_2, In2_3, In3_1, __time_step, __nb_step);
|
66 |
|
|
tel
|
67 |
|
|
|
68 |
|
|
state Inactive_IfActionSubsystem4_74_009:
|
69 |
|
|
unless _isEnabled resume Active_IfActionSubsystem4_74_009
|
70 |
|
|
let
|
71 |
|
|
Out2_1 = pre_Out2_1;
|
72 |
|
|
Out2_2 = pre_Out2_2;
|
73 |
|
|
Out2_3 = pre_Out2_3;
|
74 |
|
|
Out3_1 = pre_Out3_1;
|
75 |
|
|
Out3_2 = pre_Out3_2;
|
76 |
|
|
Out3_3 = pre_Out3_3;
|
77 |
|
|
Out4_1 = pre_Out4_1;
|
78 |
|
|
Out4_2 = pre_Out4_2;
|
79 |
|
|
Out4_3 = pre_Out4_3;
|
80 |
|
|
tel
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
tel
|
84 |
|
|
|
85 |
|
|
(*
|
86 |
|
|
Original block name: if_multi_test_PP/IfActionSubsystem4
|
87 |
|
|
*)
|
88 |
|
|
node IfActionSubsystem4_74_009(In2_1 : real;
|
89 |
|
|
In2_2 : real;
|
90 |
|
|
In2_3 : real;
|
91 |
|
|
In3_1 : bool;
|
92 |
|
|
__time_step : real;
|
93 |
|
|
__nb_step : int;)
|
94 |
|
|
returns(Out2_1 : bool;
|
95 |
|
|
Out2_2 : bool;
|
96 |
|
|
Out2_3 : bool;
|
97 |
|
|
Out3_1 : real;
|
98 |
|
|
Out3_2 : real;
|
99 |
|
|
Out3_3 : real;
|
100 |
|
|
Out4_1 : bool;
|
101 |
|
|
Out4_2 : bool;
|
102 |
|
|
Out4_3 : bool;);
|
103 |
|
|
var LogicalOperator_1 : bool;
|
104 |
|
|
LogicalOperator_2 : bool;
|
105 |
|
|
LogicalOperator_3 : bool;
|
106 |
|
|
RelationalOperator_1 : bool;
|
107 |
|
|
RelationalOperator_2 : bool;
|
108 |
|
|
RelationalOperator_3 : bool;
|
109 |
|
|
let
|
110 |
|
|
LogicalOperator_1 = ( RelationalOperator_1 and In3_1 );
|
111 |
|
|
LogicalOperator_2 = ( RelationalOperator_2 and In3_1 );
|
112 |
|
|
LogicalOperator_3 = ( RelationalOperator_3 and In3_1 );
|
113 |
|
|
RelationalOperator_1 = (In2_1 <= In2_1);
|
114 |
|
|
RelationalOperator_2 = (In2_2 <= In2_2);
|
115 |
|
|
RelationalOperator_3 = (In2_3 <= In2_3);
|
116 |
|
|
Out2_1 = RelationalOperator_1;
|
117 |
|
|
Out2_2 = RelationalOperator_2;
|
118 |
|
|
Out2_3 = RelationalOperator_3;
|
119 |
|
|
Out3_1 = In2_1;
|
120 |
|
|
Out3_2 = In2_2;
|
121 |
|
|
Out3_3 = In2_3;
|
122 |
|
|
Out4_1 = LogicalOperator_1;
|
123 |
|
|
Out4_2 = LogicalOperator_2;
|
124 |
|
|
Out4_3 = LogicalOperator_3;
|
125 |
|
|
tel
|
126 |
|
|
|
127 |
|
|
(*
|
128 |
|
|
Original block name: if_multi_test_PP/IfActionSubsystem5
|
129 |
|
|
*)
|
130 |
|
|
node IfActionSubsystem5_93_008_automaton(In1_1 : real;
|
131 |
|
|
In1_2 : real;
|
132 |
|
|
In1_3 : real;
|
133 |
|
|
_isEnabled : bool;
|
134 |
|
|
__time_step : real;
|
135 |
|
|
__nb_step : int;)
|
136 |
|
|
returns(Out1_1 : real;
|
137 |
|
|
Out1_2 : real;
|
138 |
|
|
Out1_3 : real;);
|
139 |
|
|
var pre_Out1_1 : real;
|
140 |
|
|
pre_Out1_2 : real;
|
141 |
|
|
pre_Out1_3 : real;
|
142 |
|
|
let
|
143 |
|
|
pre_Out1_1 = if (__nb_step > 0) then
|
144 |
|
|
(pre Out1_1)
|
145 |
|
|
else 0.000000000000000;
|
146 |
|
|
pre_Out1_2 = if (__nb_step > 0) then
|
147 |
|
|
(pre Out1_2)
|
148 |
|
|
else 0.000000000000000;
|
149 |
|
|
pre_Out1_3 = if (__nb_step > 0) then
|
150 |
|
|
(pre Out1_3)
|
151 |
|
|
else 0.000000000000000;
|
152 |
|
|
automaton enabled_IfActionSubsystem5_93_008
|
153 |
|
|
state Active_IfActionSubsystem5_93_008:
|
154 |
|
|
unless (not _isEnabled) restart Inactive_IfActionSubsystem5_93_008
|
155 |
|
|
let
|
156 |
|
|
(Out1_1, Out1_2, Out1_3) = IfActionSubsystem5_93_008(In1_1, In1_2, In1_3, __time_step, __nb_step);
|
157 |
|
|
tel
|
158 |
|
|
|
159 |
|
|
state Inactive_IfActionSubsystem5_93_008:
|
160 |
|
|
unless _isEnabled resume Active_IfActionSubsystem5_93_008
|
161 |
|
|
let
|
162 |
|
|
Out1_1 = pre_Out1_1;
|
163 |
|
|
Out1_2 = pre_Out1_2;
|
164 |
|
|
Out1_3 = pre_Out1_3;
|
165 |
|
|
tel
|
166 |
|
|
|
167 |
|
|
|
168 |
|
|
tel
|
169 |
|
|
|
170 |
|
|
(*
|
171 |
|
|
Original block name: if_multi_test_PP/IfActionSubsystem5
|
172 |
|
|
*)
|
173 |
|
|
node IfActionSubsystem5_93_008(In1_1 : real;
|
174 |
|
|
In1_2 : real;
|
175 |
|
|
In1_3 : real;
|
176 |
|
|
__time_step : real;
|
177 |
|
|
__nb_step : int;)
|
178 |
|
|
returns(Out1_1 : real;
|
179 |
|
|
Out1_2 : real;
|
180 |
|
|
Out1_3 : real;);
|
181 |
|
|
let
|
182 |
|
|
Out1_1 = In1_1;
|
183 |
|
|
Out1_2 = In1_2;
|
184 |
|
|
Out1_3 = In1_3;
|
185 |
|
|
tel
|
186 |
|
|
|
187 |
|
|
(*
|
188 |
|
|
Original block name: if_multi_test_PP/IfActionSubsystem6
|
189 |
|
|
*)
|
190 |
|
|
node IfActionSubsystem6_98_007_automaton(In1_1 : bool;
|
191 |
|
|
_isEnabled : bool;
|
192 |
|
|
__time_step : real;
|
193 |
|
|
__nb_step : int;)
|
194 |
|
|
returns(Out1_1 : bool;);
|
195 |
|
|
var pre_Out1_1 : bool;
|
196 |
|
|
let
|
197 |
|
|
pre_Out1_1 = if (__nb_step > 0) then
|
198 |
|
|
(pre Out1_1)
|
199 |
|
|
else false;
|
200 |
|
|
automaton enabled_IfActionSubsystem6_98_007
|
201 |
|
|
state Active_IfActionSubsystem6_98_007:
|
202 |
|
|
unless (not _isEnabled) restart Inactive_IfActionSubsystem6_98_007
|
203 |
|
|
let
|
204 |
|
|
Out1_1 = IfActionSubsystem6_98_007(In1_1, __time_step, __nb_step);
|
205 |
|
|
tel
|
206 |
|
|
|
207 |
|
|
state Inactive_IfActionSubsystem6_98_007:
|
208 |
|
|
unless _isEnabled resume Active_IfActionSubsystem6_98_007
|
209 |
|
|
let
|
210 |
|
|
Out1_1 = pre_Out1_1;
|
211 |
|
|
tel
|
212 |
|
|
|
213 |
|
|
|
214 |
|
|
tel
|
215 |
|
|
|
216 |
|
|
(*
|
217 |
|
|
Original block name: if_multi_test_PP/IfActionSubsystem6
|
218 |
|
|
*)
|
219 |
|
|
node IfActionSubsystem6_98_007(In1_1 : bool;
|
220 |
|
|
__time_step : real;
|
221 |
|
|
__nb_step : int;)
|
222 |
|
|
returns(Out1_1 : bool;);
|
223 |
|
|
let
|
224 |
|
|
Out1_1 = In1_1;
|
225 |
|
|
tel
|
226 |
|
|
|
227 |
|
|
(*
|
228 |
|
|
Original block name: if_multi_test_PP/IfActionSubsystem7
|
229 |
|
|
*)
|
230 |
|
|
node IfActionSubsystem7_103_007_automaton(In1_1 : real;
|
231 |
|
|
In1_2 : real;
|
232 |
|
|
In1_3 : real;
|
233 |
|
|
In1_4 : real;
|
234 |
|
|
_isEnabled : bool;
|
235 |
|
|
__time_step : real;
|
236 |
|
|
__nb_step : int;)
|
237 |
|
|
returns(Out1_1 : real;
|
238 |
|
|
Out1_2 : real;
|
239 |
|
|
Out1_3 : real;
|
240 |
|
|
Out1_4 : real;);
|
241 |
|
|
var pre_Out1_1 : real;
|
242 |
|
|
pre_Out1_2 : real;
|
243 |
|
|
pre_Out1_3 : real;
|
244 |
|
|
pre_Out1_4 : real;
|
245 |
|
|
let
|
246 |
|
|
pre_Out1_1 = if (__nb_step > 0) then
|
247 |
|
|
(pre Out1_1)
|
248 |
|
|
else 0.000000000000000;
|
249 |
|
|
pre_Out1_2 = if (__nb_step > 0) then
|
250 |
|
|
(pre Out1_2)
|
251 |
|
|
else 0.000000000000000;
|
252 |
|
|
pre_Out1_3 = if (__nb_step > 0) then
|
253 |
|
|
(pre Out1_3)
|
254 |
|
|
else 0.000000000000000;
|
255 |
|
|
pre_Out1_4 = if (__nb_step > 0) then
|
256 |
|
|
(pre Out1_4)
|
257 |
|
|
else 0.000000000000000;
|
258 |
|
|
automaton enabled_IfActionSubsystem7_103_007
|
259 |
|
|
state Active_IfActionSubsystem7_103_007:
|
260 |
|
|
unless (not _isEnabled) restart Inactive_IfActionSubsystem7_103_007
|
261 |
|
|
let
|
262 |
|
|
(Out1_1, Out1_2, Out1_3, Out1_4) = IfActionSubsystem7_103_007(In1_1, In1_2, In1_3, In1_4, __time_step, __nb_step);
|
263 |
|
|
tel
|
264 |
|
|
|
265 |
|
|
state Inactive_IfActionSubsystem7_103_007:
|
266 |
|
|
unless _isEnabled resume Active_IfActionSubsystem7_103_007
|
267 |
|
|
let
|
268 |
|
|
Out1_1 = pre_Out1_1;
|
269 |
|
|
Out1_2 = pre_Out1_2;
|
270 |
|
|
Out1_3 = pre_Out1_3;
|
271 |
|
|
Out1_4 = pre_Out1_4;
|
272 |
|
|
tel
|
273 |
|
|
|
274 |
|
|
|
275 |
|
|
tel
|
276 |
|
|
|
277 |
|
|
(*
|
278 |
|
|
Original block name: if_multi_test_PP/IfActionSubsystem7
|
279 |
|
|
*)
|
280 |
|
|
node IfActionSubsystem7_103_007(In1_1 : real;
|
281 |
|
|
In1_2 : real;
|
282 |
|
|
In1_3 : real;
|
283 |
|
|
In1_4 : real;
|
284 |
|
|
__time_step : real;
|
285 |
|
|
__nb_step : int;)
|
286 |
|
|
returns(Out1_1 : real;
|
287 |
|
|
Out1_2 : real;
|
288 |
|
|
Out1_3 : real;
|
289 |
|
|
Out1_4 : real;);
|
290 |
|
|
let
|
291 |
|
|
Out1_1 = In1_1;
|
292 |
|
|
Out1_2 = In1_2;
|
293 |
|
|
Out1_3 = In1_3;
|
294 |
|
|
Out1_4 = In1_4;
|
295 |
|
|
tel
|
296 |
|
|
|
297 |
|
|
(*
|
298 |
|
|
Original block name: if_multi_test_PP
|
299 |
|
|
*)
|
300 |
|
|
node if_multi_test_PP(In3_1 : real;
|
301 |
|
|
In3_2 : real;
|
302 |
|
|
In3_3 : real;
|
303 |
|
|
In4_1 : bool;
|
304 |
|
|
In5_1 : real;
|
305 |
|
|
In5_2 : real;
|
306 |
|
|
In5_3 : real;
|
307 |
|
|
In5_4 : real;)
|
308 |
|
|
returns(Out5_1 : bool;
|
309 |
|
|
Out5_2 : bool;
|
310 |
|
|
Out5_3 : bool;
|
311 |
|
|
Out6_1 : real;
|
312 |
|
|
Out6_2 : real;
|
313 |
|
|
Out6_3 : real;
|
314 |
|
|
Out7_1 : real;
|
315 |
|
|
Out7_2 : real;
|
316 |
|
|
Out7_3 : real;
|
317 |
|
|
Out8_1 : bool;
|
318 |
|
|
Out8_2 : bool;
|
319 |
|
|
Out8_3 : bool;
|
320 |
|
|
Out9_1 : bool;
|
321 |
|
|
Out10_1 : real;
|
322 |
|
|
Out10_2 : real;
|
323 |
|
|
Out10_3 : real;
|
324 |
|
|
Out10_4 : real;);
|
325 |
|
|
var If1_1 : bool;
|
326 |
|
|
If1_2 : bool;
|
327 |
|
|
If1_3 : bool;
|
328 |
|
|
If1_4 : bool;
|
329 |
|
|
ExecutionCond_of_IfActionSubsystem4_74_009 : bool;
|
330 |
|
|
IfActionSubsystem4_1 : bool;
|
331 |
|
|
IfActionSubsystem4_2 : bool;
|
332 |
|
|
IfActionSubsystem4_3 : bool;
|
333 |
|
|
IfActionSubsystem4_4 : real;
|
334 |
|
|
IfActionSubsystem4_5 : real;
|
335 |
|
|
IfActionSubsystem4_6 : real;
|
336 |
|
|
IfActionSubsystem4_7 : bool;
|
337 |
|
|
IfActionSubsystem4_8 : bool;
|
338 |
|
|
IfActionSubsystem4_9 : bool;
|
339 |
|
|
ExecutionCond_of_IfActionSubsystem5_93_008 : bool;
|
340 |
|
|
IfActionSubsystem5_1 : real;
|
341 |
|
|
IfActionSubsystem5_2 : real;
|
342 |
|
|
IfActionSubsystem5_3 : real;
|
343 |
|
|
ExecutionCond_of_IfActionSubsystem6_98_007 : bool;
|
344 |
|
|
IfActionSubsystem6_1 : bool;
|
345 |
|
|
ExecutionCond_of_IfActionSubsystem7_103_007 : bool;
|
346 |
|
|
IfActionSubsystem7_1 : real;
|
347 |
|
|
IfActionSubsystem7_2 : real;
|
348 |
|
|
IfActionSubsystem7_3 : real;
|
349 |
|
|
IfActionSubsystem7_4 : real;
|
350 |
|
|
__time_step : real;
|
351 |
|
|
__nb_step : int;
|
352 |
|
|
let
|
353 |
|
|
(If1_1, If1_2, If1_3, If1_4) = if In3_2 = 0.000000000000000 then
|
354 |
|
|
(true, false, false, false)
|
355 |
|
|
else if In5_2 < 3.000000000000000 then
|
356 |
|
|
(false, true, false, false)
|
357 |
|
|
else if ( - In5_1 > In3_3 ) and In5_2 > 0.000000000000000 then
|
358 |
|
|
(false, false, true, false)
|
359 |
|
|
else (false, false, false, true);
|
360 |
|
|
ExecutionCond_of_IfActionSubsystem4_74_009 = If1_1;
|
361 |
|
|
(IfActionSubsystem4_1, IfActionSubsystem4_2, IfActionSubsystem4_3, IfActionSubsystem4_4, IfActionSubsystem4_5, IfActionSubsystem4_6, IfActionSubsystem4_7, IfActionSubsystem4_8, IfActionSubsystem4_9) = IfActionSubsystem4_74_009_automaton(In3_1, In3_2, In3_3, In4_1, ExecutionCond_of_IfActionSubsystem4_74_009, __time_step, __nb_step);
|
362 |
|
|
ExecutionCond_of_IfActionSubsystem5_93_008 = If1_4;
|
363 |
|
|
(IfActionSubsystem5_1, IfActionSubsystem5_2, IfActionSubsystem5_3) = IfActionSubsystem5_93_008_automaton(In3_1, In3_2, In3_3, ExecutionCond_of_IfActionSubsystem5_93_008, __time_step, __nb_step);
|
364 |
|
|
ExecutionCond_of_IfActionSubsystem6_98_007 = If1_2;
|
365 |
|
|
IfActionSubsystem6_1 = IfActionSubsystem6_98_007_automaton(In4_1, ExecutionCond_of_IfActionSubsystem6_98_007, __time_step, __nb_step);
|
366 |
|
|
ExecutionCond_of_IfActionSubsystem7_103_007 = If1_3;
|
367 |
|
|
(IfActionSubsystem7_1, IfActionSubsystem7_2, IfActionSubsystem7_3, IfActionSubsystem7_4) = IfActionSubsystem7_103_007_automaton(In5_1, In5_2, In5_3, In5_4, ExecutionCond_of_IfActionSubsystem7_103_007, __time_step, __nb_step);
|
368 |
|
|
Out5_1 = IfActionSubsystem4_1;
|
369 |
|
|
Out5_2 = IfActionSubsystem4_2;
|
370 |
|
|
Out5_3 = IfActionSubsystem4_3;
|
371 |
|
|
Out6_1 = IfActionSubsystem5_1;
|
372 |
|
|
Out6_2 = IfActionSubsystem5_2;
|
373 |
|
|
Out6_3 = IfActionSubsystem5_3;
|
374 |
|
|
Out7_1 = IfActionSubsystem4_4;
|
375 |
|
|
Out7_2 = IfActionSubsystem4_5;
|
376 |
|
|
Out7_3 = IfActionSubsystem4_6;
|
377 |
|
|
Out8_1 = IfActionSubsystem4_7;
|
378 |
|
|
Out8_2 = IfActionSubsystem4_8;
|
379 |
|
|
Out8_3 = IfActionSubsystem4_9;
|
380 |
|
|
Out9_1 = IfActionSubsystem6_1;
|
381 |
|
|
Out10_1 = IfActionSubsystem7_1;
|
382 |
|
|
Out10_2 = IfActionSubsystem7_2;
|
383 |
|
|
Out10_3 = IfActionSubsystem7_3;
|
384 |
|
|
Out10_4 = IfActionSubsystem7_4;
|
385 |
|
|
__time_step = (0.0 -> ((pre __time_step) + 0.020000000000000));
|
386 |
|
|
__nb_step = (0 -> ((pre __nb_step) + 1));
|
387 |
|
|
tel
|