Project

General

Profile

Download (6.83 KB) Statistics
| Branch: | Tag: | Revision:
1 4748b215 hbourbou
-- This file has been generated by CoCoSim2.
2
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:22:07
5
node  _max_int(x : int;
6
	y : int;)
7
returns(z : int;);
8
let
9
	z = if (x > y) then
10
		x
11
	    else y;
12
tel
13
14
node  _min_int(x : int;
15
	y : int;)
16
returns(z : int;);
17
let
18
	z = if (x < y) then
19
		x
20
	    else y;
21
tel
22
23
(*
24
Original block name: ex_bus_tutorial_virtual_PP/Subsystem/Saturation
25
*)
26
node  Saturation_57_172(In_1 : int;
27
	In_2 : int;
28
	In_3 : int;
29
	__time_step : real;
30
	__nb_step : int;)
31
returns(Out_1 : int;
32
	Out_2 : int;
33
	Out_3 : int;);
34
var lower_1 : int;
35
	lower_2 : int;
36
	lower_3 : int;
37
	lower_limit_1 : int;
38
	upper_1 : int;
39
	upper_2 : int;
40
	upper_3 : int;
41
	upper_limit_1 : int;
42
let
43
	lower_1 = _max_int(upper_1, lower_limit_1);
44
	lower_2 = _max_int(upper_2, lower_limit_1);
45
	lower_3 = _max_int(upper_3, lower_limit_1);
46
	lower_limit_1 = -5;
47
	upper_1 = _min_int(upper_limit_1, In_1);
48
	upper_2 = _min_int(upper_limit_1, In_2);
49
	upper_3 = _min_int(upper_limit_1, In_3);
50
	upper_limit_1 = 1;
51
	Out_1 = lower_1;
52
	Out_2 = lower_2;
53
	Out_3 = lower_3;
54
tel
55
56
(*
57
Original block name: ex_bus_tutorial_virtual_PP/Subsystem
58
*)
59
node  Subsystem_51_081(In1_1 : real;
60
	In1_2 : real;
61
	In1_3 : int;
62
	In1_4 : int;
63
	In1_5 : int;
64
	In1_6 : bool;
65
	In1_7 : bool;
66
	In1_8 : bool;
67
	In1_9 : bool;
68
	__time_step : real;
69
	__nb_step : int;)
70
returns(Out1_1_BusElem1 : real;
71
	Out1_1_BusElem2 : real;
72
	Out1_1_BusElem3 : int;
73
	Out1_1_BusElem4 : int;
74
	Out1_1_BusElem5 : int;
75
	Out1_1_BusElem6 : bool;
76
	Out1_1_BusElem7 : bool;
77
	Out1_1_BusElem8 : bool;
78
	Out1_1_BusElem9 : bool;);
79
var BusCreator_1 : real;
80
	BusCreator_2 : real;
81
	BusCreator_3 : int;
82
	BusCreator_4 : int;
83
	BusCreator_5 : int;
84
	BusCreator1_1 : real;
85
	BusCreator1_2 : real;
86
	BusCreator1_3 : int;
87
	BusCreator1_4 : int;
88
	BusCreator1_5 : int;
89
	BusCreator1_6 : bool;
90
	BusCreator1_7 : bool;
91
	BusCreator1_8 : bool;
92
	BusCreator1_9 : bool;
93
	BusSelector_1 : real;
94
	BusSelector_2 : real;
95
	BusSelector_3 : int;
96
	BusSelector_4 : int;
97
	BusSelector_5 : int;
98
	BusSelector_6 : bool;
99
	BusSelector_7 : bool;
100
	BusSelector_8 : bool;
101
	BusSelector_9 : bool;
102
	BusSelector_10 : real;
103
	BusSelector_11 : real;
104
	BusSelector_12 : int;
105
	BusSelector_13 : int;
106
	BusSelector_14 : int;
107
	Saturation_1 : int;
108
	Saturation_2 : int;
109
	Saturation_3 : int;
110
	SignalConversion_1_BusElem1 : real;
111
	SignalConversion_1_BusElem2 : real;
112
	SignalConversion_1_BusElem3 : int;
113
	SignalConversion_1_BusElem4 : int;
114
	SignalConversion_1_BusElem5 : int;
115
	SignalConversion_1_BusElem6 : bool;
116
	SignalConversion_1_BusElem7 : bool;
117
	SignalConversion_1_BusElem8 : bool;
118
	SignalConversion_1_BusElem9 : bool;
119
let
120
	BusCreator_1 = BusSelector_1;
121
	BusCreator_2 = BusSelector_2;
122
	BusCreator_3 = Saturation_1;
123
	BusCreator_4 = Saturation_2;
124
	BusCreator_5 = Saturation_3;
125
	BusCreator1_1 = BusCreator_1;
126
	BusCreator1_2 = BusCreator_2;
127
	BusCreator1_3 = BusCreator_3;
128
	BusCreator1_4 = BusCreator_4;
129
	BusCreator1_5 = BusCreator_5;
130
	BusCreator1_6 = BusSelector_6;
131
	BusCreator1_7 = BusSelector_7;
132
	BusCreator1_8 = BusSelector_8;
133
	BusCreator1_9 = BusSelector_9;
134
	BusSelector_1 = In1_1;
135
	BusSelector_2 = In1_2;
136
	BusSelector_3 = In1_3;
137
	BusSelector_4 = In1_4;
138
	BusSelector_5 = In1_5;
139
	BusSelector_6 = In1_6;
140
	BusSelector_7 = In1_7;
141
	BusSelector_8 = In1_8;
142
	BusSelector_9 = In1_9;
143
	BusSelector_10 = In1_1;
144
	BusSelector_11 = In1_2;
145
	BusSelector_12 = In1_3;
146
	BusSelector_13 = In1_4;
147
	BusSelector_14 = In1_5;
148
	(Saturation_1, Saturation_2, Saturation_3) = Saturation_57_172(BusSelector_3, BusSelector_4, BusSelector_5, __time_step, __nb_step);
149
	SignalConversion_1_BusElem1 = BusCreator1_1;
150
	SignalConversion_1_BusElem2 = BusCreator1_2;
151
	SignalConversion_1_BusElem3 = BusCreator1_3;
152
	SignalConversion_1_BusElem4 = BusCreator1_4;
153
	SignalConversion_1_BusElem5 = BusCreator1_5;
154
	SignalConversion_1_BusElem6 = BusCreator1_6;
155
	SignalConversion_1_BusElem7 = BusCreator1_7;
156
	SignalConversion_1_BusElem8 = BusCreator1_8;
157
	SignalConversion_1_BusElem9 = BusCreator1_9;
158
	Out1_1_BusElem1 = SignalConversion_1_BusElem1;
159
	Out1_1_BusElem2 = SignalConversion_1_BusElem2;
160
	Out1_1_BusElem3 = SignalConversion_1_BusElem3;
161
	Out1_1_BusElem4 = SignalConversion_1_BusElem4;
162
	Out1_1_BusElem5 = SignalConversion_1_BusElem5;
163
	Out1_1_BusElem6 = SignalConversion_1_BusElem6;
164
	Out1_1_BusElem7 = SignalConversion_1_BusElem7;
165
	Out1_1_BusElem8 = SignalConversion_1_BusElem8;
166
	Out1_1_BusElem9 = SignalConversion_1_BusElem9;
167
tel
168
169
(*
170
Original block name: ex_bus_tutorial_virtual_PP
171
*)
172
node  ex_bus_tutorial_virtual_PP(chirp_1 : real;
173
	chirp_2 : real;
174
	sine_1 : int;
175
	sine_2 : int;
176
	sine_3 : int;
177
	step_1 : bool;
178
	step_2 : bool;
179
	step_3 : bool;
180
	step_4 : bool;)
181
returns(Out1_1 : real;
182
	Out1_2 : real;
183
	Out2_1 : int;
184
	Out2_2 : int;
185
	Out2_3 : int;
186
	Out3_1 : bool;
187
	Out3_2 : bool;
188
	Out3_3 : bool;
189
	Out3_4 : bool;);
190
var BusCreator_1 : real;
191
	BusCreator_2 : real;
192
	BusCreator_3 : int;
193
	BusCreator_4 : int;
194
	BusCreator_5 : int;
195
	BusCreator1_1 : real;
196
	BusCreator1_2 : real;
197
	BusCreator1_3 : int;
198
	BusCreator1_4 : int;
199
	BusCreator1_5 : int;
200
	BusCreator1_6 : bool;
201
	BusCreator1_7 : bool;
202
	BusCreator1_8 : bool;
203
	BusCreator1_9 : bool;
204
	BusSelector_1 : real;
205
	BusSelector_2 : real;
206
	BusSelector_3 : int;
207
	BusSelector_4 : int;
208
	BusSelector_5 : int;
209
	BusSelector_6 : bool;
210
	BusSelector_7 : bool;
211
	BusSelector_8 : bool;
212
	BusSelector_9 : bool;
213
	Subsystem_1_BusElem1 : real;
214
	Subsystem_1_BusElem2 : real;
215
	Subsystem_1_BusElem3 : int;
216
	Subsystem_1_BusElem4 : int;
217
	Subsystem_1_BusElem5 : int;
218
	Subsystem_1_BusElem6 : bool;
219
	Subsystem_1_BusElem7 : bool;
220
	Subsystem_1_BusElem8 : bool;
221
	Subsystem_1_BusElem9 : bool;
222
	__time_step : real;
223
	__nb_step : int;
224
let
225
	BusCreator_1 = chirp_1;
226
	BusCreator_2 = chirp_2;
227
	BusCreator_3 = sine_1;
228
	BusCreator_4 = sine_2;
229
	BusCreator_5 = sine_3;
230
	BusCreator1_1 = BusCreator_1;
231
	BusCreator1_2 = BusCreator_2;
232
	BusCreator1_3 = BusCreator_3;
233
	BusCreator1_4 = BusCreator_4;
234
	BusCreator1_5 = BusCreator_5;
235
	BusCreator1_6 = step_1;
236
	BusCreator1_7 = step_2;
237
	BusCreator1_8 = step_3;
238
	BusCreator1_9 = step_4;
239
	BusSelector_1 = Subsystem_1_BusElem1;
240
	BusSelector_2 = Subsystem_1_BusElem2;
241
	BusSelector_3 = Subsystem_1_BusElem3;
242
	BusSelector_4 = Subsystem_1_BusElem4;
243
	BusSelector_5 = Subsystem_1_BusElem5;
244
	BusSelector_6 = Subsystem_1_BusElem6;
245
	BusSelector_7 = Subsystem_1_BusElem7;
246
	BusSelector_8 = Subsystem_1_BusElem8;
247
	BusSelector_9 = Subsystem_1_BusElem9;
248
	(Subsystem_1_BusElem1, Subsystem_1_BusElem2, Subsystem_1_BusElem3, Subsystem_1_BusElem4, Subsystem_1_BusElem5, Subsystem_1_BusElem6, Subsystem_1_BusElem7, Subsystem_1_BusElem8, Subsystem_1_BusElem9) = Subsystem_51_081(BusCreator1_1, BusCreator1_2, BusCreator1_3, BusCreator1_4, BusCreator1_5, BusCreator1_6, BusCreator1_7, BusCreator1_8, BusCreator1_9, __time_step, __nb_step);
249
	Out1_1 = BusSelector_1;
250
	Out1_2 = BusSelector_2;
251
	Out2_1 = BusSelector_3;
252
	Out2_2 = BusSelector_4;
253
	Out2_3 = BusSelector_5;
254
	Out3_1 = BusSelector_6;
255
	Out3_2 = BusSelector_7;
256
	Out3_3 = BusSelector_8;
257
	Out3_4 = BusSelector_9;
258
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
259
	__nb_step = (0 -> ((pre __nb_step) + 1));
260
tel