Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / kind_fmcad08 / large / cruise_controller_05.lus @ 9b45f3df

History | View | Annotate | Download (65.9 KB)

1 fa9e78e5 bourbouh
2
3
node top(onOff: bool; 
4
      decelSet: bool; 
5
      accelResume: bool; 
6
      cancel: bool; 
7
      brakePedal: bool; 
8
      carGear: int; 
9
      carSpeed: real; 
10
      validInputs: bool)
11
   returns (OK:bool);
12
13 2d37a1e1 ploc
--@ contract guarantees OK;
14 fa9e78e5 bourbouh
var
15 9b45f3df ploc
mode_: int; 
16 fa9e78e5 bourbouh
      cruiseThrottle: real; 
17
      desiredSpeed: real;
18
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_clock: bool; 
19
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_init_step: bool; 
20
   newDesiredSpeed1: real; 
21
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_clock: bool; 
22
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_init_step: bool; 
23
   newDesiredSpeed: real; 
24 9b45f3df ploc
   chart_CruiseController_ModeLogic_mode__logic_onOff: int; 
25
   chart_CruiseController_ModeLogic_mode__logic_decel: int; 
26
   chart_CruiseController_ModeLogic_mode__logic_set: int; 
27
   chart_CruiseController_ModeLogic_mode__logic_accel: int; 
28
   chart_CruiseController_ModeLogic_mode__logic_safetyCondition: int; 
29
   chart_CruiseController_ModeLogic_mode__logic____wakeup___: bool; 
30
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_0: bool; 
31
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_2_states___root: int; 
32
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_2_outports_setDesiredSpeed: int; 
33
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root: int; 
34
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_1: bool; 
35
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_complete_1: bool; 
36
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_states___root: int; 
37
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_outports_mode_: int; 
38
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_outports_setDesiredSpeed: int; 
39
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_5_states___root: int; 
40
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_2: bool; 
41
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_complete_2: bool; 
42
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_6_states___root: int; 
43
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_6_outports_mode_: int; 
44
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_7_states___root: int; 
45
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_3: bool; 
46
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_complete_3: bool; 
47
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_8_states___root: int; 
48
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_8_outports_mode_: int; 
49
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_9_states___root: int; 
50
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_9_outports_mode_: int; 
51
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_4: bool; 
52
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_10_states___root: int; 
53
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_15_states___root: int; 
54
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root2: int; 
55
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_02: bool; 
56
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rltCheckEntryStateConsistency_02: bool; 
57
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root2: int; 
58
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root1: int; 
59
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_01: bool; 
60
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rltCheckEntryStateConsistency_01: bool; 
61
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root1: int; 
62
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root: int; 
63
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_0: bool; 
64
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rltCheckEntryStateConsistency_0: bool; 
65
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root: int; 
66
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_0: bool; 
67
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root: int; 
68
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_2_states___root: int; 
69
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_1: bool; 
70
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_1: bool; 
71
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root: int; 
72
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_4_outports_mode_: int; 
73
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_5_states___root: int; 
74
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_2: bool; 
75
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_2: bool; 
76
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_states___root: int; 
77
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_outports_mode_: int; 
78
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_7_states___root: int; 
79
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_3: bool; 
80
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_3: bool; 
81
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_8_outports_mode_: int; 
82
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_9_states___root: int; 
83
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_9_outports_setDesiredSpeed: int; 
84
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root: int; 
85
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_outports_mode_: int; 
86
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root: int; 
87
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_fired_0: bool; 
88
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_rltCheckEntryStateConsistency_0: bool; 
89
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root: int; 
90
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_0: bool; 
91
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_1_states___root: int; 
92
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_2_states___root: int; 
93
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_2_outports_setDesiredSpeed: int; 
94
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_1: bool; 
95
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_complete_1: bool; 
96
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_states___root: int; 
97
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_outports_mode_: int; 
98
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root: int; 
99
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_outports_mode_: int; 
100
   rlt_enter_CruiseController_ModeLogic_mode__logic_rltCheckEntryStateConsistency_0: bool; 
101
   rlt_enter_CruiseController_ModeLogic_mode__logic_rlt_state_2_states___root: int; 
102
   chart_CruiseController_ModeLogic_mode__logic_rlt_evtInitStep: bool; 
103
   chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root: int; 
104
   chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_mode_: int; 
105
   chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_setDesiredSpeed: int; 
106
   chart_CruiseController_ModeLogic_mode__logic_final_state_states___root: int; 
107
   chart_CruiseController_ModeLogic_mode__logic_setDesiredSpeed: int; 
108 fa9e78e5 bourbouh
   cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out: int; 
109
   cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out: int; 
110
   cruise_controller_CruiseController_ModeLogic_resumeEvent_Out: bool; 
111
   cruise_controller_CruiseController_ModeLogic_safetyCondition_safetyCondition: bool; 
112
   cruise_controller_CruiseController_ModeLogic_setEvent_Out: bool; 
113
   cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed: bool; 
114
   cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed: real; 
115
   cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed: real; 
116
   cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta: real;
117
118
119
let 
120
   cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out = (
121
      (if (
122
         (if (0 >= 
123
            (if accelResume
124
               then 1
125
               else 0))
126
            then 0
127
            else 
128
         (if accelResume
129
            then 1
130
            else 0)) <= 20)
131
         then 
132
               (if (0 >= 
133
                  (if accelResume
134
                     then 1
135
                     else 0))
136
                  then 0
137
                  else 
138
               (if accelResume
139
                  then 1
140
                  else 0))
141
         else 20) -> 
142
      (if (
143
         (if (0 >= 
144
            (if accelResume
145
               then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out) + 1)
146
               else 0))
147
            then 0
148
            else 
149
         (if accelResume
150
            then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out) + 1)
151
            else 0)) <= 20)
152
         then 
153
               (if (0 >= 
154
                  (if accelResume
155
                     then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out) + 1)
156
                     else 0))
157
                  then 0
158
                  else 
159
               (if accelResume
160
                  then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out) + 1)
161
                  else 0))
162
         else 20));
163
164
   cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out = (
165
      (if (
166
         (if (0 >= 
167
            (if decelSet
168
               then 1
169
               else 0))
170
            then 0
171
            else 
172
         (if decelSet
173
            then 1
174
            else 0)) <= 20)
175
         then 
176
               (if (0 >= 
177
                  (if decelSet
178
                     then 1
179
                     else 0))
180
                  then 0
181
                  else 
182
               (if decelSet
183
                  then 1
184
                  else 0))
185
         else 20) -> 
186
      (if (
187
         (if (0 >= 
188
            (if decelSet
189
               then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out) + 1)
190
               else 0))
191
            then 0
192
            else 
193
         (if decelSet
194
            then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out) + 1)
195
            else 0)) <= 20)
196
         then 
197
               (if (0 >= 
198
                  (if decelSet
199
                     then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out) + 1)
200
                     else 0))
201
                  then 0
202
                  else 
203
               (if decelSet
204
                  then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out) + 1)
205
                  else 0))
206
         else 20));
207
208 9b45f3df ploc
   chart_CruiseController_ModeLogic_mode__logic_onOff = 
209 fa9e78e5 bourbouh
      (if (onOff = false)
210
         then 0
211
         else 1);
212
213 9b45f3df ploc
   chart_CruiseController_ModeLogic_mode__logic_decel = 
214 fa9e78e5 bourbouh
      (if (
215
         (if (cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out = 20)
216
            then true
217
            else false) = false)
218
         then 0
219
         else 1);
220
221 9b45f3df ploc
   chart_CruiseController_ModeLogic_mode__logic_set = 
222 fa9e78e5 bourbouh
      (if (cruise_controller_CruiseController_ModeLogic_setEvent_Out = false)
223
         then 0
224
         else 1);
225
226 9b45f3df ploc
   chart_CruiseController_ModeLogic_mode__logic_accel = 
227 fa9e78e5 bourbouh
      (if (
228
         (if (cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out = 20)
229
            then true
230
            else false) = false)
231
         then 0
232
         else 1);
233
234 9b45f3df ploc
   chart_CruiseController_ModeLogic_mode__logic_safetyCondition = 
235 fa9e78e5 bourbouh
      (if (cruise_controller_CruiseController_ModeLogic_safetyCondition_safetyCondition = false)
236
         then 0
237
         else 1);
238
239 9b45f3df ploc
   chart_CruiseController_ModeLogic_mode__logic____wakeup___ = true;
240 fa9e78e5 bourbouh
241 9b45f3df ploc
   chart_CruiseController_ModeLogic_mode__logic_rlt_evtInitStep = (true -> 
242
      (if (pre chart_CruiseController_ModeLogic_mode__logic____wakeup___)
243 fa9e78e5 bourbouh
         then false
244 9b45f3df ploc
         else (pre chart_CruiseController_ModeLogic_mode__logic_rlt_evtInitStep)));
245 fa9e78e5 bourbouh
246 9b45f3df ploc
   chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root = (0 -> (pre chart_CruiseController_ModeLogic_mode__logic_final_state_states___root));
247 fa9e78e5 bourbouh
248 9b45f3df ploc
   chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_mode_ = (0 -> (pre mode_));
249 fa9e78e5 bourbouh
250 9b45f3df ploc
   chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_setDesiredSpeed = (0 -> (pre chart_CruiseController_ModeLogic_mode__logic_setDesiredSpeed));
251 fa9e78e5 bourbouh
252 9b45f3df ploc
   chart_CruiseController_ModeLogic_mode__logic_final_state_states___root = 
253
      (if chart_CruiseController_ModeLogic_mode__logic____wakeup___
254 fa9e78e5 bourbouh
         then 
255 9b45f3df ploc
               (if chart_CruiseController_ModeLogic_mode__logic_rlt_evtInitStep
256
                  then rlt_enter_CruiseController_ModeLogic_mode__logic_rlt_state_2_states___root
257 fa9e78e5 bourbouh
                  else 
258 9b45f3df ploc
               (if ((not rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_complete_1) and 
259 fa9e78e5 bourbouh
                  
260 9b45f3df ploc
                  ((rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root >= 2) and 
261
                  (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root <= 8)))
262 fa9e78e5 bourbouh
                  then 
263 9b45f3df ploc
                        (if ((not rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_3) and 
264 fa9e78e5 bourbouh
                           
265 9b45f3df ploc
                           ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root >= 3) and 
266
                           (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root <= 6)))
267
                           then rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_15_states___root
268
                           else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root)
269
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root))
270
         else chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root);
271
272
   mode_ = 
273
      (if chart_CruiseController_ModeLogic_mode__logic____wakeup___
274 fa9e78e5 bourbouh
         then 
275 9b45f3df ploc
               (if chart_CruiseController_ModeLogic_mode__logic_rlt_evtInitStep
276 fa9e78e5 bourbouh
                  then 
277 9b45f3df ploc
                        (if (not (chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root = 1))
278 fa9e78e5 bourbouh
                           then 1
279 9b45f3df ploc
                           else chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_mode_)
280 fa9e78e5 bourbouh
                  else 
281 9b45f3df ploc
               (if ((not rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_complete_1) and 
282 fa9e78e5 bourbouh
                  
283 9b45f3df ploc
                  ((rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root >= 2) and 
284
                  (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root <= 8)))
285 fa9e78e5 bourbouh
                  then 
286 9b45f3df ploc
                        (if ((not rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_3) and 
287 fa9e78e5 bourbouh
                           
288 9b45f3df ploc
                           ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root >= 3) and 
289
                           (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root <= 6)))
290 fa9e78e5 bourbouh
                           then 
291 9b45f3df ploc
                                 (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_4
292 fa9e78e5 bourbouh
                                    then 
293 9b45f3df ploc
                                          (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_10_states___root = 4))
294 fa9e78e5 bourbouh
                                             then 4
295 9b45f3df ploc
                                             else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_9_outports_mode_)
296
                                    else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_9_outports_mode_)
297
                           else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_outports_mode_)
298
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_outports_mode_))
299
         else chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_mode_);
300
301
   chart_CruiseController_ModeLogic_mode__logic_setDesiredSpeed = 
302
      (if chart_CruiseController_ModeLogic_mode__logic____wakeup___
303 fa9e78e5 bourbouh
         then 
304 9b45f3df ploc
               (if chart_CruiseController_ModeLogic_mode__logic_rlt_evtInitStep
305
                  then chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_setDesiredSpeed
306 fa9e78e5 bourbouh
                  else 
307 9b45f3df ploc
               (if ((not rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_complete_1) and 
308 fa9e78e5 bourbouh
                  
309 9b45f3df ploc
                  ((rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root >= 2) and 
310
                  (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root <= 8)))
311 fa9e78e5 bourbouh
                  then 
312 9b45f3df ploc
                        (if ((not rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_3) and 
313 fa9e78e5 bourbouh
                           
314 9b45f3df ploc
                           ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root >= 3) and 
315
                           (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root <= 6)))
316 fa9e78e5 bourbouh
                           then 
317 9b45f3df ploc
                                 (if ((not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_4 or 
318
                                    rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_complete_3)) and 
319
                                    (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_15_states___root = 4))
320 fa9e78e5 bourbouh
                                    then 0
321
                                    else 
322 9b45f3df ploc
                                 (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_2
323 fa9e78e5 bourbouh
                                    then 
324 9b45f3df ploc
                                          (if (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_5_states___root = 4)
325 fa9e78e5 bourbouh
                                             then 0
326 9b45f3df ploc
                                             else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_outports_setDesiredSpeed)
327
                                    else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_outports_setDesiredSpeed))
328
                           else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_9_outports_setDesiredSpeed)
329
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_2_outports_setDesiredSpeed))
330
         else chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_setDesiredSpeed);
331 fa9e78e5 bourbouh
332
   
333 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_0 = (
334
      ((chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root >= 2) and 
335
      (chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root <= 8)) and 
336 fa9e78e5 bourbouh
      (not 
337 9b45f3df ploc
      (if (chart_CruiseController_ModeLogic_mode__logic_onOff <> 0)
338 fa9e78e5 bourbouh
         then true
339
         else false)));
340
341
   
342 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_1_states___root = 
343
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_0
344 fa9e78e5 bourbouh
         then 
345
               (if 
346 9b45f3df ploc
                  ((chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root >= 2) and 
347
                  (chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root <= 8))
348 fa9e78e5 bourbouh
                  then 
349
                        0
350 9b45f3df ploc
                  else chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root)
351
         else chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root);
352 fa9e78e5 bourbouh
353
   
354 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_2_states___root = 
355
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_0
356 fa9e78e5 bourbouh
         then 
357 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_1_states___root = 1))
358 fa9e78e5 bourbouh
                  then 
359
360
                        1
361 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_1_states___root)
362
         else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_1_states___root);
363 fa9e78e5 bourbouh
364
   
365
366
   
367 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_2_outports_setDesiredSpeed = 
368
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_0
369 fa9e78e5 bourbouh
         then 
370
               (if 
371
372 9b45f3df ploc
                  ((chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root >= 2) and 
373
                  (chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root <= 8))
374 fa9e78e5 bourbouh
                  then 
375
                        (if 
376
377 9b45f3df ploc
                           ((chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root >= 3) and 
378
                           (chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root <= 6))
379 fa9e78e5 bourbouh
                           then 
380 9b45f3df ploc
                                 (if (chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root = 4)
381 fa9e78e5 bourbouh
                                    then 0
382 9b45f3df ploc
                                    else chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_setDesiredSpeed)
383
                           else chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_setDesiredSpeed)
384
                  else chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_setDesiredSpeed)
385
         else chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_setDesiredSpeed);
386 fa9e78e5 bourbouh
387
   
388
389
   
390 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_1 = ((rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_2_states___root = 1) and 
391 fa9e78e5 bourbouh
      (
392 9b45f3df ploc
      (if (chart_CruiseController_ModeLogic_mode__logic_onOff <> 0)
393 fa9e78e5 bourbouh
         then true
394
         else false) and 
395 9b45f3df ploc
      (not rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_0)));
396 fa9e78e5 bourbouh
397
   
398 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_complete_1 = (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_1 or 
399
      rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_0);
400 fa9e78e5 bourbouh
401
   
402
403 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_states___root = 
404
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_1
405 fa9e78e5 bourbouh
         then 
406 9b45f3df ploc
               (if (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_2_states___root = 1)
407 fa9e78e5 bourbouh
                  then 
408
409
                        0
410 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_2_states___root)
411
         else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_2_states___root);
412 fa9e78e5 bourbouh
413
   
414
415 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_outports_mode_ = 
416
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_0
417 fa9e78e5 bourbouh
         then 
418 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_1_states___root = 1))
419 fa9e78e5 bourbouh
                  then 1
420 9b45f3df ploc
                  else chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_mode_)
421
         else chart_CruiseController_ModeLogic_mode__logic_begin_state_outports_mode_);
422 fa9e78e5 bourbouh
423
   
424 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root = 
425
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_1
426
         then rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root
427
         else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_states___root);
428 fa9e78e5 bourbouh
429
   
430
431
   
432 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_outports_mode_ = 
433
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_fired_1
434 fa9e78e5 bourbouh
         then 
435 9b45f3df ploc
               (if rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_fired_0
436 fa9e78e5 bourbouh
                  then 
437 9b45f3df ploc
                        (if (not (rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root = 7))
438 fa9e78e5 bourbouh
                           then 2
439 9b45f3df ploc
                           else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_outports_mode_)
440
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_outports_mode_)
441
         else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_outports_mode_);
442 fa9e78e5 bourbouh
443
   
444
445
   
446 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_0 = (
447 fa9e78e5 bourbouh
448 9b45f3df ploc
      ((rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root >= 3) and 
449
      (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root <= 6)) and 
450 fa9e78e5 bourbouh
      (not 
451 9b45f3df ploc
      (if (chart_CruiseController_ModeLogic_mode__logic_safetyCondition <> 0)
452 fa9e78e5 bourbouh
         then true
453
         else false)));
454
455
   
456
457 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root = 
458
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_0
459 fa9e78e5 bourbouh
         then 
460
               (if 
461
462 9b45f3df ploc
                  ((rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root >= 3) and 
463
                  (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root <= 6))
464 fa9e78e5 bourbouh
                  then 
465
466
                        2
467 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root)
468
         else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root);
469 fa9e78e5 bourbouh
470
   
471 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_2_states___root = 
472
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_0
473 fa9e78e5 bourbouh
         then 
474 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root = 8))
475 fa9e78e5 bourbouh
                  then 
476
477
                        8
478 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root)
479
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root);
480 fa9e78e5 bourbouh
481
   
482
483
   
484 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_1 = ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_2_states___root = 8) and 
485 fa9e78e5 bourbouh
      ((
486
      (if (
487 9b45f3df ploc
         (if ((chart_CruiseController_ModeLogic_mode__logic_set = 1) = false)
488 fa9e78e5 bourbouh
            then 0
489
            else 1) <> 0)
490
         then true
491
         else false) and 
492
      
493
      (if (
494 9b45f3df ploc
         (if ((chart_CruiseController_ModeLogic_mode__logic_safetyCondition = 1) = false)
495 fa9e78e5 bourbouh
            then 0
496
            else 1) <> 0)
497
         then true
498
         else false)) and 
499 9b45f3df ploc
      (not rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_0)));
500 fa9e78e5 bourbouh
501
   
502 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_1 = (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_1 or 
503
      rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_0);
504 fa9e78e5 bourbouh
505
   
506
507 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root = 
508
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_1
509 fa9e78e5 bourbouh
         then 
510 9b45f3df ploc
               (if (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_2_states___root = 8)
511 fa9e78e5 bourbouh
                  then 
512
513
                        2
514 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_2_states___root)
515
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_2_states___root);
516 fa9e78e5 bourbouh
517
   
518
519 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_4_outports_mode_ = 
520
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_0
521 fa9e78e5 bourbouh
         then 
522 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root = 8))
523 fa9e78e5 bourbouh
                  then 3
524 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_outports_mode_)
525
         else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_outports_mode_);
526 fa9e78e5 bourbouh
527
   
528
529 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_5_states___root = 
530
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_1
531
         then rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root
532
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root);
533 fa9e78e5 bourbouh
534
   
535
536
   
537 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_2 = ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_5_states___root = 8) and 
538 fa9e78e5 bourbouh
      ((
539
      (if (
540
         (if ((
541
            (if (cruise_controller_CruiseController_ModeLogic_resumeEvent_Out = false)
542
               then 0
543
               else 1) = 1) = false)
544
            then 0
545
            else 1) <> 0)
546
         then true
547
         else false) and 
548
      
549
      (if (
550 9b45f3df ploc
         (if ((chart_CruiseController_ModeLogic_mode__logic_safetyCondition = 1) = false)
551 fa9e78e5 bourbouh
            then 0
552
            else 1) <> 0)
553
         then true
554
         else false)) and 
555 9b45f3df ploc
      (not rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_1)));
556 fa9e78e5 bourbouh
557
   
558 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_2 = (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_2 or 
559
      rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_1);
560 fa9e78e5 bourbouh
561
   
562
563 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_states___root = 
564
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_2
565 fa9e78e5 bourbouh
         then 
566 9b45f3df ploc
               (if (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_5_states___root = 8)
567 fa9e78e5 bourbouh
                  then 
568
569
                        2
570 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_5_states___root)
571
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_5_states___root);
572 fa9e78e5 bourbouh
573
   
574
575 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_outports_mode_ = 
576
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_1
577 fa9e78e5 bourbouh
         then 
578 9b45f3df ploc
               (if rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_0
579 fa9e78e5 bourbouh
                  then 
580 9b45f3df ploc
                        (if (not (rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root = 4))
581 fa9e78e5 bourbouh
                           then 4
582 9b45f3df ploc
                           else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_4_outports_mode_)
583
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_4_outports_mode_)
584
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_4_outports_mode_);
585 fa9e78e5 bourbouh
586
   
587 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_7_states___root = 
588
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_2
589
         then rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root1
590
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_states___root);
591 fa9e78e5 bourbouh
592
   
593
594
   
595 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_3 = ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_7_states___root = 7) and 
596 fa9e78e5 bourbouh
      ((
597
      (if (
598 9b45f3df ploc
         (if ((chart_CruiseController_ModeLogic_mode__logic_set = 1) = false)
599 fa9e78e5 bourbouh
            then 0
600
            else 1) <> 0)
601
         then true
602
         else false) and 
603
      
604
      (if (
605 9b45f3df ploc
         (if ((chart_CruiseController_ModeLogic_mode__logic_safetyCondition = 1) = false)
606 fa9e78e5 bourbouh
            then 0
607
            else 1) <> 0)
608
         then true
609
         else false)) and 
610 9b45f3df ploc
      (not rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_2)));
611 fa9e78e5 bourbouh
612
   
613 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_3 = (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_3 or 
614
      rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_complete_2);
615 fa9e78e5 bourbouh
616
   
617
618 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_8_outports_mode_ = 
619
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_2
620 fa9e78e5 bourbouh
         then 
621 9b45f3df ploc
               (if rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_01
622 fa9e78e5 bourbouh
                  then 
623 9b45f3df ploc
                        (if (not (rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root1 = 4))
624 fa9e78e5 bourbouh
                           then 4
625 9b45f3df ploc
                           else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_outports_mode_)
626
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_outports_mode_)
627
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_outports_mode_);
628 fa9e78e5 bourbouh
629
   
630
631 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_9_states___root = 
632
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_3
633 fa9e78e5 bourbouh
         then 
634 9b45f3df ploc
               (if (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_7_states___root = 7)
635 fa9e78e5 bourbouh
                  then 
636
637
                        2
638 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_7_states___root)
639
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_7_states___root);
640 fa9e78e5 bourbouh
641
   
642
643 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_9_outports_setDesiredSpeed = 
644
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_3
645 fa9e78e5 bourbouh
         then 1
646
         else 
647 9b45f3df ploc
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_1
648 fa9e78e5 bourbouh
         then 1
649
         else 
650 9b45f3df ploc
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_0
651 fa9e78e5 bourbouh
         then 
652
               (if 
653
654 9b45f3df ploc
                  ((rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root >= 3) and 
655
                  (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root <= 6))
656 fa9e78e5 bourbouh
                  then 
657 9b45f3df ploc
                        (if (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_4_states___root = 4)
658 fa9e78e5 bourbouh
                           then 0
659 9b45f3df ploc
                           else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_2_outports_setDesiredSpeed)
660
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_2_outports_setDesiredSpeed)
661
         else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_2_outports_setDesiredSpeed)));
662 fa9e78e5 bourbouh
663
   
664
665 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root = 
666
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_3
667
         then rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root2
668
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_9_states___root);
669 fa9e78e5 bourbouh
670
   
671
672
   
673
674 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_outports_mode_ = 
675
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_fired_3
676 fa9e78e5 bourbouh
         then 
677 9b45f3df ploc
               (if rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_02
678 fa9e78e5 bourbouh
                  then 
679 9b45f3df ploc
                        (if (not (rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root2 = 4))
680 fa9e78e5 bourbouh
                           then 4
681 9b45f3df ploc
                           else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_8_outports_mode_)
682
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_8_outports_mode_)
683
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_8_outports_mode_);
684 fa9e78e5 bourbouh
685
   
686
687
   
688 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_0 = ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root = 4) and 
689
      (chart_CruiseController_ModeLogic_mode__logic_set = 1));
690 fa9e78e5 bourbouh
691
   
692
693 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_2_states___root = 
694
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_0
695 fa9e78e5 bourbouh
         then 
696 9b45f3df ploc
               (if (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root = 4)
697 fa9e78e5 bourbouh
                  then 
698
699
                        3
700 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root)
701
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_states___root);
702 fa9e78e5 bourbouh
703
   
704
705 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_2_outports_setDesiredSpeed = 
706
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_0
707 fa9e78e5 bourbouh
         then 1
708 9b45f3df ploc
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_9_outports_setDesiredSpeed);
709 fa9e78e5 bourbouh
710
   
711
712 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root = 
713
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_0
714 fa9e78e5 bourbouh
         then 
715 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_2_states___root = 4))
716 fa9e78e5 bourbouh
                  then 
717
718
                        4
719 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_2_states___root)
720
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_2_states___root);
721 fa9e78e5 bourbouh
722
   
723
724
   
725 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_1 = ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root = 4) and 
726
      ((chart_CruiseController_ModeLogic_mode__logic_accel = 1) and 
727
      (not rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_0)));
728 fa9e78e5 bourbouh
729
   
730 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_complete_1 = (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_1 or 
731
      rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_0);
732 fa9e78e5 bourbouh
733
   
734
735 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_states___root = 
736
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_1
737 fa9e78e5 bourbouh
         then 
738 9b45f3df ploc
               (if (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root = 4)
739 fa9e78e5 bourbouh
                  then 
740
741
                        3
742 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root)
743
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root);
744 fa9e78e5 bourbouh
745
   
746
747 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_outports_mode_ = 
748
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_0
749 fa9e78e5 bourbouh
         then 
750 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_2_states___root = 4))
751 fa9e78e5 bourbouh
                  then 4
752 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_outports_mode_)
753
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_10_outports_mode_);
754 fa9e78e5 bourbouh
755
   
756
757 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_outports_setDesiredSpeed = 
758
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_1
759 fa9e78e5 bourbouh
         then 
760 9b45f3df ploc
               (if (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root = 4)
761 fa9e78e5 bourbouh
                  then 0
762 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_2_outports_setDesiredSpeed)
763
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_2_outports_setDesiredSpeed);
764 fa9e78e5 bourbouh
765
   
766 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_5_states___root = 
767
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_1
768 fa9e78e5 bourbouh
         then 
769 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_states___root = 5))
770 fa9e78e5 bourbouh
                  then 
771
772
                        5
773 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_states___root)
774
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_states___root);
775 fa9e78e5 bourbouh
776
   
777
778
   
779 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_2 = ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_5_states___root = 4) and 
780
      ((chart_CruiseController_ModeLogic_mode__logic_decel = 1) and 
781
      (not rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_complete_1)));
782 fa9e78e5 bourbouh
783
   
784 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_complete_2 = (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_2 or 
785
      rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_complete_1);
786 fa9e78e5 bourbouh
787
   
788
789 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_6_states___root = 
790
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_2
791 fa9e78e5 bourbouh
         then 
792 9b45f3df ploc
               (if (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_5_states___root = 4)
793 fa9e78e5 bourbouh
                  then 
794
795
                        3
796 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_5_states___root)
797
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_5_states___root);
798 fa9e78e5 bourbouh
799
   
800
801 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_6_outports_mode_ = 
802
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_1
803 fa9e78e5 bourbouh
         then 
804 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_states___root = 5))
805 fa9e78e5 bourbouh
                  then 6
806 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_outports_mode_)
807
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_4_outports_mode_);
808 fa9e78e5 bourbouh
809
   
810 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_7_states___root = 
811
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_2
812 fa9e78e5 bourbouh
         then 
813 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_6_states___root = 6))
814 fa9e78e5 bourbouh
                  then 
815
816
                        6
817 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_6_states___root)
818
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_6_states___root);
819 fa9e78e5 bourbouh
820
   
821
822
   
823 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_3 = ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_7_states___root = 6) and 
824
      ((chart_CruiseController_ModeLogic_mode__logic_decel = 0) and 
825
      (not rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_complete_2)));
826 fa9e78e5 bourbouh
827
   
828 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_complete_3 = (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_3 or 
829
      rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_complete_2);
830 fa9e78e5 bourbouh
831
   
832
833 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_8_states___root = 
834
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_3
835 fa9e78e5 bourbouh
         then 
836 9b45f3df ploc
               (if (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_7_states___root = 6)
837 fa9e78e5 bourbouh
                  then 
838
839
                        3
840 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_7_states___root)
841
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_7_states___root);
842 fa9e78e5 bourbouh
843
   
844
845 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_8_outports_mode_ = 
846
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_2
847 fa9e78e5 bourbouh
         then 
848 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_6_states___root = 6))
849 fa9e78e5 bourbouh
                  then 5
850 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_6_outports_mode_)
851
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_6_outports_mode_);
852 fa9e78e5 bourbouh
853
   
854 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_9_states___root = 
855
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_3
856 fa9e78e5 bourbouh
         then 
857 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_8_states___root = 4))
858 fa9e78e5 bourbouh
                  then 
859
860
                        4
861 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_8_states___root)
862
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_8_states___root);
863 fa9e78e5 bourbouh
864
   
865
866
   
867 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_9_outports_mode_ = 
868
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_3
869 fa9e78e5 bourbouh
         then 
870 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_8_states___root = 4))
871 fa9e78e5 bourbouh
                  then 4
872 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_8_outports_mode_)
873
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_8_outports_mode_);
874 fa9e78e5 bourbouh
875
   
876
877
   
878 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_4 = ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_9_states___root = 5) and 
879
      ((chart_CruiseController_ModeLogic_mode__logic_accel = 0) and 
880
      (not rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_complete_3)));
881 fa9e78e5 bourbouh
882
   
883
884 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_10_states___root = 
885
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_4
886 fa9e78e5 bourbouh
         then 
887 9b45f3df ploc
               (if (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_9_states___root = 5)
888 fa9e78e5 bourbouh
                  then 
889
890
                        3
891 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_9_states___root)
892
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_9_states___root);
893 fa9e78e5 bourbouh
894
   
895 9b45f3df ploc
   rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_15_states___root = 
896
      (if rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_4
897 fa9e78e5 bourbouh
         then 
898 9b45f3df ploc
               (if (not (rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_10_states___root = 4))
899 fa9e78e5 bourbouh
                  then 
900
901
                        4
902 9b45f3df ploc
                  else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_10_states___root)
903
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_10_states___root);
904 fa9e78e5 bourbouh
905
   
906
907 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root2 = 
908 fa9e78e5 bourbouh
      (if (not 
909
910 9b45f3df ploc
         ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_9_states___root >= 3) and 
911
         (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_9_states___root <= 6)))
912 fa9e78e5 bourbouh
         then 
913
914
               3
915 9b45f3df ploc
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_9_states___root);
916 fa9e78e5 bourbouh
917
   
918 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_02 = ((not 
919 fa9e78e5 bourbouh
920 9b45f3df ploc
      ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_9_states___root >= 3) and 
921
      (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_9_states___root <= 6))) and 
922 fa9e78e5 bourbouh
      
923
924 9b45f3df ploc
      ((rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root2 >= 3) and 
925
      (rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root2 <= 6)));
926 fa9e78e5 bourbouh
927 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root2 = 
928
      (if rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_02
929 fa9e78e5 bourbouh
         then 
930 9b45f3df ploc
               (if (not (rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root2 = 4))
931 fa9e78e5 bourbouh
                  then 
932
933
                        4
934 9b45f3df ploc
                  else rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root2)
935
         else rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root2);
936 fa9e78e5 bourbouh
937
   
938
939 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rltCheckEntryStateConsistency_02 = ((rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root2 = 4) or 
940
      ((rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root2 = 5) or 
941
      (rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root2 = 6)));
942 fa9e78e5 bourbouh
943 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root1 = 
944 fa9e78e5 bourbouh
      (if (not 
945
946 9b45f3df ploc
         ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_states___root >= 3) and 
947
         (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_states___root <= 6)))
948 fa9e78e5 bourbouh
         then 
949
950
               3
951 9b45f3df ploc
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_states___root);
952 fa9e78e5 bourbouh
953
   
954 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_01 = ((not 
955 fa9e78e5 bourbouh
956 9b45f3df ploc
      ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_states___root >= 3) and 
957
      (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_6_states___root <= 6))) and 
958 fa9e78e5 bourbouh
      
959
960 9b45f3df ploc
      ((rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root1 >= 3) and 
961
      (rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root1 <= 6)));
962 fa9e78e5 bourbouh
963
   
964 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root1 = 
965
      (if rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_01
966 fa9e78e5 bourbouh
         then 
967 9b45f3df ploc
               (if (not (rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root1 = 4))
968 fa9e78e5 bourbouh
                  then 
969
970
                        4
971 9b45f3df ploc
                  else rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root1)
972
         else rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root1);
973 fa9e78e5 bourbouh
974
   
975
976 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rltCheckEntryStateConsistency_01 = ((rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root1 = 4) or 
977
      ((rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root1 = 5) or 
978
      (rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root1 = 6)));
979 fa9e78e5 bourbouh
980 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root = 
981 fa9e78e5 bourbouh
      (if (not 
982
983 9b45f3df ploc
         ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root >= 3) and 
984
         (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root <= 6)))
985 fa9e78e5 bourbouh
         then 
986
987
               3
988 9b45f3df ploc
         else rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root);
989 fa9e78e5 bourbouh
990
   
991 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_0 = ((not 
992 fa9e78e5 bourbouh
993 9b45f3df ploc
      ((rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root >= 3) and 
994
      (rlt_eval_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root <= 6))) and 
995 fa9e78e5 bourbouh
      
996
997 9b45f3df ploc
      ((rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root >= 3) and 
998
      (rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root <= 6)));
999 fa9e78e5 bourbouh
1000
   
1001 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root = 
1002
      (if rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_fired_0
1003 fa9e78e5 bourbouh
         then 
1004 9b45f3df ploc
               (if (not (rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root = 4))
1005 fa9e78e5 bourbouh
                  then 
1006
1007
                        4
1008 9b45f3df ploc
                  else rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root)
1009
         else rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_1_states___root);
1010 fa9e78e5 bourbouh
1011
   
1012
1013 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rltCheckEntryStateConsistency_0 = ((rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root = 4) or 
1014
      ((rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root = 5) or 
1015
      (rlt_enter_CruiseController_ModeLogic_mode__logic_On_Active_rlt_state_3_states___root = 6)));
1016 fa9e78e5 bourbouh
1017 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root = 
1018 fa9e78e5 bourbouh
      (if (not 
1019
1020 9b45f3df ploc
         ((rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_states___root >= 2) and 
1021
         (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_states___root <= 8)))
1022 fa9e78e5 bourbouh
         then 
1023
1024
               2
1025 9b45f3df ploc
         else rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_states___root);
1026 fa9e78e5 bourbouh
1027
   
1028 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_fired_0 = ((not 
1029 fa9e78e5 bourbouh
1030 9b45f3df ploc
      ((rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_states___root >= 2) and 
1031
      (rlt_eval_CruiseController_ModeLogic_mode__logic_rlt_state_3_states___root <= 8))) and 
1032 fa9e78e5 bourbouh
      
1033
1034 9b45f3df ploc
      ((rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root >= 2) and 
1035
      (rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root <= 8)));
1036 fa9e78e5 bourbouh
1037
   
1038 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root = 
1039
      (if rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_fired_0
1040 fa9e78e5 bourbouh
         then 
1041 9b45f3df ploc
               (if (not (rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root = 7))
1042 fa9e78e5 bourbouh
                  then 
1043
1044
                        7
1045 9b45f3df ploc
                  else rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root)
1046
         else rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_1_states___root);
1047 fa9e78e5 bourbouh
1048
   
1049
1050 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_On_rltCheckEntryStateConsistency_0 = (
1051 fa9e78e5 bourbouh
1052 9b45f3df ploc
      ((rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root >= 3) and 
1053
      (rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root <= 6)) or 
1054
      ((rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root = 7) or 
1055
      (rlt_enter_CruiseController_ModeLogic_mode__logic_On_rlt_state_3_states___root = 8)));
1056 fa9e78e5 bourbouh
1057
   
1058 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_rlt_state_2_states___root = 
1059
      (if (not (chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root = 1))
1060 fa9e78e5 bourbouh
         then 
1061
1062
               1
1063 9b45f3df ploc
         else chart_CruiseController_ModeLogic_mode__logic_begin_state_states___root);
1064 fa9e78e5 bourbouh
1065
   
1066
1067 9b45f3df ploc
   rlt_enter_CruiseController_ModeLogic_mode__logic_rltCheckEntryStateConsistency_0 = ((rlt_enter_CruiseController_ModeLogic_mode__logic_rlt_state_2_states___root = 1) or 
1068 fa9e78e5 bourbouh
      
1069
1070 9b45f3df ploc
      ((rlt_enter_CruiseController_ModeLogic_mode__logic_rlt_state_2_states___root >= 2) and 
1071
      (rlt_enter_CruiseController_ModeLogic_mode__logic_rlt_state_2_states___root <= 8)));
1072 fa9e78e5 bourbouh
1073
   cruise_controller_CruiseController_ModeLogic_resumeEvent_Out = (false -> ((not (pre accelResume)) and 
1074
      accelResume));
1075
1076
   cruise_controller_CruiseController_ModeLogic_safetyCondition_safetyCondition = (((((not cancel) and 
1077
      (not brakePedal)) and 
1078
      
1079
      (if (carGear = 3)
1080
         then true
1081
         else false)) and 
1082
      
1083
      (if (carSpeed >= 15.0)
1084
         then true
1085
         else false)) and 
1086
      validInputs);
1087
1088
   cruise_controller_CruiseController_ModeLogic_setEvent_Out = (false -> ((not (pre decelSet)) and 
1089
      decelSet));
1090
1091
   cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed = 
1092 9b45f3df ploc
      (if (chart_CruiseController_ModeLogic_mode__logic_setDesiredSpeed <> 0)
1093 fa9e78e5 bourbouh
         then true
1094
         else false);
1095
1096
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_clock = 
1097 9b45f3df ploc
      (if (mode_ = 5)
1098 fa9e78e5 bourbouh
         then true
1099
         else false);
1100
1101
   newDesiredSpeed1 = (
1102
      (if (rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_init_step and 
1103
         (not rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_clock))
1104
         then 0.0
1105
         else (cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed - 0.05)) -> 
1106
      (if (rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_init_step and 
1107
         (not rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_clock))
1108
         then 0.0
1109
         else 
1110
      (if rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_clock
1111
         then (cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed - 0.05)
1112
         else (pre newDesiredSpeed1))));
1113
1114
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_init_step = (true -> 
1115
      (if (pre rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_clock)
1116
         then false
1117
         else (pre rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_init_step)));
1118
1119
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_clock = 
1120 9b45f3df ploc
      (if (mode_ = 6)
1121 fa9e78e5 bourbouh
         then true
1122
         else false);
1123
1124
   newDesiredSpeed = (
1125
      (if (rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_init_step and 
1126
         (not rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_clock))
1127
         then 0.0
1128
         else (cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed + 0.05)) -> 
1129
      (if (rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_init_step and 
1130
         (not rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_clock))
1131
         then 0.0
1132
         else 
1133
      (if rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_clock
1134
         then (cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed + 0.05)
1135
         else (pre newDesiredSpeed))));
1136
1137
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_init_step = (true -> 
1138
      (if (pre rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_clock)
1139
         then false
1140
         else (pre rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_init_step)));
1141
1142
   cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed = 
1143
      (if 
1144 9b45f3df ploc
         (if (mode_ = 6)
1145 fa9e78e5 bourbouh
            then true
1146
            else false)
1147
         then newDesiredSpeed
1148
         else 
1149
      (if 
1150 9b45f3df ploc
         (if (mode_ = 5)
1151 fa9e78e5 bourbouh
            then true
1152
            else false)
1153
         then newDesiredSpeed1
1154
         else 
1155
      (if 
1156 9b45f3df ploc
         (if (mode_ = 4)
1157 fa9e78e5 bourbouh
            then true
1158
            else false)
1159
         then cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed
1160
         else 
1161
      (if 
1162 9b45f3df ploc
         (if (mode_ = 3)
1163 fa9e78e5 bourbouh
            then true
1164
            else false)
1165
         then cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed
1166
         else 0.0))));
1167
1168
   cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed = (0.0 -> 
1169
      (if (
1170
         (if (pre cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed)
1171
            then (pre carSpeed)
1172
            else (pre cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed)) < 0.0)
1173
         then 0.0
1174
         else 
1175
      (if (
1176
         (if (pre cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed)
1177
            then (pre carSpeed)
1178
            else (pre cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed)) > 100.0)
1179
         then 100.0
1180
         else 
1181
      (if (pre cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed)
1182
         then (pre carSpeed)
1183
         else (pre cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed)))));
1184
1185
   cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta = (((
1186
      (if (((
1187
         (if (
1188
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1189
               then carSpeed
1190
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1191
            then 0.0
1192
            else 
1193
         (if (
1194
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1195
               then carSpeed
1196
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1197
            then 100.0
1198
            else 
1199
         (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1200
            then carSpeed
1201
            else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed))) - carSpeed) * 1.0) < ( -10.0))
1202
         then ( -10.0)
1203
         else 
1204
      (if (((
1205
         (if (
1206
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1207
               then carSpeed
1208
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1209
            then 0.0
1210
            else 
1211
         (if (
1212
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1213
               then carSpeed
1214
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1215
            then 100.0
1216
            else 
1217
         (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1218
            then carSpeed
1219
            else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed))) - carSpeed) * 1.0) > 10.0)
1220
         then 10.0
1221
         else ((
1222
               (if (
1223
                  (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1224
                     then carSpeed
1225
                     else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1226
                  then 0.0
1227
                  else 
1228
               (if (
1229
                  (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1230
                     then carSpeed
1231
                     else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1232
                  then 100.0
1233
                  else 
1234
               (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1235
                  then carSpeed
1236
                  else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed))) - carSpeed) * 1.0))) / 20.0) + 0.0) -> ((
1237
      (if (((
1238
         (if (
1239
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1240
               then carSpeed
1241
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1242
            then 0.0
1243
            else 
1244
         (if (
1245
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1246
               then carSpeed
1247
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1248
            then 100.0
1249
            else 
1250
         (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1251
            then carSpeed
1252
            else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed))) - carSpeed) * 1.0) < ( -10.0))
1253
         then ( -10.0)
1254
         else 
1255
      (if (((
1256
         (if (
1257
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1258
               then carSpeed
1259
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1260
            then 0.0
1261
            else 
1262
         (if (
1263
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1264
               then carSpeed
1265
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1266
            then 100.0
1267
            else 
1268
         (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1269
            then carSpeed
1270
            else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed))) - carSpeed) * 1.0) > 10.0)
1271
         then 10.0
1272
         else ((
1273
               (if (
1274
                  (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1275
                     then carSpeed
1276
                     else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1277
                  then 0.0
1278
                  else 
1279
               (if (
1280
                  (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1281
                     then carSpeed
1282
                     else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1283
                  then 100.0
1284
                  else 
1285
               (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1286
                  then carSpeed
1287
                  else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed))) - carSpeed) * 1.0))) / 20.0) + 
1288
      (if ((
1289 9b45f3df ploc
         (if ((pre mode_) = 4)
1290 fa9e78e5 bourbouh
            then true
1291
            else false) or 
1292
         
1293 9b45f3df ploc
         (if ((pre mode_) = 5)
1294 fa9e78e5 bourbouh
            then true
1295
            else false)) or 
1296
         
1297 9b45f3df ploc
         (if ((pre mode_) = 6)
1298 fa9e78e5 bourbouh
            then true
1299
            else false))
1300
         then 
1301
               (if ((pre cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta) < 0.0)
1302
                  then 0.0
1303
                  else 
1304
               (if ((pre cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta) > 100.0)
1305
                  then 100.0
1306
                  else (pre cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta)))
1307
         else 0.0)));
1308
1309
   cruiseThrottle = 
1310
      (if ((
1311 9b45f3df ploc
         (if (mode_ = 4)
1312 fa9e78e5 bourbouh
            then true
1313
            else false) or 
1314
         
1315 9b45f3df ploc
         (if (mode_ = 5)
1316 fa9e78e5 bourbouh
            then true
1317
            else false)) or 
1318
         
1319 9b45f3df ploc
         (if (mode_ = 6)
1320 fa9e78e5 bourbouh
            then true
1321
            else false))
1322
         then 
1323
               (if (cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta < 0.0)
1324
                  then 0.0
1325
                  else 
1326
               (if (cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta > 100.0)
1327
                  then 100.0
1328
                  else cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta))
1329
         else 0.0);
1330
1331
   desiredSpeed = 
1332
      (if (
1333
         (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1334
            then carSpeed
1335
            else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1336
         then 0.0
1337
         else 
1338
      (if (
1339
         (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1340
            then carSpeed
1341
            else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1342
         then 100.0
1343
         else 
1344
      (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1345
         then carSpeed
1346
         else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed)));
1347
1348 9b45f3df ploc
   OK = rlt_enter_CruiseController_ModeLogic_mode__logic_rltCheckEntryStateConsistency_0;
1349 fa9e78e5 bourbouh
1350
1351
  --%PROPERTY OK=true;
1352
  --%MAIN;
1353
1354
tel