Project

General

Profile

Download (4.34 KB) Statistics
| Branch: | Tag: | Revision:
1
-- This file has been generated by CoCoSim2.
2

    
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:05:58
5
(*
6
Original block name: IF_with_EnabledSS_PP/ActionSubsystem1
7
*)
8
node  ActionSubsystem1_50_010_automaton(In1_1 : real;
9
	_isEnabled : bool;
10
	__time_step : real;
11
	__nb_step : int;)
12
returns(Out1_1 : real;);
13
var pre_Out1_1 : real;
14
let
15
	pre_Out1_1 = if (__nb_step > 0) then
16
		(pre Out1_1)
17
	    else 0.000000000000000;
18
	automaton enabled_ActionSubsystem1_50_010
19
	state Active_ActionSubsystem1_50_010:
20
	unless (not _isEnabled) restart Inactive_ActionSubsystem1_50_010
21
	let
22
		Out1_1 = ActionSubsystem1_50_010(In1_1, __time_step, __nb_step);
23
	tel
24

    
25
	state Inactive_ActionSubsystem1_50_010:
26
	unless _isEnabled restart Active_ActionSubsystem1_50_010
27
	let
28
		Out1_1 = pre_Out1_1;
29
	tel
30

    
31

    
32
tel
33

    
34
(*
35
Original block name: IF_with_EnabledSS_PP/ActionSubsystem1
36
*)
37
node  ActionSubsystem1_50_010(In1_1 : real;
38
	__time_step : real;
39
	__nb_step : int;)
40
returns(Out1_1 : real;);
41
var UnitDelay_1 : real;
42
let
43
	UnitDelay_1 = (0.000000000000000 -> (pre In1_1));
44
	Out1_1 = UnitDelay_1;
45
tel
46

    
47
(*
48
Original block name: IF_with_EnabledSS_PP/ActionSubsystem2
49
*)
50
node  ActionSubsystem2_57_013_automaton(In1_1 : real;
51
	_isEnabled : bool;
52
	__time_step : real;
53
	__nb_step : int;)
54
returns(Out1_1 : real;);
55
var pre_Out1_1 : real;
56
let
57
	pre_Out1_1 = if (__nb_step > 0) then
58
		(pre Out1_1)
59
	    else 0.000000000000000;
60
	automaton enabled_ActionSubsystem2_57_013
61
	state Active_ActionSubsystem2_57_013:
62
	unless (not _isEnabled) restart Inactive_ActionSubsystem2_57_013
63
	let
64
		Out1_1 = ActionSubsystem2_57_013(In1_1, __time_step, __nb_step);
65
	tel
66

    
67
	state Inactive_ActionSubsystem2_57_013:
68
	unless _isEnabled resume Active_ActionSubsystem2_57_013
69
	let
70
		Out1_1 = pre_Out1_1;
71
	tel
72

    
73

    
74
tel
75

    
76
(*
77
Original block name: IF_with_EnabledSS_PP/ActionSubsystem2
78
*)
79
node  ActionSubsystem2_57_013(In1_1 : real;
80
	__time_step : real;
81
	__nb_step : int;)
82
returns(Out1_1 : real;);
83
var UnitDelay_1 : real;
84
let
85
	UnitDelay_1 = (0.000000000000000 -> (pre In1_1));
86
	Out1_1 = UnitDelay_1;
87
tel
88

    
89
(*
90
Original block name: IF_with_EnabledSS_PP/ActionSubsystem3
91
*)
92
node  ActionSubsystem3_64_010_automaton(In1_1 : real;
93
	_isEnabled : bool;
94
	__time_step : real;
95
	__nb_step : int;)
96
returns(Out1_1 : real;);
97
var pre_Out1_1 : real;
98
let
99
	pre_Out1_1 = if (__nb_step > 0) then
100
		(pre Out1_1)
101
	    else 0.000000000000000;
102
	automaton enabled_ActionSubsystem3_64_010
103
	state Active_ActionSubsystem3_64_010:
104
	unless (not _isEnabled) restart Inactive_ActionSubsystem3_64_010
105
	let
106
		Out1_1 = ActionSubsystem3_64_010(In1_1, __time_step, __nb_step);
107
	tel
108

    
109
	state Inactive_ActionSubsystem3_64_010:
110
	unless _isEnabled resume Active_ActionSubsystem3_64_010
111
	let
112
		Out1_1 = pre_Out1_1;
113
	tel
114

    
115

    
116
tel
117

    
118
(*
119
Original block name: IF_with_EnabledSS_PP/ActionSubsystem3
120
*)
121
node  ActionSubsystem3_64_010(In1_1 : real;
122
	__time_step : real;
123
	__nb_step : int;)
124
returns(Out1_1 : real;);
125
var UnitDelay_1 : real;
126
let
127
	UnitDelay_1 = (0.000000000000000 -> (pre In1_1));
128
	Out1_1 = UnitDelay_1;
129
tel
130

    
131
(*
132
Original block name: IF_with_EnabledSS_PP
133
*)
134
node  IF_with_EnabledSS_PP(In1_1 : int;
135
	In1_2 : int;
136
	In1_3 : int;
137
	In2_1 : real;
138
	In3_1 : int;
139
	In3_2 : int;
140
	In3_3 : int;)
141
returns(Out1_1 : real;
142
	Out2_1 : real;
143
	Out3_1 : real;);
144
var ExecutionCond_of_ActionSubsystem1_50_010 : bool;
145
	ActionSubsystem1_1 : real;
146
	ExecutionCond_of_ActionSubsystem2_57_013 : bool;
147
	ActionSubsystem2_1 : real;
148
	ExecutionCond_of_ActionSubsystem3_64_010 : bool;
149
	ActionSubsystem3_1 : real;
150
	If2_1 : bool;
151
	If2_2 : bool;
152
	If2_3 : bool;
153
	__time_step : real;
154
	__nb_step : int;
155
let
156
	ExecutionCond_of_ActionSubsystem1_50_010 = If2_1;
157
	ActionSubsystem1_1 = ActionSubsystem1_50_010_automaton(In2_1, ExecutionCond_of_ActionSubsystem1_50_010, __time_step, __nb_step);
158
	ExecutionCond_of_ActionSubsystem2_57_013 = If2_2;
159
	ActionSubsystem2_1 = ActionSubsystem2_57_013_automaton(In2_1, ExecutionCond_of_ActionSubsystem2_57_013, __time_step, __nb_step);
160
	ExecutionCond_of_ActionSubsystem3_64_010 = If2_3;
161
	ActionSubsystem3_1 = ActionSubsystem3_64_010_automaton(In2_1, ExecutionCond_of_ActionSubsystem3_64_010, __time_step, __nb_step);
162
	(If2_1, If2_2, If2_3) = if In1_1 > 1 then
163
		(true, false, false)
164
	    else if In3_3 > 0 then
165
		(false, true, false)
166
	    else (false, false, true);
167
	Out1_1 = ActionSubsystem1_1;
168
	Out2_1 = ActionSubsystem2_1;
169
	Out3_1 = ActionSubsystem3_1;
170
	__time_step = (0.0 -> ((pre __time_step) + 0.020000000000000));
171
	__nb_step = (0 -> ((pre __nb_step) + 1));
172
tel
173

    
(787-787/1153)