Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (4.92 KB)

1
-- This file has been generated by CoCoSim2.
2

    
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 23:00:49
5
#open <conv>
6
node  _max_int(x : int;
7
	y : int;)
8
returns(z : int;);
9
let
10
	z = if (x > y) then
11
		x
12
	    else y;
13
tel
14

    
15
node  _max_real(x : real;
16
	y : real;)
17
returns(z : real;);
18
let
19
	z = if (x > y) then
20
		x
21
	    else y;
22
tel
23

    
24
node  _min_int(x : int;
25
	y : int;)
26
returns(z : int;);
27
let
28
	z = if (x < y) then
29
		x
30
	    else y;
31
tel
32

    
33
node  _min_real(x : real;
34
	y : real;)
35
returns(z : real;);
36
let
37
	z = if (x < y) then
38
		x
39
	    else y;
40
tel
41

    
42
(*
43
Original block name: SaturationDynamic_PP/Saturation
44
Dynamic
45
*)
46
node  SaturationDynamic_210_297(up_1 : real;
47
	In_1 : real;
48
	In_2 : real;
49
	In_3 : real;
50
	In_4 : real;
51
	In_5 : real;
52
	In_6 : real;
53
	low_1 : real;
54
	__time_step : real;
55
	__nb_step : int;)
56
returns(Out_1 : real;
57
	Out_2 : real;
58
	Out_3 : real;
59
	Out_4 : real;
60
	Out_5 : real;
61
	Out_6 : real;);
62
var lower_1 : real;
63
	lower_2 : real;
64
	lower_3 : real;
65
	lower_4 : real;
66
	lower_5 : real;
67
	lower_6 : real;
68
	upper_1 : real;
69
	upper_2 : real;
70
	upper_3 : real;
71
	upper_4 : real;
72
	upper_5 : real;
73
	upper_6 : real;
74
let
75
	lower_1 = _max_real(upper_1, low_1);
76
	lower_2 = _max_real(upper_2, low_1);
77
	lower_3 = _max_real(upper_3, low_1);
78
	lower_4 = _max_real(upper_4, low_1);
79
	lower_5 = _max_real(upper_5, low_1);
80
	lower_6 = _max_real(upper_6, low_1);
81
	upper_1 = _min_real(up_1, In_1);
82
	upper_2 = _min_real(up_1, In_2);
83
	upper_3 = _min_real(up_1, In_3);
84
	upper_4 = _min_real(up_1, In_4);
85
	upper_5 = _min_real(up_1, In_5);
86
	upper_6 = _min_real(up_1, In_6);
87
	Out_1 = lower_1;
88
	Out_2 = lower_2;
89
	Out_3 = lower_3;
90
	Out_4 = lower_4;
91
	Out_5 = lower_5;
92
	Out_6 = lower_6;
93
tel
94

    
95
(*
96
Original block name: SaturationDynamic_PP/Saturation
97
Dynamic1
98
*)
99
node  SaturationDynamic1_222_098(up_1 : real;
100
	In_1 : real;
101
	In_2 : real;
102
	In_3 : real;
103
	In_4 : real;
104
	In_5 : real;
105
	In_6 : real;
106
	low_1 : real;
107
	__time_step : real;
108
	__nb_step : int;)
109
returns(Out_1 : int;
110
	Out_2 : int;
111
	Out_3 : int;
112
	Out_4 : int;
113
	Out_5 : int;
114
	Out_6 : int;);
115
var lower_1 : int;
116
	lower_2 : int;
117
	lower_3 : int;
118
	lower_4 : int;
119
	lower_5 : int;
120
	lower_6 : int;
121
	upper_1 : int;
122
	upper_2 : int;
123
	upper_3 : int;
124
	upper_4 : int;
125
	upper_5 : int;
126
	upper_6 : int;
127
let
128
	lower_1 = _max_int(upper_1, _Floor(low_1));
129
	lower_2 = _max_int(upper_2, _Floor(low_1));
130
	lower_3 = _max_int(upper_3, _Floor(low_1));
131
	lower_4 = _max_int(upper_4, _Floor(low_1));
132
	lower_5 = _max_int(upper_5, _Floor(low_1));
133
	lower_6 = _max_int(upper_6, _Floor(low_1));
134
	upper_1 = _min_int(_Floor(up_1), _Floor(In_1));
135
	upper_2 = _min_int(_Floor(up_1), _Floor(In_2));
136
	upper_3 = _min_int(_Floor(up_1), _Floor(In_3));
137
	upper_4 = _min_int(_Floor(up_1), _Floor(In_4));
138
	upper_5 = _min_int(_Floor(up_1), _Floor(In_5));
139
	upper_6 = _min_int(_Floor(up_1), _Floor(In_6));
140
	Out_1 = lower_1;
141
	Out_2 = lower_2;
142
	Out_3 = lower_3;
143
	Out_4 = lower_4;
144
	Out_5 = lower_5;
145
	Out_6 = lower_6;
146
tel
147

    
148
(*
149
Original block name: SaturationDynamic_PP
150
*)
151
node  SaturationDynamic_PP(_virtual : bool;)
152
returns(Out1_1 : int;
153
	Out1_2 : int;
154
	Out1_3 : int;
155
	Out1_4 : int;
156
	Out1_5 : int;
157
	Out1_6 : int;
158
	Out2_1 : real;
159
	Out2_2 : real;
160
	Out2_3 : real;
161
	Out2_4 : real;
162
	Out2_5 : real;
163
	Out2_6 : real;);
164
var Constant_1 : real;
165
	Constant_2 : real;
166
	Constant_3 : real;
167
	Constant_4 : real;
168
	Constant_5 : real;
169
	Constant_6 : real;
170
	Constant1_1 : real;
171
	Constant2_1 : real;
172
	SaturationDynamic_1 : real;
173
	SaturationDynamic_2 : real;
174
	SaturationDynamic_3 : real;
175
	SaturationDynamic_4 : real;
176
	SaturationDynamic_5 : real;
177
	SaturationDynamic_6 : real;
178
	SaturationDynamic1_1 : int;
179
	SaturationDynamic1_2 : int;
180
	SaturationDynamic1_3 : int;
181
	SaturationDynamic1_4 : int;
182
	SaturationDynamic1_5 : int;
183
	SaturationDynamic1_6 : int;
184
	__time_step : real;
185
	__nb_step : int;
186
let
187
	Constant_1 = 1.000000000000000;
188
	Constant_2 = 4.000000000000000;
189
	Constant_3 = 2.300000000000000;
190
	Constant_4 = 5.000000000000000;
191
	Constant_5 = 3.000000000000000;
192
	Constant_6 = 6.000000000000000;
193
	Constant1_1 = 5.000000000000000;
194
	Constant2_1 = 2.000000000000000;
195
	(SaturationDynamic_1, SaturationDynamic_2, SaturationDynamic_3, SaturationDynamic_4, SaturationDynamic_5, SaturationDynamic_6) = SaturationDynamic_210_297(Constant1_1, Constant_1, Constant_2, Constant_3, Constant_4, Constant_5, Constant_6, Constant2_1, __time_step, __nb_step);
196
	(SaturationDynamic1_1, SaturationDynamic1_2, SaturationDynamic1_3, SaturationDynamic1_4, SaturationDynamic1_5, SaturationDynamic1_6) = SaturationDynamic1_222_098(Constant1_1, Constant_1, Constant_2, Constant_3, Constant_4, Constant_5, Constant_6, Constant2_1, __time_step, __nb_step);
197
	Out1_1 = SaturationDynamic1_1;
198
	Out1_2 = SaturationDynamic1_2;
199
	Out1_3 = SaturationDynamic1_3;
200
	Out1_4 = SaturationDynamic1_4;
201
	Out1_5 = SaturationDynamic1_5;
202
	Out1_6 = SaturationDynamic1_6;
203
	Out2_1 = SaturationDynamic_1;
204
	Out2_2 = SaturationDynamic_2;
205
	Out2_3 = SaturationDynamic_3;
206
	Out2_4 = SaturationDynamic_4;
207
	Out2_5 = SaturationDynamic_5;
208
	Out2_6 = SaturationDynamic_6;
209
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
210
	__nb_step = (0 -> ((pre __nb_step) + 1));
211
tel
212