Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (16.1 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:47:56
5
node  abs_real(x : real;)
6
returns(y : real;);
7
let
8
	y = if (x >= 0.0) then
9
		x
10
	    else (- x);
11
tel
12
13
(*
14
external node code for doing Lookup_nD
15
*)
16
node  n_minus_DLookupTable_43_949_ext_node(In1_1 : real;
17
	In2_1 : real;
18
	In3_1 : real;
19
	In4_1 : real;
20
	In5_1 : real;)
21
returns(n_minus_DLookupTable_1 : real;);
22
var n_minus_DLookupTable_43_949_table_elem_1 : real;
23
	n_minus_DLookupTable_43_949_table_elem_2 : real;
24
	n_minus_DLookupTable_43_949_table_elem_3 : real;
25
	n_minus_DLookupTable_43_949_table_elem_4 : real;
26
	n_minus_DLookupTable_43_949_table_elem_5 : real;
27
	n_minus_DLookupTable_43_949_table_elem_6 : real;
28
	n_minus_DLookupTable_43_949_table_elem_7 : real;
29
	n_minus_DLookupTable_43_949_table_elem_8 : real;
30
	n_minus_DLookupTable_43_949_table_elem_9 : real;
31
	n_minus_DLookupTable_43_949_table_elem_10 : real;
32
	n_minus_DLookupTable_43_949_table_elem_11 : real;
33
	n_minus_DLookupTable_43_949_table_elem_12 : real;
34
	n_minus_DLookupTable_43_949_table_elem_13 : real;
35
	n_minus_DLookupTable_43_949_table_elem_14 : real;
36
	n_minus_DLookupTable_43_949_table_elem_15 : real;
37
	n_minus_DLookupTable_43_949_table_elem_16 : real;
38
	n_minus_DLookupTable_43_949_table_elem_17 : real;
39
	n_minus_DLookupTable_43_949_table_elem_18 : real;
40
	n_minus_DLookupTable_43_949_table_elem_19 : real;
41
	n_minus_DLookupTable_43_949_table_elem_20 : real;
42
	n_minus_DLookupTable_43_949_table_elem_21 : real;
43
	n_minus_DLookupTable_43_949_table_elem_22 : real;
44
	n_minus_DLookupTable_43_949_table_elem_23 : real;
45
	n_minus_DLookupTable_43_949_table_elem_24 : real;
46
	n_minus_DLookupTable_43_949_table_elem_25 : real;
47
	n_minus_DLookupTable_43_949_table_elem_26 : real;
48
	n_minus_DLookupTable_43_949_table_elem_27 : real;
49
	n_minus_DLookupTable_43_949_table_elem_28 : real;
50
	n_minus_DLookupTable_43_949_table_elem_29 : real;
51
	n_minus_DLookupTable_43_949_table_elem_30 : real;
52
	n_minus_DLookupTable_43_949_table_elem_31 : real;
53
	n_minus_DLookupTable_43_949_table_elem_32 : real;
54
	n_minus_DLookupTable_43_949_table_elem_33 : real;
55
	n_minus_DLookupTable_43_949_table_elem_34 : real;
56
	n_minus_DLookupTable_43_949_table_elem_35 : real;
57
	n_minus_DLookupTable_43_949_table_elem_36 : real;
58
	n_minus_DLookupTable_43_949_table_elem_37 : real;
59
	n_minus_DLookupTable_43_949_table_elem_38 : real;
60
	n_minus_DLookupTable_43_949_table_elem_39 : real;
61
	n_minus_DLookupTable_43_949_table_elem_40 : real;
62
	n_minus_DLookupTable_43_949_table_elem_41 : real;
63
	n_minus_DLookupTable_43_949_table_elem_42 : real;
64
	n_minus_DLookupTable_43_949_table_elem_43 : real;
65
	n_minus_DLookupTable_43_949_table_elem_44 : real;
66
	n_minus_DLookupTable_43_949_table_elem_45 : real;
67
	n_minus_DLookupTable_43_949_table_elem_46 : real;
68
	n_minus_DLookupTable_43_949_table_elem_47 : real;
69
	n_minus_DLookupTable_43_949_table_elem_48 : real;
70
	n_minus_DLookupTable_43_949_Breakpoints_dim1_1 : real;
71
	n_minus_DLookupTable_43_949_Breakpoints_dim1_2 : real;
72
	n_minus_DLookupTable_43_949_Breakpoints_dim2_1 : real;
73
	n_minus_DLookupTable_43_949_Breakpoints_dim2_2 : real;
74
	n_minus_DLookupTable_43_949_Breakpoints_dim3_1 : real;
75
	n_minus_DLookupTable_43_949_Breakpoints_dim3_2 : real;
76
	n_minus_DLookupTable_43_949_Breakpoints_dim4_1 : real;
77
	n_minus_DLookupTable_43_949_Breakpoints_dim4_2 : real;
78
	n_minus_DLookupTable_43_949_Breakpoints_dim4_3 : real;
79
	n_minus_DLookupTable_43_949_Breakpoints_dim5_1 : real;
80
	n_minus_DLookupTable_43_949_Breakpoints_dim5_2 : real;
81
	n_minus_DLookupTable_43_949_dimJump_1 : int;
82
	n_minus_DLookupTable_43_949_dimJump_2 : int;
83
	n_minus_DLookupTable_43_949_dimJump_3 : int;
84
	n_minus_DLookupTable_43_949_dimJump_4 : int;
85
	n_minus_DLookupTable_43_949_dimJump_5 : int;
86
	n_minus_DLookupTable_43_949_index_dim_1_1 : int;
87
	n_minus_DLookupTable_43_949_index_dim_2_1 : int;
88
	n_minus_DLookupTable_43_949_index_dim_3_1 : int;
89
	n_minus_DLookupTable_43_949_index_dim_4_1 : int;
90
	n_minus_DLookupTable_43_949_index_dim_5_1 : int;
91
	n_minus_DLookupTable_43_949_retTableInd_1 : int;
92
let
93
	n_minus_DLookupTable_43_949_table_elem_1 = 9.000000000000000;
94
	n_minus_DLookupTable_43_949_table_elem_2 = 6.000000000000000;
95
	n_minus_DLookupTable_43_949_table_elem_3 = 2.000000000000000;
96
	n_minus_DLookupTable_43_949_table_elem_4 = 5.000000000000000;
97
	n_minus_DLookupTable_43_949_table_elem_5 = 7.000000000000000;
98
	n_minus_DLookupTable_43_949_table_elem_6 = 8.000000000000000;
99
	n_minus_DLookupTable_43_949_table_elem_7 = 1.000000000000000;
100
	n_minus_DLookupTable_43_949_table_elem_8 = 4.000000000000000;
101
	n_minus_DLookupTable_43_949_table_elem_9 = 3.000000000000000;
102
	n_minus_DLookupTable_43_949_table_elem_10 = 0.000000000000000;
103
	n_minus_DLookupTable_43_949_table_elem_11 = 5.000000000000000;
104
	n_minus_DLookupTable_43_949_table_elem_12 = 1.000000000000000;
105
	n_minus_DLookupTable_43_949_table_elem_13 = 5.000000000000000;
106
	n_minus_DLookupTable_43_949_table_elem_14 = 2.000000000000000;
107
	n_minus_DLookupTable_43_949_table_elem_15 = 6.000000000000000;
108
	n_minus_DLookupTable_43_949_table_elem_16 = 1.000000000000000;
109
	n_minus_DLookupTable_43_949_table_elem_17 = 1.000000000000000;
110
	n_minus_DLookupTable_43_949_table_elem_18 = 3.000000000000000;
111
	n_minus_DLookupTable_43_949_table_elem_19 = 2.000000000000000;
112
	n_minus_DLookupTable_43_949_table_elem_20 = 4.000000000000000;
113
	n_minus_DLookupTable_43_949_table_elem_21 = 4.000000000000000;
114
	n_minus_DLookupTable_43_949_table_elem_22 = 2.000000000000000;
115
	n_minus_DLookupTable_43_949_table_elem_23 = 3.000000000000000;
116
	n_minus_DLookupTable_43_949_table_elem_24 = 1.000000000000000;
117
	n_minus_DLookupTable_43_949_table_elem_25 = 27.000000000000000;
118
	n_minus_DLookupTable_43_949_table_elem_26 = 18.000000000000000;
119
	n_minus_DLookupTable_43_949_table_elem_27 = 6.000000000000000;
120
	n_minus_DLookupTable_43_949_table_elem_28 = 15.000000000000000;
121
	n_minus_DLookupTable_43_949_table_elem_29 = 21.000000000000000;
122
	n_minus_DLookupTable_43_949_table_elem_30 = 24.000000000000000;
123
	n_minus_DLookupTable_43_949_table_elem_31 = 3.000000000000000;
124
	n_minus_DLookupTable_43_949_table_elem_32 = 12.000000000000000;
125
	n_minus_DLookupTable_43_949_table_elem_33 = 9.000000000000000;
126
	n_minus_DLookupTable_43_949_table_elem_34 = 0.000000000000000;
127
	n_minus_DLookupTable_43_949_table_elem_35 = 15.000000000000000;
128
	n_minus_DLookupTable_43_949_table_elem_36 = 3.000000000000000;
129
	n_minus_DLookupTable_43_949_table_elem_37 = 15.000000000000000;
130
	n_minus_DLookupTable_43_949_table_elem_38 = 6.000000000000000;
131
	n_minus_DLookupTable_43_949_table_elem_39 = 18.000000000000000;
132
	n_minus_DLookupTable_43_949_table_elem_40 = 3.000000000000000;
133
	n_minus_DLookupTable_43_949_table_elem_41 = 3.000000000000000;
134
	n_minus_DLookupTable_43_949_table_elem_42 = 9.000000000000000;
135
	n_minus_DLookupTable_43_949_table_elem_43 = 6.000000000000000;
136
	n_minus_DLookupTable_43_949_table_elem_44 = 12.000000000000000;
137
	n_minus_DLookupTable_43_949_table_elem_45 = 12.000000000000000;
138
	n_minus_DLookupTable_43_949_table_elem_46 = 6.000000000000000;
139
	n_minus_DLookupTable_43_949_table_elem_47 = 9.000000000000000;
140
	n_minus_DLookupTable_43_949_table_elem_48 = 3.000000000000000;
141
	n_minus_DLookupTable_43_949_Breakpoints_dim1_1 = 1.000000000000000;
142
	n_minus_DLookupTable_43_949_Breakpoints_dim1_2 = 7.000000000000000;
143
	n_minus_DLookupTable_43_949_Breakpoints_dim2_1 = 2.000000000000000;
144
	n_minus_DLookupTable_43_949_Breakpoints_dim2_2 = 5.000000000000000;
145
	n_minus_DLookupTable_43_949_Breakpoints_dim3_1 = 1.000000000000000;
146
	n_minus_DLookupTable_43_949_Breakpoints_dim3_2 = 4.000000000000000;
147
	n_minus_DLookupTable_43_949_Breakpoints_dim4_1 = 1.000000000000000;
148
	n_minus_DLookupTable_43_949_Breakpoints_dim4_2 = 2.000000000000000;
149
	n_minus_DLookupTable_43_949_Breakpoints_dim4_3 = 5.000000000000000;
150
	n_minus_DLookupTable_43_949_Breakpoints_dim5_1 = 1.000000000000000;
151
	n_minus_DLookupTable_43_949_Breakpoints_dim5_2 = 3.000000000000000;
152
	n_minus_DLookupTable_43_949_dimJump_1 = 1;
153
	n_minus_DLookupTable_43_949_dimJump_2 = 2;
154
	n_minus_DLookupTable_43_949_dimJump_3 = 4;
155
	n_minus_DLookupTable_43_949_dimJump_4 = 8;
156
	n_minus_DLookupTable_43_949_dimJump_5 = 24;
157
	n_minus_DLookupTable_43_949_index_dim_1_1 = if ((In1_1 >= n_minus_DLookupTable_43_949_Breakpoints_dim1_2) or abs_real(In1_1 - n_minus_DLookupTable_43_949_Breakpoints_dim1_2) <= 0.000000000000000888178419700125) then
158
		2
159
	    else if ((In1_1 >= n_minus_DLookupTable_43_949_Breakpoints_dim1_1) or abs_real(In1_1 - n_minus_DLookupTable_43_949_Breakpoints_dim1_1) <= 0.000000000000000222044604925031) then
160
		1
161
	    else 1;
162
	n_minus_DLookupTable_43_949_index_dim_2_1 = if ((In2_1 >= n_minus_DLookupTable_43_949_Breakpoints_dim2_2) or abs_real(In2_1 - n_minus_DLookupTable_43_949_Breakpoints_dim2_2) <= 0.000000000000000888178419700125) then
163
		2
164
	    else if ((In2_1 >= n_minus_DLookupTable_43_949_Breakpoints_dim2_1) or abs_real(In2_1 - n_minus_DLookupTable_43_949_Breakpoints_dim2_1) <= 0.000000000000000444089209850063) then
165
		1
166
	    else 1;
167
	n_minus_DLookupTable_43_949_index_dim_3_1 = if ((In3_1 >= n_minus_DLookupTable_43_949_Breakpoints_dim3_2) or abs_real(In3_1 - n_minus_DLookupTable_43_949_Breakpoints_dim3_2) <= 0.000000000000000888178419700125) then
168
		2
169
	    else if ((In3_1 >= n_minus_DLookupTable_43_949_Breakpoints_dim3_1) or abs_real(In3_1 - n_minus_DLookupTable_43_949_Breakpoints_dim3_1) <= 0.000000000000000222044604925031) then
170
		1
171
	    else 1;
172
	n_minus_DLookupTable_43_949_index_dim_4_1 = if ((In4_1 >= n_minus_DLookupTable_43_949_Breakpoints_dim4_3) or abs_real(In4_1 - n_minus_DLookupTable_43_949_Breakpoints_dim4_3) <= 0.000000000000000888178419700125) then
173
		3
174
	    else if ((In4_1 >= n_minus_DLookupTable_43_949_Breakpoints_dim4_2) or abs_real(In4_1 - n_minus_DLookupTable_43_949_Breakpoints_dim4_2) <= 0.000000000000000444089209850063) then
175
		2
176
	    else if ((In4_1 >= n_minus_DLookupTable_43_949_Breakpoints_dim4_1) or abs_real(In4_1 - n_minus_DLookupTable_43_949_Breakpoints_dim4_1) <= 0.000000000000000222044604925031) then
177
		1
178
	    else 1;
179
	n_minus_DLookupTable_43_949_index_dim_5_1 = if ((In5_1 >= n_minus_DLookupTable_43_949_Breakpoints_dim5_2) or abs_real(In5_1 - n_minus_DLookupTable_43_949_Breakpoints_dim5_2) <= 0.000000000000000444089209850063) then
180
		2
181
	    else if ((In5_1 >= n_minus_DLookupTable_43_949_Breakpoints_dim5_1) or abs_real(In5_1 - n_minus_DLookupTable_43_949_Breakpoints_dim5_1) <= 0.000000000000000222044604925031) then
182
		1
183
	    else 1;
184
	n_minus_DLookupTable_43_949_retTableInd_1 = ( (n_minus_DLookupTable_43_949_index_dim_1_1 * 1) + ((n_minus_DLookupTable_43_949_index_dim_2_1 - 1) * 2) + ((n_minus_DLookupTable_43_949_index_dim_3_1 - 1) * 4) + ((n_minus_DLookupTable_43_949_index_dim_4_1 - 1) * 8) + ((n_minus_DLookupTable_43_949_index_dim_5_1 - 1) * 24) );
185
	n_minus_DLookupTable_1 = if (n_minus_DLookupTable_43_949_retTableInd_1 = 1) then
186
		n_minus_DLookupTable_43_949_table_elem_1
187
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 2) then
188
		n_minus_DLookupTable_43_949_table_elem_2
189
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 3) then
190
		n_minus_DLookupTable_43_949_table_elem_3
191
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 4) then
192
		n_minus_DLookupTable_43_949_table_elem_4
193
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 5) then
194
		n_minus_DLookupTable_43_949_table_elem_5
195
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 6) then
196
		n_minus_DLookupTable_43_949_table_elem_6
197
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 7) then
198
		n_minus_DLookupTable_43_949_table_elem_7
199
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 8) then
200
		n_minus_DLookupTable_43_949_table_elem_8
201
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 9) then
202
		n_minus_DLookupTable_43_949_table_elem_9
203
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 10) then
204
		n_minus_DLookupTable_43_949_table_elem_10
205
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 11) then
206
		n_minus_DLookupTable_43_949_table_elem_11
207
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 12) then
208
		n_minus_DLookupTable_43_949_table_elem_12
209
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 13) then
210
		n_minus_DLookupTable_43_949_table_elem_13
211
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 14) then
212
		n_minus_DLookupTable_43_949_table_elem_14
213
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 15) then
214
		n_minus_DLookupTable_43_949_table_elem_15
215
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 16) then
216
		n_minus_DLookupTable_43_949_table_elem_16
217
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 17) then
218
		n_minus_DLookupTable_43_949_table_elem_17
219
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 18) then
220
		n_minus_DLookupTable_43_949_table_elem_18
221
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 19) then
222
		n_minus_DLookupTable_43_949_table_elem_19
223
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 20) then
224
		n_minus_DLookupTable_43_949_table_elem_20
225
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 21) then
226
		n_minus_DLookupTable_43_949_table_elem_21
227
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 22) then
228
		n_minus_DLookupTable_43_949_table_elem_22
229
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 23) then
230
		n_minus_DLookupTable_43_949_table_elem_23
231
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 24) then
232
		n_minus_DLookupTable_43_949_table_elem_24
233
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 25) then
234
		n_minus_DLookupTable_43_949_table_elem_25
235
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 26) then
236
		n_minus_DLookupTable_43_949_table_elem_26
237
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 27) then
238
		n_minus_DLookupTable_43_949_table_elem_27
239
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 28) then
240
		n_minus_DLookupTable_43_949_table_elem_28
241
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 29) then
242
		n_minus_DLookupTable_43_949_table_elem_29
243
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 30) then
244
		n_minus_DLookupTable_43_949_table_elem_30
245
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 31) then
246
		n_minus_DLookupTable_43_949_table_elem_31
247
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 32) then
248
		n_minus_DLookupTable_43_949_table_elem_32
249
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 33) then
250
		n_minus_DLookupTable_43_949_table_elem_33
251
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 34) then
252
		n_minus_DLookupTable_43_949_table_elem_34
253
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 35) then
254
		n_minus_DLookupTable_43_949_table_elem_35
255
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 36) then
256
		n_minus_DLookupTable_43_949_table_elem_36
257
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 37) then
258
		n_minus_DLookupTable_43_949_table_elem_37
259
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 38) then
260
		n_minus_DLookupTable_43_949_table_elem_38
261
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 39) then
262
		n_minus_DLookupTable_43_949_table_elem_39
263
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 40) then
264
		n_minus_DLookupTable_43_949_table_elem_40
265
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 41) then
266
		n_minus_DLookupTable_43_949_table_elem_41
267
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 42) then
268
		n_minus_DLookupTable_43_949_table_elem_42
269
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 43) then
270
		n_minus_DLookupTable_43_949_table_elem_43
271
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 44) then
272
		n_minus_DLookupTable_43_949_table_elem_44
273
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 45) then
274
		n_minus_DLookupTable_43_949_table_elem_45
275
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 46) then
276
		n_minus_DLookupTable_43_949_table_elem_46
277
	    else if (n_minus_DLookupTable_43_949_retTableInd_1 = 47) then
278
		n_minus_DLookupTable_43_949_table_elem_47
279
	    else n_minus_DLookupTable_43_949_table_elem_48;
280
tel
281
282
(*
283
Original block name: LookupTableND_5D_flat_PP
284
*)
285
node  LookupTableND_5D_flat_PP(In1_1 : real;
286
	In2_1 : real;
287
	In3_1 : real;
288
	In4_1 : real;
289
	In5_1 : real;)
290
returns(Out1_1 : real;);
291
var n_minus_DLookupTable_1 : real;
292
	__time_step : real;
293
	__nb_step : int;
294
let
295
	n_minus_DLookupTable_1 = n_minus_DLookupTable_43_949_ext_node(In1_1, In2_1, In3_1, In4_1, In5_1);
296
	Out1_1 = n_minus_DLookupTable_1;
297
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
298
	__nb_step = (0 -> ((pre __nb_step) + 1));
299
tel