1 |
4748b215
|
hbourbou
|
-- This file has been generated by CoCoSim2.
|
2 |
|
|
|
3 |
|
|
-- Compiler: Lustre compiler 2 (ToLustre.m)
|
4 |
|
|
-- Time: 03-Dec-2018 22:38:23
|
5 |
|
|
(*
|
6 |
|
|
Original block name: ForIterator_bio_bug_PP/ForIteratorSubsystem/IfActionSubsystem
|
7 |
|
|
*)
|
8 |
|
|
node IfActionSubsystem_73_071_automaton(SS_readings_1 : real;
|
9 |
|
|
_isEnabled : bool;
|
10 |
|
|
__time_step : real;
|
11 |
|
|
__nb_step : int;)
|
12 |
|
|
returns(H_1 : real;
|
13 |
|
|
y_1 : real;);
|
14 |
|
|
var pre_H_1 : real;
|
15 |
|
|
pre_y_1 : real;
|
16 |
|
|
let
|
17 |
|
|
pre_H_1 = 0.000000000000000;
|
18 |
|
|
pre_y_1 = 0.000000000000000;
|
19 |
|
|
automaton enabled_IfActionSubsystem_73_071
|
20 |
|
|
state Active_IfActionSubsystem_73_071:
|
21 |
|
|
unless (not _isEnabled) restart Inactive_IfActionSubsystem_73_071
|
22 |
|
|
let
|
23 |
|
|
(H_1, y_1) = IfActionSubsystem_73_071(SS_readings_1, __time_step, __nb_step);
|
24 |
|
|
tel
|
25 |
|
|
|
26 |
|
|
state Inactive_IfActionSubsystem_73_071:
|
27 |
|
|
unless _isEnabled restart Active_IfActionSubsystem_73_071
|
28 |
|
|
let
|
29 |
|
|
H_1 = pre_H_1;
|
30 |
|
|
y_1 = pre_y_1;
|
31 |
|
|
tel
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
tel
|
35 |
|
|
|
36 |
|
|
(*
|
37 |
|
|
Original block name: ForIterator_bio_bug_PP/ForIteratorSubsystem/IfActionSubsystem
|
38 |
|
|
*)
|
39 |
|
|
node IfActionSubsystem_73_071(SS_readings_1 : real;
|
40 |
|
|
__time_step : real;
|
41 |
|
|
__nb_step : int;)
|
42 |
|
|
returns(H_1 : real;
|
43 |
|
|
y_1 : real;);
|
44 |
|
|
var Constant4_1 : real;
|
45 |
|
|
Constant5_1 : real;
|
46 |
|
|
Divide_1 : real;
|
47 |
|
|
let
|
48 |
|
|
Constant4_1 = 1.000000000000000;
|
49 |
|
|
Constant5_1 = 1.000000000000000;
|
50 |
|
|
Divide_1 = 1.0 * SS_readings_1 / Constant4_1;
|
51 |
|
|
H_1 = Constant5_1;
|
52 |
|
|
y_1 = Divide_1;
|
53 |
|
|
tel
|
54 |
|
|
|
55 |
|
|
(*
|
56 |
|
|
Original block name: ForIterator_bio_bug_PP/ForIteratorSubsystem/IfActionSubsystem1
|
57 |
|
|
*)
|
58 |
|
|
node IfActionSubsystem1_86_275_automaton(_isEnabled : bool;
|
59 |
|
|
__time_step : real;
|
60 |
|
|
__nb_step : int;)
|
61 |
|
|
returns(H_1 : real;
|
62 |
|
|
y_1 : real;);
|
63 |
|
|
var pre_H_1 : real;
|
64 |
|
|
pre_y_1 : real;
|
65 |
|
|
let
|
66 |
|
|
pre_H_1 = 0.000000000000000;
|
67 |
|
|
pre_y_1 = 0.000000000000000;
|
68 |
|
|
automaton enabled_IfActionSubsystem1_86_275
|
69 |
|
|
state Active_IfActionSubsystem1_86_275:
|
70 |
|
|
unless (not _isEnabled) restart Inactive_IfActionSubsystem1_86_275
|
71 |
|
|
let
|
72 |
|
|
(H_1, y_1) = IfActionSubsystem1_86_275(__time_step, __nb_step);
|
73 |
|
|
tel
|
74 |
|
|
|
75 |
|
|
state Inactive_IfActionSubsystem1_86_275:
|
76 |
|
|
unless _isEnabled restart Active_IfActionSubsystem1_86_275
|
77 |
|
|
let
|
78 |
|
|
H_1 = pre_H_1;
|
79 |
|
|
y_1 = pre_y_1;
|
80 |
|
|
tel
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
tel
|
84 |
|
|
|
85 |
|
|
(*
|
86 |
|
|
Original block name: ForIterator_bio_bug_PP/ForIteratorSubsystem/IfActionSubsystem1
|
87 |
|
|
*)
|
88 |
|
|
node IfActionSubsystem1_86_275(__time_step : real;
|
89 |
|
|
__nb_step : int;)
|
90 |
|
|
returns(H_1 : real;
|
91 |
|
|
y_1 : real;);
|
92 |
|
|
var Constant_1 : real;
|
93 |
|
|
Constant1_1 : real;
|
94 |
|
|
let
|
95 |
|
|
Constant_1 = 0.000000000000000;
|
96 |
|
|
Constant1_1 = 0.000000000000000;
|
97 |
|
|
H_1 = Constant1_1;
|
98 |
|
|
y_1 = Constant_1;
|
99 |
|
|
tel
|
100 |
|
|
|
101 |
|
|
node ForIteratorSubsystem_67_061_iterator(SS_readings_1 : real;
|
102 |
|
|
__time_step : real;
|
103 |
|
|
__nb_step : int;)
|
104 |
|
|
returns(H_1 : real;
|
105 |
|
|
y_1 : real;);
|
106 |
|
|
var H_1_1 : real;
|
107 |
|
|
y_1_1 : real;
|
108 |
|
|
H_1_2 : real;
|
109 |
|
|
y_1_2 : real;
|
110 |
|
|
let
|
111 |
|
|
(H_1_1, y_1_1) = ForIteratorSubsystem_67_061(SS_readings_1, __time_step, __nb_step, 1);
|
112 |
|
|
(H_1_2, y_1_2) = ForIteratorSubsystem_67_061(SS_readings_1, __time_step, __nb_step, 2);
|
113 |
|
|
(H_1, y_1) = ForIteratorSubsystem_67_061(SS_readings_1, __time_step, __nb_step, 3);
|
114 |
|
|
tel
|
115 |
|
|
|
116 |
|
|
(*
|
117 |
|
|
Original block name: ForIterator_bio_bug_PP/ForIteratorSubsystem
|
118 |
|
|
*)
|
119 |
|
|
node ForIteratorSubsystem_67_061(SS_readings_1 : real;
|
120 |
|
|
__time_step : real;
|
121 |
|
|
__nb_step : int;
|
122 |
|
|
_iterationVariable : int;)
|
123 |
|
|
returns(H_1 : real;
|
124 |
|
|
y_1 : real;);
|
125 |
|
|
var Constant2_1 : real;
|
126 |
|
|
If_1 : bool;
|
127 |
|
|
If_2 : bool;
|
128 |
|
|
ExecutionCond_of_IfActionSubsystem_73_071 : bool;
|
129 |
|
|
IfActionSubsystem_1 : real;
|
130 |
|
|
IfActionSubsystem_2 : real;
|
131 |
|
|
ExecutionCond_of_IfActionSubsystem1_86_275 : bool;
|
132 |
|
|
IfActionSubsystem1_1 : real;
|
133 |
|
|
IfActionSubsystem1_2 : real;
|
134 |
|
|
Sum_1 : real;
|
135 |
|
|
Sum1_1 : real;
|
136 |
|
|
let
|
137 |
|
|
Constant2_1 = 0.500000000000000;
|
138 |
|
|
(If_1, If_2) = if SS_readings_1 > Constant2_1 then
|
139 |
|
|
(true, false)
|
140 |
|
|
else (false, true);
|
141 |
|
|
ExecutionCond_of_IfActionSubsystem_73_071 = If_1;
|
142 |
|
|
(IfActionSubsystem_1, IfActionSubsystem_2) = IfActionSubsystem_73_071_automaton(SS_readings_1, ExecutionCond_of_IfActionSubsystem_73_071, __time_step, __nb_step);
|
143 |
|
|
ExecutionCond_of_IfActionSubsystem1_86_275 = If_2;
|
144 |
|
|
(IfActionSubsystem1_1, IfActionSubsystem1_2) = IfActionSubsystem1_86_275_automaton(ExecutionCond_of_IfActionSubsystem1_86_275, __time_step, __nb_step);
|
145 |
|
|
Sum_1 = 0.0 + IfActionSubsystem_2 + IfActionSubsystem1_2;
|
146 |
|
|
Sum1_1 = 0.0 + IfActionSubsystem_1 + IfActionSubsystem1_1;
|
147 |
|
|
H_1 = Sum1_1;
|
148 |
|
|
y_1 = Sum_1;
|
149 |
|
|
tel
|
150 |
|
|
|
151 |
|
|
(*
|
152 |
|
|
Original block name: ForIterator_bio_bug_PP
|
153 |
|
|
*)
|
154 |
|
|
node ForIterator_bio_bug_PP(In1_1 : real;)
|
155 |
|
|
returns(Out1_1 : real;
|
156 |
|
|
Out2_1 : real;);
|
157 |
|
|
var ForIteratorSubsystem_1 : real;
|
158 |
|
|
ForIteratorSubsystem_2 : real;
|
159 |
|
|
__time_step : real;
|
160 |
|
|
__nb_step : int;
|
161 |
|
|
let
|
162 |
|
|
(ForIteratorSubsystem_1, ForIteratorSubsystem_2) = ForIteratorSubsystem_67_061_iterator(In1_1, __time_step, __nb_step);
|
163 |
|
|
Out1_1 = ForIteratorSubsystem_1;
|
164 |
|
|
Out2_1 = ForIteratorSubsystem_2;
|
165 |
|
|
__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
|
166 |
|
|
__nb_step = (0 -> ((pre __nb_step) + 1));
|
167 |
|
|
tel
|