Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / Simulink / src_many_files / ex_bus_tutorial_nonvirtual_PP.LUSTREC.lus @ cd1faebc

History | View | Annotate | Download (6.04 KB)

1 4748b215 hbourbou
-- This file has been generated by CoCoSim2.
2
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:21:56
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_nonvirtual_PP/Subsystem/Saturation
25
*)
26
node  Saturation_48_513(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 = -1;
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_nonvirtual_PP/Subsystem
58
*)
59
node  Subsystem_43_280(In1_1_BusElem1 : real;
60
	In1_1_BusElem2 : real;
61
	In1_1_BusElem3 : int;
62
	In1_1_BusElem4 : int;
63
	In1_1_BusElem5 : int;
64
	In1_1_BusElem6 : bool;
65
	In1_1_BusElem7 : bool;
66
	In1_1_BusElem8 : bool;
67
	In1_1_BusElem9 : 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_BusElem1 : real;
80
	BusCreator_1_BusElem2 : real;
81
	BusCreator_1_BusElem3 : int;
82
	BusCreator_1_BusElem4 : int;
83
	BusCreator_1_BusElem5 : int;
84
	BusCreator1_1_BusElem1 : real;
85
	BusCreator1_1_BusElem2 : real;
86
	BusCreator1_1_BusElem3 : int;
87
	BusCreator1_1_BusElem4 : int;
88
	BusCreator1_1_BusElem5 : int;
89
	BusCreator1_1_BusElem6 : bool;
90
	BusCreator1_1_BusElem7 : bool;
91
	BusCreator1_1_BusElem8 : bool;
92
	BusCreator1_1_BusElem9 : 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
	Saturation_1 : int;
103
	Saturation_2 : int;
104
	Saturation_3 : int;
105
let
106
	BusCreator_1_BusElem1 = BusSelector_1;
107
	BusCreator_1_BusElem2 = BusSelector_2;
108
	BusCreator_1_BusElem3 = Saturation_1;
109
	BusCreator_1_BusElem4 = Saturation_2;
110
	BusCreator_1_BusElem5 = Saturation_3;
111
	BusCreator1_1_BusElem1 = BusCreator_1_BusElem1;
112
	BusCreator1_1_BusElem2 = BusCreator_1_BusElem2;
113
	BusCreator1_1_BusElem3 = BusCreator_1_BusElem3;
114
	BusCreator1_1_BusElem4 = BusCreator_1_BusElem4;
115
	BusCreator1_1_BusElem5 = BusCreator_1_BusElem5;
116
	BusCreator1_1_BusElem6 = BusSelector_6;
117
	BusCreator1_1_BusElem7 = BusSelector_7;
118
	BusCreator1_1_BusElem8 = BusSelector_8;
119
	BusCreator1_1_BusElem9 = BusSelector_9;
120
	BusSelector_1 = In1_1_BusElem1;
121
	BusSelector_2 = In1_1_BusElem2;
122
	BusSelector_3 = In1_1_BusElem3;
123
	BusSelector_4 = In1_1_BusElem4;
124
	BusSelector_5 = In1_1_BusElem5;
125
	BusSelector_6 = In1_1_BusElem6;
126
	BusSelector_7 = In1_1_BusElem7;
127
	BusSelector_8 = In1_1_BusElem8;
128
	BusSelector_9 = In1_1_BusElem9;
129
	(Saturation_1, Saturation_2, Saturation_3) = Saturation_48_513(BusSelector_3, BusSelector_4, BusSelector_5, __time_step, __nb_step);
130
	Out1_1_BusElem1 = BusCreator1_1_BusElem1;
131
	Out1_1_BusElem2 = BusCreator1_1_BusElem2;
132
	Out1_1_BusElem3 = BusCreator1_1_BusElem3;
133
	Out1_1_BusElem4 = BusCreator1_1_BusElem4;
134
	Out1_1_BusElem5 = BusCreator1_1_BusElem5;
135
	Out1_1_BusElem6 = BusCreator1_1_BusElem6;
136
	Out1_1_BusElem7 = BusCreator1_1_BusElem7;
137
	Out1_1_BusElem8 = BusCreator1_1_BusElem8;
138
	Out1_1_BusElem9 = BusCreator1_1_BusElem9;
139
tel
140
141
(*
142
Original block name: ex_bus_tutorial_nonvirtual_PP
143
*)
144
node  ex_bus_tutorial_nonvirtual_PP(chirp_1 : real;
145
	chirp_2 : real;
146
	sine_1 : int;
147
	sine_2 : int;
148
	sine_3 : int;
149
	In1_1 : bool;
150
	In1_2 : bool;
151
	In1_3 : bool;
152
	In1_4 : bool;)
153
returns(Out1_1 : int;
154
	Out1_2 : int;
155
	Out1_3 : int;);
156
var BusCreator_1_BusElem1 : real;
157
	BusCreator_1_BusElem2 : real;
158
	BusCreator_1_BusElem3 : int;
159
	BusCreator_1_BusElem4 : int;
160
	BusCreator_1_BusElem5 : int;
161
	BusCreator1_1_BusElem1 : real;
162
	BusCreator1_1_BusElem2 : real;
163
	BusCreator1_1_BusElem3 : int;
164
	BusCreator1_1_BusElem4 : int;
165
	BusCreator1_1_BusElem5 : int;
166
	BusCreator1_1_BusElem6 : bool;
167
	BusCreator1_1_BusElem7 : bool;
168
	BusCreator1_1_BusElem8 : bool;
169
	BusCreator1_1_BusElem9 : bool;
170
	BusSelector_1 : int;
171
	BusSelector_2 : int;
172
	BusSelector_3 : int;
173
	Subsystem_1_BusElem1 : real;
174
	Subsystem_1_BusElem2 : real;
175
	Subsystem_1_BusElem3 : int;
176
	Subsystem_1_BusElem4 : int;
177
	Subsystem_1_BusElem5 : int;
178
	Subsystem_1_BusElem6 : bool;
179
	Subsystem_1_BusElem7 : bool;
180
	Subsystem_1_BusElem8 : bool;
181
	Subsystem_1_BusElem9 : bool;
182
	__time_step : real;
183
	__nb_step : int;
184
let
185
	BusCreator_1_BusElem1 = chirp_1;
186
	BusCreator_1_BusElem2 = chirp_2;
187
	BusCreator_1_BusElem3 = sine_1;
188
	BusCreator_1_BusElem4 = sine_2;
189
	BusCreator_1_BusElem5 = sine_3;
190
	BusCreator1_1_BusElem1 = BusCreator_1_BusElem1;
191
	BusCreator1_1_BusElem2 = BusCreator_1_BusElem2;
192
	BusCreator1_1_BusElem3 = BusCreator_1_BusElem3;
193
	BusCreator1_1_BusElem4 = BusCreator_1_BusElem4;
194
	BusCreator1_1_BusElem5 = BusCreator_1_BusElem5;
195
	BusCreator1_1_BusElem6 = In1_1;
196
	BusCreator1_1_BusElem7 = In1_2;
197
	BusCreator1_1_BusElem8 = In1_3;
198
	BusCreator1_1_BusElem9 = In1_4;
199
	BusSelector_1 = Subsystem_1_BusElem3;
200
	BusSelector_2 = Subsystem_1_BusElem4;
201
	BusSelector_3 = Subsystem_1_BusElem5;
202
	(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_43_280(BusCreator1_1_BusElem1, BusCreator1_1_BusElem2, BusCreator1_1_BusElem3, BusCreator1_1_BusElem4, BusCreator1_1_BusElem5, BusCreator1_1_BusElem6, BusCreator1_1_BusElem7, BusCreator1_1_BusElem8, BusCreator1_1_BusElem9, __time_step, __nb_step);
203
	Out1_1 = BusSelector_1;
204
	Out1_2 = BusSelector_2;
205
	Out1_3 = BusSelector_3;
206
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
207
	__nb_step = (0 -> ((pre __nb_step) + 1));
208
tel