Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / test / src / kind_fmcad08 / large / cruise_controller_23.lus @ 22fe1c93

History | View | Annotate | Download (65.3 KB)

1

    
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
var
14
mode: int; 
15
      cruiseThrottle: real; 
16
      desiredSpeed: real;
17
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_clock: bool; 
18
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_init_step: bool; 
19
   newDesiredSpeed1: real; 
20
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_clock: bool; 
21
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_init_step: bool; 
22
   newDesiredSpeed: real; 
23
   chart_CruiseController_ModeLogic_mode_logic_onOff: int; 
24
   chart_CruiseController_ModeLogic_mode_logic_decel: int; 
25
   chart_CruiseController_ModeLogic_mode_logic_set: int; 
26
   chart_CruiseController_ModeLogic_mode_logic_accel: int; 
27
   chart_CruiseController_ModeLogic_mode_logic_safetyCondition: int; 
28
   chart_CruiseController_ModeLogic_mode_logic____wakeup___: bool; 
29
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_0: bool; 
30
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_2_states___root: int; 
31
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_2_outports_setDesiredSpeed: int; 
32
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root: int; 
33
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_1: bool; 
34
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_complete_1: bool; 
35
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_states___root: int; 
36
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_outports_mode: int; 
37
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_outports_setDesiredSpeed: int; 
38
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_5_states___root: int; 
39
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_2: bool; 
40
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_complete_2: bool; 
41
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_6_states___root: int; 
42
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_6_outports_mode: int; 
43
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_7_states___root: int; 
44
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_3: bool; 
45
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_complete_3: bool; 
46
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_8_states___root: int; 
47
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_8_outports_mode: int; 
48
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_9_states___root: int; 
49
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_9_outports_mode: int; 
50
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_4: bool; 
51
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_10_states___root: int; 
52
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_15_states___root: int; 
53
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root2: int; 
54
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_02: bool; 
55
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rltCheckEntryStateConsistency_02: bool; 
56
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root2: int; 
57
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root1: int; 
58
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_01: bool; 
59
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rltCheckEntryStateConsistency_01: bool; 
60
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root1: int; 
61
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root: int; 
62
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_0: bool; 
63
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rltCheckEntryStateConsistency_0: bool; 
64
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root: int; 
65
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_0: bool; 
66
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root: int; 
67
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_2_states___root: int; 
68
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_1: bool; 
69
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_1: bool; 
70
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root: int; 
71
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_4_outports_mode: int; 
72
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_5_states___root: int; 
73
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_2: bool; 
74
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_2: bool; 
75
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_6_states___root: int; 
76
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_6_outports_mode: int; 
77
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_7_states___root: int; 
78
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_3: bool; 
79
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_3: bool; 
80
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_8_outports_mode: int; 
81
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_9_states___root: int; 
82
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_9_outports_setDesiredSpeed: int; 
83
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_states___root: int; 
84
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_outports_mode: int; 
85
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root: int; 
86
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_fired_0: bool; 
87
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_rltCheckEntryStateConsistency_0: bool; 
88
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root: int; 
89
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_0: bool; 
90
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_1_states___root: int; 
91
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_2_states___root: int; 
92
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_2_outports_setDesiredSpeed: int; 
93
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_1: bool; 
94
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_complete_1: bool; 
95
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_3_states___root: int; 
96
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_3_outports_mode: int; 
97
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root: int; 
98
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_outports_mode: int; 
99
   rlt_enter_CruiseController_ModeLogic_mode_logic_rltCheckEntryStateConsistency_0: bool; 
100
   rlt_enter_CruiseController_ModeLogic_mode_logic_rlt_state_2_states___root: int; 
101
   chart_CruiseController_ModeLogic_mode_logic_rlt_evtInitStep: bool; 
102
   chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root: int; 
103
   chart_CruiseController_ModeLogic_mode_logic_begin_state_outports_mode: int; 
104
   chart_CruiseController_ModeLogic_mode_logic_begin_state_outports_setDesiredSpeed: int; 
105
   chart_CruiseController_ModeLogic_mode_logic_final_state_states___root: int; 
106
   chart_CruiseController_ModeLogic_mode_logic_setDesiredSpeed: int; 
107
   cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out: int; 
108
   cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out: int; 
109
   cruise_controller_CruiseController_ModeLogic_resumeEvent_Out: bool; 
110
   cruise_controller_CruiseController_ModeLogic_safetyCondition_safetyCondition: bool; 
111
   cruise_controller_CruiseController_ModeLogic_setEvent_Out: bool; 
112
   cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed: bool; 
113
   cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed: real; 
114
   cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed: real; 
115
   cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta: real;
116

    
117

    
118
let 
119
   cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out = (
120
      (if (
121
         (if (0 >= 
122
            (if accelResume
123
               then 1
124
               else 0))
125
            then 0
126
            else 
127
         (if accelResume
128
            then 1
129
            else 0)) <= 20)
130
         then 
131
               (if (0 >= 
132
                  (if accelResume
133
                     then 1
134
                     else 0))
135
                  then 0
136
                  else 
137
               (if accelResume
138
                  then 1
139
                  else 0))
140
         else 20) -> 
141
      (if (
142
         (if (0 >= 
143
            (if accelResume
144
               then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out) + 1)
145
               else 0))
146
            then 0
147
            else 
148
         (if accelResume
149
            then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out) + 1)
150
            else 0)) <= 20)
151
         then 
152
               (if (0 >= 
153
                  (if accelResume
154
                     then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out) + 1)
155
                     else 0))
156
                  then 0
157
                  else 
158
               (if accelResume
159
                  then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out) + 1)
160
                  else 0))
161
         else 20));
162

    
163
   cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out = (
164
      (if (
165
         (if (0 >= 
166
            (if decelSet
167
               then 1
168
               else 0))
169
            then 0
170
            else 
171
         (if decelSet
172
            then 1
173
            else 0)) <= 20)
174
         then 
175
               (if (0 >= 
176
                  (if decelSet
177
                     then 1
178
                     else 0))
179
                  then 0
180
                  else 
181
               (if decelSet
182
                  then 1
183
                  else 0))
184
         else 20) -> 
185
      (if (
186
         (if (0 >= 
187
            (if decelSet
188
               then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out) + 1)
189
               else 0))
190
            then 0
191
            else 
192
         (if decelSet
193
            then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out) + 1)
194
            else 0)) <= 20)
195
         then 
196
               (if (0 >= 
197
                  (if decelSet
198
                     then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out) + 1)
199
                     else 0))
200
                  then 0
201
                  else 
202
               (if decelSet
203
                  then ((pre cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out) + 1)
204
                  else 0))
205
         else 20));
206

    
207
   chart_CruiseController_ModeLogic_mode_logic_onOff = 
208
      (if (onOff = false)
209
         then 0
210
         else 1);
211

    
212
   chart_CruiseController_ModeLogic_mode_logic_decel = 
213
      (if (
214
         (if (cruise_controller_CruiseController_ModeLogic_DelayOnsetDecel_Bounded_Count_Out = 20)
215
            then true
216
            else false) = false)
217
         then 0
218
         else 1);
219

    
220
   chart_CruiseController_ModeLogic_mode_logic_set = 
221
      (if (cruise_controller_CruiseController_ModeLogic_setEvent_Out = false)
222
         then 0
223
         else 1);
224

    
225
   chart_CruiseController_ModeLogic_mode_logic_accel = 
226
      (if (
227
         (if (cruise_controller_CruiseController_ModeLogic_DelayOnsetAccel_Bounded_Count_Out = 20)
228
            then true
229
            else false) = false)
230
         then 0
231
         else 1);
232

    
233
   chart_CruiseController_ModeLogic_mode_logic_safetyCondition = 
234
      (if (cruise_controller_CruiseController_ModeLogic_safetyCondition_safetyCondition = false)
235
         then 0
236
         else 1);
237

    
238
   chart_CruiseController_ModeLogic_mode_logic____wakeup___ = true;
239

    
240
   chart_CruiseController_ModeLogic_mode_logic_rlt_evtInitStep = (true -> 
241
      (if (pre chart_CruiseController_ModeLogic_mode_logic____wakeup___)
242
         then false
243
         else (pre chart_CruiseController_ModeLogic_mode_logic_rlt_evtInitStep)));
244

    
245
   chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root = (0 -> (pre chart_CruiseController_ModeLogic_mode_logic_final_state_states___root));
246

    
247
   chart_CruiseController_ModeLogic_mode_logic_begin_state_outports_mode = (0 -> (pre mode));
248

    
249
   chart_CruiseController_ModeLogic_mode_logic_begin_state_outports_setDesiredSpeed = (0 -> (pre chart_CruiseController_ModeLogic_mode_logic_setDesiredSpeed));
250

    
251
   chart_CruiseController_ModeLogic_mode_logic_final_state_states___root = 
252
      (if chart_CruiseController_ModeLogic_mode_logic____wakeup___
253
         then 
254
               (if chart_CruiseController_ModeLogic_mode_logic_rlt_evtInitStep
255
                  then rlt_enter_CruiseController_ModeLogic_mode_logic_rlt_state_2_states___root
256
                  else 
257
               (if ((not rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_complete_1) and 
258
                  
259
                  ((rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root >= 2) and 
260
                  (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root <= 8)))
261
                  then 
262
                        (if ((not rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_3) and 
263
                           
264
                           ((rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_states___root >= 3) and 
265
                           (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_states___root <= 6)))
266
                           then rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_15_states___root
267
                           else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_states___root)
268
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root))
269
         else chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root);
270

    
271
   mode = 
272
      (if chart_CruiseController_ModeLogic_mode_logic____wakeup___
273
         then 
274
               (if chart_CruiseController_ModeLogic_mode_logic_rlt_evtInitStep
275
                  then 
276
                        (if (not (chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root = 1))
277
                           then 1
278
                           else chart_CruiseController_ModeLogic_mode_logic_begin_state_outports_mode)
279
                  else 
280
               (if ((not rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_complete_1) and 
281
                  
282
                  ((rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root >= 2) and 
283
                  (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root <= 8)))
284
                  then 
285
                        (if ((not rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_3) and 
286
                           
287
                           ((rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_states___root >= 3) and 
288
                           (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_states___root <= 6)))
289
                           then 
290
                                 (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_4
291
                                    then 
292
                                          (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_10_states___root = 4))
293
                                             then 4
294
                                             else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_9_outports_mode)
295
                                    else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_9_outports_mode)
296
                           else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_outports_mode)
297
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_outports_mode))
298
         else chart_CruiseController_ModeLogic_mode_logic_begin_state_outports_mode);
299

    
300
   chart_CruiseController_ModeLogic_mode_logic_setDesiredSpeed = 
301
      (if chart_CruiseController_ModeLogic_mode_logic____wakeup___
302
         then 
303
               (if chart_CruiseController_ModeLogic_mode_logic_rlt_evtInitStep
304
                  then chart_CruiseController_ModeLogic_mode_logic_begin_state_outports_setDesiredSpeed
305
                  else 
306
               (if ((not rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_complete_1) and 
307
                  
308
                  ((rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root >= 2) and 
309
                  (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root <= 8)))
310
                  then 
311
                        (if ((not rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_3) and 
312
                           
313
                           ((rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_states___root >= 3) and 
314
                           (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_states___root <= 6)))
315
                           then 
316
                                 (if ((not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_4 or 
317
                                    rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_complete_3)) and 
318
                                    (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_15_states___root = 4))
319
                                    then 0
320
                                    else 
321
                                 (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_2
322
                                    then 
323
                                          (if (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_5_states___root = 4)
324
                                             then 0
325
                                             else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_outports_setDesiredSpeed)
326
                                    else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_outports_setDesiredSpeed))
327
                           else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_9_outports_setDesiredSpeed)
328
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_2_outports_setDesiredSpeed))
329
         else chart_CruiseController_ModeLogic_mode_logic_begin_state_outports_setDesiredSpeed);
330

    
331
   
332
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_0 = (
333
      ((chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root >= 2) and 
334
      (chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root <= 8)) and 
335
      (not 
336
      (if (chart_CruiseController_ModeLogic_mode_logic_onOff <> 0)
337
         then true
338
         else false)));
339

    
340
   
341
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_1_states___root = 
342
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_0
343
         then 
344
               (if 
345
                  ((chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root >= 2) and 
346
                  (chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root <= 8))
347
                  then 
348
                        0
349
                  else chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root)
350
         else chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root);
351

    
352
   
353
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_2_states___root = 
354
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_0
355
         then 
356
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_1_states___root = 1))
357
                  then 
358

    
359
                        1
360
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_1_states___root)
361
         else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_1_states___root);
362

    
363
   
364

    
365
   
366
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_2_outports_setDesiredSpeed = 
367
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_0
368
         then 
369
               (if 
370

    
371
                  ((chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root >= 2) and 
372
                  (chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root <= 8))
373
                  then 
374
                        (if 
375

    
376
                           ((chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root >= 3) and 
377
                           (chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root <= 6))
378
                           then 
379
                                 (if (chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root = 4)
380
                                    then 0
381
                                    else chart_CruiseController_ModeLogic_mode_logic_begin_state_outports_setDesiredSpeed)
382
                           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

    
386
   
387

    
388
   
389
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_1 = ((rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_2_states___root = 1) and 
390
      (
391
      (if (chart_CruiseController_ModeLogic_mode_logic_onOff <> 0)
392
         then true
393
         else false) and 
394
      (not rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_0)));
395

    
396
   
397
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_complete_1 = (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_1 or 
398
      rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_0);
399

    
400
   
401

    
402
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_3_states___root = 
403
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_1
404
         then 
405
               (if (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_2_states___root = 1)
406
                  then 
407

    
408
                        0
409
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_2_states___root)
410
         else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_2_states___root);
411

    
412
   
413

    
414
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_3_outports_mode = 
415
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_0
416
         then 
417
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_1_states___root = 1))
418
                  then 1
419
                  else chart_CruiseController_ModeLogic_mode_logic_begin_state_outports_mode)
420
         else chart_CruiseController_ModeLogic_mode_logic_begin_state_outports_mode);
421

    
422
   
423
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root = 
424
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_1
425
         then rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root
426
         else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_3_states___root);
427

    
428
   
429

    
430
   
431
   rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_outports_mode = 
432
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_fired_1
433
         then 
434
               (if rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_fired_0
435
                  then 
436
                        (if (not (rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root = 7))
437
                           then 2
438
                           else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_3_outports_mode)
439
                  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

    
442
   
443

    
444
   
445
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_0 = (
446

    
447
      ((rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root >= 3) and 
448
      (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root <= 6)) and 
449
      (not 
450
      (if (chart_CruiseController_ModeLogic_mode_logic_safetyCondition <> 0)
451
         then true
452
         else false)));
453

    
454
   
455

    
456
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root = 
457
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_0
458
         then 
459
               (if 
460

    
461
                  ((rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root >= 3) and 
462
                  (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root <= 6))
463
                  then 
464

    
465
                        2
466
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root)
467
         else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root);
468

    
469
   
470
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_2_states___root = 
471
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_0
472
         then 
473
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root = 8))
474
                  then 
475

    
476
                        8
477
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root)
478
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root);
479

    
480
   
481

    
482
   
483
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_1 = ((rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_2_states___root = 8) and 
484
      ((
485
      (if (
486
         (if ((chart_CruiseController_ModeLogic_mode_logic_set = 1) = false)
487
            then 0
488
            else 1) <> 0)
489
         then true
490
         else false) and 
491
      
492
      (if (
493
         (if ((chart_CruiseController_ModeLogic_mode_logic_safetyCondition = 1) = false)
494
            then 0
495
            else 1) <> 0)
496
         then true
497
         else false)) and 
498
      (not rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_0)));
499

    
500
   
501
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_1 = (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_1 or 
502
      rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_0);
503

    
504
   
505

    
506
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root = 
507
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_1
508
         then 
509
               (if (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_2_states___root = 8)
510
                  then 
511

    
512
                        2
513
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_2_states___root)
514
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_2_states___root);
515

    
516
   
517

    
518
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_4_outports_mode = 
519
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_0
520
         then 
521
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root = 8))
522
                  then 3
523
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_outports_mode)
524
         else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_outports_mode);
525

    
526
   
527

    
528
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_5_states___root = 
529
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_1
530
         then rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root
531
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root);
532

    
533
   
534

    
535
   
536
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_2 = ((rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_5_states___root = 8) and 
537
      ((
538
      (if (
539
         (if ((
540
            (if (cruise_controller_CruiseController_ModeLogic_resumeEvent_Out = false)
541
               then 0
542
               else 1) = 1) = false)
543
            then 0
544
            else 1) <> 0)
545
         then true
546
         else false) and 
547
      
548
      (if (
549
         (if ((chart_CruiseController_ModeLogic_mode_logic_safetyCondition = 1) = false)
550
            then 0
551
            else 1) <> 0)
552
         then true
553
         else false)) and 
554
      (not rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_1)));
555

    
556
   
557
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_2 = (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_2 or 
558
      rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_1);
559

    
560
   
561

    
562
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_6_states___root = 
563
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_2
564
         then 
565
               (if (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_5_states___root = 8)
566
                  then 
567

    
568
                        2
569
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_5_states___root)
570
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_5_states___root);
571

    
572
   
573

    
574
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_6_outports_mode = 
575
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_1
576
         then 
577
               (if rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_0
578
                  then 
579
                        (if (not (rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root = 4))
580
                           then 4
581
                           else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_4_outports_mode)
582
                  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

    
585
   
586
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_7_states___root = 
587
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_2
588
         then rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root1
589
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_6_states___root);
590

    
591
   
592

    
593
   
594
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_3 = ((rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_7_states___root = 7) and 
595
      ((
596
      (if (
597
         (if ((chart_CruiseController_ModeLogic_mode_logic_set = 1) = false)
598
            then 0
599
            else 1) <> 0)
600
         then true
601
         else false) and 
602
      
603
      (if (
604
         (if ((chart_CruiseController_ModeLogic_mode_logic_safetyCondition = 1) = false)
605
            then 0
606
            else 1) <> 0)
607
         then true
608
         else false)) and 
609
      (not rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_2)));
610

    
611
   
612
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_3 = (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_3 or 
613
      rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_complete_2);
614

    
615
   
616

    
617
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_8_outports_mode = 
618
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_2
619
         then 
620
               (if rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_01
621
                  then 
622
                        (if (not (rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root1 = 4))
623
                           then 4
624
                           else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_6_outports_mode)
625
                  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

    
628
   
629

    
630
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_9_states___root = 
631
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_3
632
         then 
633
               (if (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_7_states___root = 7)
634
                  then 
635

    
636
                        2
637
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_7_states___root)
638
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_7_states___root);
639

    
640
   
641

    
642
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_9_outports_setDesiredSpeed = 
643
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_3
644
         then 1
645
         else 
646
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_1
647
         then 1
648
         else 
649
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_0
650
         then 
651
               (if 
652

    
653
                  ((rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root >= 3) and 
654
                  (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root <= 6))
655
                  then 
656
                        (if (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_4_states___root = 4)
657
                           then 0
658
                           else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_2_outports_setDesiredSpeed)
659
                  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

    
662
   
663

    
664
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_states___root = 
665
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_3
666
         then rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root2
667
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_9_states___root);
668

    
669
   
670

    
671
   
672

    
673
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_outports_mode = 
674
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_fired_3
675
         then 
676
               (if rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_02
677
                  then 
678
                        (if (not (rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root2 = 4))
679
                           then 4
680
                           else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_8_outports_mode)
681
                  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

    
684
   
685

    
686
   
687
   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 
688
      (chart_CruiseController_ModeLogic_mode_logic_set = 1));
689

    
690
   
691

    
692
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_2_states___root = 
693
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_0
694
         then 
695
               (if (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_states___root = 4)
696
                  then 
697

    
698
                        3
699
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_states___root)
700
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_states___root);
701

    
702
   
703

    
704
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_2_outports_setDesiredSpeed = 
705
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_0
706
         then 1
707
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_9_outports_setDesiredSpeed);
708

    
709
   
710

    
711
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root = 
712
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_0
713
         then 
714
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_2_states___root = 4))
715
                  then 
716

    
717
                        4
718
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_2_states___root)
719
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_2_states___root);
720

    
721
   
722

    
723
   
724
   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 
725
      ((chart_CruiseController_ModeLogic_mode_logic_accel = 1) and 
726
      (not rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_0)));
727

    
728
   
729
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_complete_1 = (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_1 or 
730
      rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_0);
731

    
732
   
733

    
734
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_states___root = 
735
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_1
736
         then 
737
               (if (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root = 4)
738
                  then 
739

    
740
                        3
741
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root)
742
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root);
743

    
744
   
745

    
746
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_outports_mode = 
747
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_0
748
         then 
749
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_2_states___root = 4))
750
                  then 4
751
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_outports_mode)
752
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_10_outports_mode);
753

    
754
   
755

    
756
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_outports_setDesiredSpeed = 
757
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_1
758
         then 
759
               (if (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root = 4)
760
                  then 0
761
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_2_outports_setDesiredSpeed)
762
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_2_outports_setDesiredSpeed);
763

    
764
   
765
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_5_states___root = 
766
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_1
767
         then 
768
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_states___root = 5))
769
                  then 
770

    
771
                        5
772
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_states___root)
773
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_states___root);
774

    
775
   
776

    
777
   
778
   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 
779
      ((chart_CruiseController_ModeLogic_mode_logic_decel = 1) and 
780
      (not rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_complete_1)));
781

    
782
   
783
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_complete_2 = (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_2 or 
784
      rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_complete_1);
785

    
786
   
787

    
788
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_6_states___root = 
789
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_2
790
         then 
791
               (if (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_5_states___root = 4)
792
                  then 
793

    
794
                        3
795
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_5_states___root)
796
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_5_states___root);
797

    
798
   
799

    
800
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_6_outports_mode = 
801
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_1
802
         then 
803
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_states___root = 5))
804
                  then 6
805
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_outports_mode)
806
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_4_outports_mode);
807

    
808
   
809
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_7_states___root = 
810
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_2
811
         then 
812
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_6_states___root = 6))
813
                  then 
814

    
815
                        6
816
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_6_states___root)
817
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_6_states___root);
818

    
819
   
820

    
821
   
822
   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 
823
      ((chart_CruiseController_ModeLogic_mode_logic_decel = 0) and 
824
      (not rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_complete_2)));
825

    
826
   
827
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_complete_3 = (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_3 or 
828
      rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_complete_2);
829

    
830
   
831

    
832
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_8_states___root = 
833
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_3
834
         then 
835
               (if (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_7_states___root = 6)
836
                  then 
837

    
838
                        3
839
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_7_states___root)
840
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_7_states___root);
841

    
842
   
843

    
844
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_8_outports_mode = 
845
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_2
846
         then 
847
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_6_states___root = 6))
848
                  then 5
849
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_6_outports_mode)
850
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_6_outports_mode);
851

    
852
   
853
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_9_states___root = 
854
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_3
855
         then 
856
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_8_states___root = 4))
857
                  then 
858

    
859
                        4
860
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_8_states___root)
861
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_8_states___root);
862

    
863
   
864

    
865
   
866
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_9_outports_mode = 
867
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_3
868
         then 
869
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_8_states___root = 4))
870
                  then 4
871
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_8_outports_mode)
872
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_8_outports_mode);
873

    
874
   
875

    
876
   
877
   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 
878
      ((chart_CruiseController_ModeLogic_mode_logic_accel = 0) and 
879
      (not rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_complete_3)));
880

    
881
   
882

    
883
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_10_states___root = 
884
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_4
885
         then 
886
               (if (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_9_states___root = 5)
887
                  then 
888

    
889
                        3
890
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_9_states___root)
891
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_9_states___root);
892

    
893
   
894
   rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_15_states___root = 
895
      (if rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_4
896
         then 
897
               (if (not (rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_10_states___root = 4))
898
                  then 
899

    
900
                        4
901
                  else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_10_states___root)
902
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_10_states___root);
903

    
904
   
905

    
906
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root2 = 
907
      (if (not 
908

    
909
         ((rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_9_states___root >= 3) and 
910
         (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_9_states___root <= 6)))
911
         then 
912

    
913
               3
914
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_9_states___root);
915

    
916
   
917
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_02 = ((not 
918

    
919
      ((rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_9_states___root >= 3) and 
920
      (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_9_states___root <= 6))) and 
921
      
922

    
923
      ((rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root2 >= 3) and 
924
      (rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root2 <= 6)));
925

    
926
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root2 = 
927
      (if rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_02
928
         then 
929
               (if (not (rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root2 = 4))
930
                  then 
931

    
932
                        4
933
                  else rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root2)
934
         else rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root2);
935

    
936
   
937

    
938
   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 
939
      ((rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root2 = 5) or 
940
      (rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root2 = 6)));
941

    
942
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root1 = 
943
      (if (not 
944

    
945
         ((rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_6_states___root >= 3) and 
946
         (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_6_states___root <= 6)))
947
         then 
948

    
949
               3
950
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_6_states___root);
951

    
952
   
953
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_01 = ((not 
954

    
955
      ((rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_6_states___root >= 3) and 
956
      (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_6_states___root <= 6))) and 
957
      
958

    
959
      ((rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root1 >= 3) and 
960
      (rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root1 <= 6)));
961

    
962
   
963
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root1 = 
964
      (if rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_01
965
         then 
966
               (if (not (rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root1 = 4))
967
                  then 
968

    
969
                        4
970
                  else rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root1)
971
         else rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root1);
972

    
973
   
974

    
975
   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 
976
      ((rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root1 = 5) or 
977
      (rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root1 = 6)));
978

    
979
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root = 
980
      (if (not 
981

    
982
         ((rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root >= 3) and 
983
         (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root <= 6)))
984
         then 
985

    
986
               3
987
         else rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root);
988

    
989
   
990
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_0 = ((not 
991

    
992
      ((rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root >= 3) and 
993
      (rlt_eval_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root <= 6))) and 
994
      
995

    
996
      ((rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root >= 3) and 
997
      (rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root <= 6)));
998

    
999
   
1000
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root = 
1001
      (if rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_fired_0
1002
         then 
1003
               (if (not (rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root = 4))
1004
                  then 
1005

    
1006
                        4
1007
                  else rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root)
1008
         else rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_1_states___root);
1009

    
1010
   
1011

    
1012
   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 
1013
      ((rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root = 5) or 
1014
      (rlt_enter_CruiseController_ModeLogic_mode_logic_On_Active_rlt_state_3_states___root = 6)));
1015

    
1016
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root = 
1017
      (if (not 
1018

    
1019
         ((rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_3_states___root >= 2) and 
1020
         (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_3_states___root <= 8)))
1021
         then 
1022

    
1023
               2
1024
         else rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_3_states___root);
1025

    
1026
   
1027
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_fired_0 = ((not 
1028

    
1029
      ((rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_3_states___root >= 2) and 
1030
      (rlt_eval_CruiseController_ModeLogic_mode_logic_rlt_state_3_states___root <= 8))) and 
1031
      
1032

    
1033
      ((rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root >= 2) and 
1034
      (rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root <= 8)));
1035

    
1036
   
1037
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root = 
1038
      (if rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_fired_0
1039
         then 
1040
               (if (not (rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root = 7))
1041
                  then 
1042

    
1043
                        7
1044
                  else rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root)
1045
         else rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_1_states___root);
1046

    
1047
   
1048

    
1049
   rlt_enter_CruiseController_ModeLogic_mode_logic_On_rltCheckEntryStateConsistency_0 = (
1050

    
1051
      ((rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root >= 3) and 
1052
      (rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root <= 6)) or 
1053
      ((rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root = 7) or 
1054
      (rlt_enter_CruiseController_ModeLogic_mode_logic_On_rlt_state_3_states___root = 8)));
1055

    
1056
   
1057
   rlt_enter_CruiseController_ModeLogic_mode_logic_rlt_state_2_states___root = 
1058
      (if (not (chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root = 1))
1059
         then 
1060

    
1061
               1
1062
         else chart_CruiseController_ModeLogic_mode_logic_begin_state_states___root);
1063

    
1064
   
1065

    
1066
   rlt_enter_CruiseController_ModeLogic_mode_logic_rltCheckEntryStateConsistency_0 = ((rlt_enter_CruiseController_ModeLogic_mode_logic_rlt_state_2_states___root = 1) or 
1067
      
1068

    
1069
      ((rlt_enter_CruiseController_ModeLogic_mode_logic_rlt_state_2_states___root >= 2) and 
1070
      (rlt_enter_CruiseController_ModeLogic_mode_logic_rlt_state_2_states___root <= 8)));
1071

    
1072
   cruise_controller_CruiseController_ModeLogic_resumeEvent_Out = (false -> ((not (pre accelResume)) and 
1073
      accelResume));
1074

    
1075
   cruise_controller_CruiseController_ModeLogic_safetyCondition_safetyCondition = (((((not cancel) and 
1076
      (not brakePedal)) and 
1077
      
1078
      (if (carGear = 3)
1079
         then true
1080
         else false)) and 
1081
      
1082
      (if (carSpeed >= 15.0)
1083
         then true
1084
         else false)) and 
1085
      validInputs);
1086

    
1087
   cruise_controller_CruiseController_ModeLogic_setEvent_Out = (false -> ((not (pre decelSet)) and 
1088
      decelSet));
1089

    
1090
   cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed = 
1091
      (if (chart_CruiseController_ModeLogic_mode_logic_setDesiredSpeed <> 0)
1092
         then true
1093
         else false);
1094

    
1095
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_clock = 
1096
      (if (mode = 5)
1097
         then true
1098
         else false);
1099

    
1100
   newDesiredSpeed1 = (
1101
      (if (rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_init_step and 
1102
         (not rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_clock))
1103
         then 0.0
1104
         else (cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed - 0.05)) -> 
1105
      (if (rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_init_step and 
1106
         (not rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_clock))
1107
         then 0.0
1108
         else 
1109
      (if rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_clock
1110
         then (cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed - 0.05)
1111
         else (pre newDesiredSpeed1))));
1112

    
1113
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_init_step = (true -> 
1114
      (if (pre rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_clock)
1115
         then false
1116
         else (pre rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeDecreaseInDesiredSpeed_rlt_init_step)));
1117

    
1118
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_clock = 
1119
      (if (mode = 6)
1120
         then true
1121
         else false);
1122

    
1123
   newDesiredSpeed = (
1124
      (if (rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_init_step and 
1125
         (not rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_clock))
1126
         then 0.0
1127
         else (cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed + 0.05)) -> 
1128
      (if (rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_init_step and 
1129
         (not rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_clock))
1130
         then 0.0
1131
         else 
1132
      (if rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_clock
1133
         then (cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed + 0.05)
1134
         else (pre newDesiredSpeed))));
1135

    
1136
   rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_init_step = (true -> 
1137
      (if (pre rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_clock)
1138
         then false
1139
         else (pre rlt_condact_cruise_controller_CruiseController_SetDesiredSpeed_computeIncreaseInDesiredSpeed_rlt_init_step)));
1140

    
1141
   cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed = 
1142
      (if 
1143
         (if (mode = 6)
1144
            then true
1145
            else false)
1146
         then newDesiredSpeed
1147
         else 
1148
      (if 
1149
         (if (mode = 5)
1150
            then true
1151
            else false)
1152
         then newDesiredSpeed1
1153
         else 
1154
      (if 
1155
         (if (mode = 4)
1156
            then true
1157
            else false)
1158
         then cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed
1159
         else 
1160
      (if 
1161
         (if (mode = 3)
1162
            then true
1163
            else false)
1164
         then cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed
1165
         else 0.0))));
1166

    
1167
   cruise_controller_CruiseController_SetDesiredSpeed_GOTOL_prevDesiredSpeed = (0.0 -> 
1168
      (if (
1169
         (if (pre cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed)
1170
            then (pre carSpeed)
1171
            else (pre cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed)) < 0.0)
1172
         then 0.0
1173
         else 
1174
      (if (
1175
         (if (pre cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed)
1176
            then (pre carSpeed)
1177
            else (pre cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed)) > 100.0)
1178
         then 100.0
1179
         else 
1180
      (if (pre cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed)
1181
         then (pre carSpeed)
1182
         else (pre cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed)))));
1183

    
1184
   cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta = (((
1185
      (if (((
1186
         (if (
1187
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1188
               then carSpeed
1189
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1190
            then 0.0
1191
            else 
1192
         (if (
1193
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1194
               then carSpeed
1195
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1196
            then 100.0
1197
            else 
1198
         (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1199
            then carSpeed
1200
            else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed))) - carSpeed) * 1.0) < ( -10.0))
1201
         then ( -10.0)
1202
         else 
1203
      (if (((
1204
         (if (
1205
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1206
               then carSpeed
1207
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1208
            then 0.0
1209
            else 
1210
         (if (
1211
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1212
               then carSpeed
1213
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1214
            then 100.0
1215
            else 
1216
         (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1217
            then carSpeed
1218
            else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed))) - carSpeed) * 1.0) > 10.0)
1219
         then 10.0
1220
         else ((
1221
               (if (
1222
                  (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1223
                     then carSpeed
1224
                     else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1225
                  then 0.0
1226
                  else 
1227
               (if (
1228
                  (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1229
                     then carSpeed
1230
                     else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1231
                  then 100.0
1232
                  else 
1233
               (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1234
                  then carSpeed
1235
                  else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed))) - carSpeed) * 1.0))) / 20.0) + 0.0) -> ((
1236
      (if (((
1237
         (if (
1238
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1239
               then carSpeed
1240
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1241
            then 0.0
1242
            else 
1243
         (if (
1244
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1245
               then carSpeed
1246
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1247
            then 100.0
1248
            else 
1249
         (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1250
            then carSpeed
1251
            else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed))) - carSpeed) * 1.0) < ( -10.0))
1252
         then ( -10.0)
1253
         else 
1254
      (if (((
1255
         (if (
1256
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1257
               then carSpeed
1258
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1259
            then 0.0
1260
            else 
1261
         (if (
1262
            (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1263
               then carSpeed
1264
               else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1265
            then 100.0
1266
            else 
1267
         (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1268
            then carSpeed
1269
            else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed))) - carSpeed) * 1.0) > 10.0)
1270
         then 10.0
1271
         else ((
1272
               (if (
1273
                  (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1274
                     then carSpeed
1275
                     else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1276
                  then 0.0
1277
                  else 
1278
               (if (
1279
                  (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1280
                     then carSpeed
1281
                     else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1282
                  then 100.0
1283
                  else 
1284
               (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1285
                  then carSpeed
1286
                  else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed))) - carSpeed) * 1.0))) / 20.0) + 
1287
      (if ((
1288
         (if ((pre mode) = 4)
1289
            then true
1290
            else false) or 
1291
         
1292
         (if ((pre mode) = 5)
1293
            then true
1294
            else false)) or 
1295
         
1296
         (if ((pre mode) = 6)
1297
            then true
1298
            else false))
1299
         then 
1300
               (if ((pre cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta) < 0.0)
1301
                  then 0.0
1302
                  else 
1303
               (if ((pre cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta) > 100.0)
1304
                  then 100.0
1305
                  else (pre cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta)))
1306
         else 0.0)));
1307

    
1308
   cruiseThrottle = 
1309
      (if ((
1310
         (if (mode = 4)
1311
            then true
1312
            else false) or 
1313
         
1314
         (if (mode = 5)
1315
            then true
1316
            else false)) or 
1317
         
1318
         (if (mode = 6)
1319
            then true
1320
            else false))
1321
         then 
1322
               (if (cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta < 0.0)
1323
                  then 0.0
1324
                  else 
1325
               (if (cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta > 100.0)
1326
                  then 100.0
1327
                  else cruise_controller_CruiseController_SetThrottle_cruiseThrottlePrevPlusDelta))
1328
         else 0.0);
1329

    
1330
   desiredSpeed = 
1331
      (if (
1332
         (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1333
            then carSpeed
1334
            else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) < 0.0)
1335
         then 0.0
1336
         else 
1337
      (if (
1338
         (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1339
            then carSpeed
1340
            else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed) > 100.0)
1341
         then 100.0
1342
         else 
1343
      (if cruise_controller_CruiseController_SetDesiredSpeed_setDesiredSpeed
1344
         then carSpeed
1345
         else cruise_controller_CruiseController_SetDesiredSpeed_IncreaseDesiredSpeed)));
1346

    
1347
  OK = (( desiredSpeed = 0.0 ) or ( desiredSpeed >= 15.0 ) ) ;
1348
  
1349

    
1350
  --%PROPERTY OK=true;
1351
  --%MAIN;
1352

    
1353
tel
1354