Project

General

Profile

Download (15.8 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:46:50
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_23_571_ext_node(In1_1 : real;
17
	In2_1 : real;)
18
returns(n_minus_DLookupTable_1 : real;);
19
var n_minus_DLookupTable_23_571_table_elem_1 : real;
20
	n_minus_DLookupTable_23_571_table_elem_2 : real;
21
	n_minus_DLookupTable_23_571_table_elem_3 : real;
22
	n_minus_DLookupTable_23_571_table_elem_4 : real;
23
	n_minus_DLookupTable_23_571_table_elem_5 : real;
24
	n_minus_DLookupTable_23_571_table_elem_6 : real;
25
	n_minus_DLookupTable_23_571_table_elem_7 : real;
26
	n_minus_DLookupTable_23_571_table_elem_8 : real;
27
	n_minus_DLookupTable_23_571_table_elem_9 : real;
28
	n_minus_DLookupTable_23_571_Breakpoints_dim1_1 : real;
29
	n_minus_DLookupTable_23_571_Breakpoints_dim1_2 : real;
30
	n_minus_DLookupTable_23_571_Breakpoints_dim1_3 : real;
31
	n_minus_DLookupTable_23_571_Breakpoints_dim2_1 : real;
32
	n_minus_DLookupTable_23_571_Breakpoints_dim2_2 : real;
33
	n_minus_DLookupTable_23_571_Breakpoints_dim2_3 : real;
34
	n_minus_DLookupTable_23_571_dimJump_1 : int;
35
	n_minus_DLookupTable_23_571_dimJump_2 : int;
36
	n_minus_DLookupTable_23_571_index_dim_1_1 : int;
37
	n_minus_DLookupTable_23_571_index_dim_1_2 : int;
38
	n_minus_DLookupTable_23_571_coords_dim_1_1 : real;
39
	n_minus_DLookupTable_23_571_coords_dim_1_2 : real;
40
	n_minus_DLookupTable_23_571_index_dim_2_1 : int;
41
	n_minus_DLookupTable_23_571_index_dim_2_2 : int;
42
	n_minus_DLookupTable_23_571_coords_dim_2_1 : real;
43
	n_minus_DLookupTable_23_571_coords_dim_2_2 : real;
44
	n_minus_DLookupTable_23_571_u_node_1 : real;
45
	n_minus_DLookupTable_23_571_N_shape_1 : real;
46
	n_minus_DLookupTable_23_571_u_node_2 : real;
47
	n_minus_DLookupTable_23_571_N_shape_2 : real;
48
	n_minus_DLookupTable_23_571_u_node_3 : real;
49
	n_minus_DLookupTable_23_571_N_shape_3 : real;
50
	n_minus_DLookupTable_23_571_u_node_4 : real;
51
	n_minus_DLookupTable_23_571_N_shape_4 : real;
52
	n_minus_DLookupTable_23_571_bound_node_index_1 : int;
53
	n_minus_DLookupTable_23_571_bound_node_index_2 : int;
54
	n_minus_DLookupTable_23_571_bound_node_index_3 : int;
55
	n_minus_DLookupTable_23_571_bound_node_index_4 : int;
56
	n_minus_DLookupTable_23_571_clip_input_1 : real;
57
	n_minus_DLookupTable_23_571_clip_input_2 : real;
58
let
59
	n_minus_DLookupTable_23_571_table_elem_1 = 1.000000000000000;
60
	n_minus_DLookupTable_23_571_table_elem_2 = 4.000000000000000;
61
	n_minus_DLookupTable_23_571_table_elem_3 = 7.000000000000000;
62
	n_minus_DLookupTable_23_571_table_elem_4 = 2.000000000000000;
63
	n_minus_DLookupTable_23_571_table_elem_5 = 5.000000000000000;
64
	n_minus_DLookupTable_23_571_table_elem_6 = 8.000000000000000;
65
	n_minus_DLookupTable_23_571_table_elem_7 = 3.000000000000000;
66
	n_minus_DLookupTable_23_571_table_elem_8 = 6.000000000000000;
67
	n_minus_DLookupTable_23_571_table_elem_9 = 9.000000000000000;
68
	n_minus_DLookupTable_23_571_Breakpoints_dim1_1 = 1.200000000000000;
69
	n_minus_DLookupTable_23_571_Breakpoints_dim1_2 = 2.300000000000000;
70
	n_minus_DLookupTable_23_571_Breakpoints_dim1_3 = 3.900000000000000;
71
	n_minus_DLookupTable_23_571_Breakpoints_dim2_1 = 0.000000000000000;
72
	n_minus_DLookupTable_23_571_Breakpoints_dim2_2 = 1.500000000000000;
73
	n_minus_DLookupTable_23_571_Breakpoints_dim2_3 = 2.000000000000000;
74
	n_minus_DLookupTable_23_571_dimJump_1 = 1;
75
	n_minus_DLookupTable_23_571_dimJump_2 = 3;
76
	n_minus_DLookupTable_23_571_index_dim_1_1 = if ((In1_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim1_3) or abs_real(In1_1 - n_minus_DLookupTable_23_571_Breakpoints_dim1_3) <= 0.000000000000000444089209850063) then
77
		2
78
	    else if ((In1_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim1_2) or abs_real(In1_1 - n_minus_DLookupTable_23_571_Breakpoints_dim1_2) <= 0.000000000000000444089209850063) then
79
		2
80
	    else if ((In1_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim1_1) or abs_real(In1_1 - n_minus_DLookupTable_23_571_Breakpoints_dim1_1) <= 0.000000000000000222044604925031) then
81
		1
82
	    else 1;
83
	n_minus_DLookupTable_23_571_coords_dim_1_1 = if ((In1_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim1_3) or abs_real(In1_1 - n_minus_DLookupTable_23_571_Breakpoints_dim1_3) <= 0.000000000000000444089209850063) then
84
		n_minus_DLookupTable_23_571_Breakpoints_dim1_2
85
	    else if ((In1_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim1_2) or abs_real(In1_1 - n_minus_DLookupTable_23_571_Breakpoints_dim1_2) <= 0.000000000000000444089209850063) then
86
		n_minus_DLookupTable_23_571_Breakpoints_dim1_2
87
	    else if ((In1_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim1_1) or abs_real(In1_1 - n_minus_DLookupTable_23_571_Breakpoints_dim1_1) <= 0.000000000000000222044604925031) then
88
		n_minus_DLookupTable_23_571_Breakpoints_dim1_1
89
	    else n_minus_DLookupTable_23_571_Breakpoints_dim1_1;
90
	n_minus_DLookupTable_23_571_index_dim_1_2 = if ((In1_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim1_3) or abs_real(In1_1 - n_minus_DLookupTable_23_571_Breakpoints_dim1_3) <= 0.000000000000000444089209850063) then
91
		3
92
	    else if ((In1_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim1_2) or abs_real(In1_1 - n_minus_DLookupTable_23_571_Breakpoints_dim1_2) <= 0.000000000000000444089209850063) then
93
		3
94
	    else if ((In1_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim1_1) or abs_real(In1_1 - n_minus_DLookupTable_23_571_Breakpoints_dim1_1) <= 0.000000000000000222044604925031) then
95
		2
96
	    else 2;
97
	n_minus_DLookupTable_23_571_coords_dim_1_2 = if ((In1_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim1_3) or abs_real(In1_1 - n_minus_DLookupTable_23_571_Breakpoints_dim1_3) <= 0.000000000000000444089209850063) then
98
		n_minus_DLookupTable_23_571_Breakpoints_dim1_3
99
	    else if ((In1_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim1_2) or abs_real(In1_1 - n_minus_DLookupTable_23_571_Breakpoints_dim1_2) <= 0.000000000000000444089209850063) then
100
		n_minus_DLookupTable_23_571_Breakpoints_dim1_3
101
	    else if ((In1_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim1_1) or abs_real(In1_1 - n_minus_DLookupTable_23_571_Breakpoints_dim1_1) <= 0.000000000000000222044604925031) then
102
		n_minus_DLookupTable_23_571_Breakpoints_dim1_2
103
	    else n_minus_DLookupTable_23_571_Breakpoints_dim1_2;
104
	n_minus_DLookupTable_23_571_index_dim_2_1 = if ((In2_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim2_3) or abs_real(In2_1 - n_minus_DLookupTable_23_571_Breakpoints_dim2_3) <= 0.000000000000000444089209850063) then
105
		2
106
	    else if ((In2_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim2_2) or abs_real(In2_1 - n_minus_DLookupTable_23_571_Breakpoints_dim2_2) <= 0.000000000000000222044604925031) then
107
		2
108
	    else if ((In2_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim2_1) or abs_real(In2_1 - n_minus_DLookupTable_23_571_Breakpoints_dim2_1) <= 0.000000000000000000000000000000) then
109
		1
110
	    else 1;
111
	n_minus_DLookupTable_23_571_coords_dim_2_1 = if ((In2_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim2_3) or abs_real(In2_1 - n_minus_DLookupTable_23_571_Breakpoints_dim2_3) <= 0.000000000000000444089209850063) then
112
		n_minus_DLookupTable_23_571_Breakpoints_dim2_2
113
	    else if ((In2_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim2_2) or abs_real(In2_1 - n_minus_DLookupTable_23_571_Breakpoints_dim2_2) <= 0.000000000000000222044604925031) then
114
		n_minus_DLookupTable_23_571_Breakpoints_dim2_2
115
	    else if ((In2_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim2_1) or abs_real(In2_1 - n_minus_DLookupTable_23_571_Breakpoints_dim2_1) <= 0.000000000000000000000000000000) then
116
		n_minus_DLookupTable_23_571_Breakpoints_dim2_1
117
	    else n_minus_DLookupTable_23_571_Breakpoints_dim2_1;
118
	n_minus_DLookupTable_23_571_index_dim_2_2 = if ((In2_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim2_3) or abs_real(In2_1 - n_minus_DLookupTable_23_571_Breakpoints_dim2_3) <= 0.000000000000000444089209850063) then
119
		3
120
	    else if ((In2_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim2_2) or abs_real(In2_1 - n_minus_DLookupTable_23_571_Breakpoints_dim2_2) <= 0.000000000000000222044604925031) then
121
		3
122
	    else if ((In2_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim2_1) or abs_real(In2_1 - n_minus_DLookupTable_23_571_Breakpoints_dim2_1) <= 0.000000000000000000000000000000) then
123
		2
124
	    else 2;
125
	n_minus_DLookupTable_23_571_coords_dim_2_2 = if ((In2_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim2_3) or abs_real(In2_1 - n_minus_DLookupTable_23_571_Breakpoints_dim2_3) <= 0.000000000000000444089209850063) then
126
		n_minus_DLookupTable_23_571_Breakpoints_dim2_3
127
	    else if ((In2_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim2_2) or abs_real(In2_1 - n_minus_DLookupTable_23_571_Breakpoints_dim2_2) <= 0.000000000000000222044604925031) then
128
		n_minus_DLookupTable_23_571_Breakpoints_dim2_3
129
	    else if ((In2_1 >= n_minus_DLookupTable_23_571_Breakpoints_dim2_1) or abs_real(In2_1 - n_minus_DLookupTable_23_571_Breakpoints_dim2_1) <= 0.000000000000000000000000000000) then
130
		n_minus_DLookupTable_23_571_Breakpoints_dim2_2
131
	    else n_minus_DLookupTable_23_571_Breakpoints_dim2_2;
132
	n_minus_DLookupTable_23_571_bound_node_index_1 = ( (n_minus_DLookupTable_23_571_index_dim_1_1 * 1) + ((n_minus_DLookupTable_23_571_index_dim_2_1 - 1) * 3) );
133
	n_minus_DLookupTable_23_571_u_node_1 = if (n_minus_DLookupTable_23_571_bound_node_index_1 = 1) then
134
		n_minus_DLookupTable_23_571_table_elem_1
135
	    else if (n_minus_DLookupTable_23_571_bound_node_index_1 = 2) then
136
		n_minus_DLookupTable_23_571_table_elem_2
137
	    else if (n_minus_DLookupTable_23_571_bound_node_index_1 = 3) then
138
		n_minus_DLookupTable_23_571_table_elem_3
139
	    else if (n_minus_DLookupTable_23_571_bound_node_index_1 = 4) then
140
		n_minus_DLookupTable_23_571_table_elem_4
141
	    else if (n_minus_DLookupTable_23_571_bound_node_index_1 = 5) then
142
		n_minus_DLookupTable_23_571_table_elem_5
143
	    else if (n_minus_DLookupTable_23_571_bound_node_index_1 = 6) then
144
		n_minus_DLookupTable_23_571_table_elem_6
145
	    else if (n_minus_DLookupTable_23_571_bound_node_index_1 = 7) then
146
		n_minus_DLookupTable_23_571_table_elem_7
147
	    else if (n_minus_DLookupTable_23_571_bound_node_index_1 = 8) then
148
		n_minus_DLookupTable_23_571_table_elem_8
149
	    else n_minus_DLookupTable_23_571_table_elem_9;
150
	n_minus_DLookupTable_23_571_bound_node_index_2 = ( (n_minus_DLookupTable_23_571_index_dim_1_1 * 1) + ((n_minus_DLookupTable_23_571_index_dim_2_2 - 1) * 3) );
151
	n_minus_DLookupTable_23_571_u_node_2 = if (n_minus_DLookupTable_23_571_bound_node_index_2 = 1) then
152
		n_minus_DLookupTable_23_571_table_elem_1
153
	    else if (n_minus_DLookupTable_23_571_bound_node_index_2 = 2) then
154
		n_minus_DLookupTable_23_571_table_elem_2
155
	    else if (n_minus_DLookupTable_23_571_bound_node_index_2 = 3) then
156
		n_minus_DLookupTable_23_571_table_elem_3
157
	    else if (n_minus_DLookupTable_23_571_bound_node_index_2 = 4) then
158
		n_minus_DLookupTable_23_571_table_elem_4
159
	    else if (n_minus_DLookupTable_23_571_bound_node_index_2 = 5) then
160
		n_minus_DLookupTable_23_571_table_elem_5
161
	    else if (n_minus_DLookupTable_23_571_bound_node_index_2 = 6) then
162
		n_minus_DLookupTable_23_571_table_elem_6
163
	    else if (n_minus_DLookupTable_23_571_bound_node_index_2 = 7) then
164
		n_minus_DLookupTable_23_571_table_elem_7
165
	    else if (n_minus_DLookupTable_23_571_bound_node_index_2 = 8) then
166
		n_minus_DLookupTable_23_571_table_elem_8
167
	    else n_minus_DLookupTable_23_571_table_elem_9;
168
	n_minus_DLookupTable_23_571_bound_node_index_3 = ( (n_minus_DLookupTable_23_571_index_dim_1_2 * 1) + ((n_minus_DLookupTable_23_571_index_dim_2_1 - 1) * 3) );
169
	n_minus_DLookupTable_23_571_u_node_3 = if (n_minus_DLookupTable_23_571_bound_node_index_3 = 1) then
170
		n_minus_DLookupTable_23_571_table_elem_1
171
	    else if (n_minus_DLookupTable_23_571_bound_node_index_3 = 2) then
172
		n_minus_DLookupTable_23_571_table_elem_2
173
	    else if (n_minus_DLookupTable_23_571_bound_node_index_3 = 3) then
174
		n_minus_DLookupTable_23_571_table_elem_3
175
	    else if (n_minus_DLookupTable_23_571_bound_node_index_3 = 4) then
176
		n_minus_DLookupTable_23_571_table_elem_4
177
	    else if (n_minus_DLookupTable_23_571_bound_node_index_3 = 5) then
178
		n_minus_DLookupTable_23_571_table_elem_5
179
	    else if (n_minus_DLookupTable_23_571_bound_node_index_3 = 6) then
180
		n_minus_DLookupTable_23_571_table_elem_6
181
	    else if (n_minus_DLookupTable_23_571_bound_node_index_3 = 7) then
182
		n_minus_DLookupTable_23_571_table_elem_7
183
	    else if (n_minus_DLookupTable_23_571_bound_node_index_3 = 8) then
184
		n_minus_DLookupTable_23_571_table_elem_8
185
	    else n_minus_DLookupTable_23_571_table_elem_9;
186
	n_minus_DLookupTable_23_571_bound_node_index_4 = ( (n_minus_DLookupTable_23_571_index_dim_1_2 * 1) + ((n_minus_DLookupTable_23_571_index_dim_2_2 - 1) * 3) );
187
	n_minus_DLookupTable_23_571_u_node_4 = if (n_minus_DLookupTable_23_571_bound_node_index_4 = 1) then
188
		n_minus_DLookupTable_23_571_table_elem_1
189
	    else if (n_minus_DLookupTable_23_571_bound_node_index_4 = 2) then
190
		n_minus_DLookupTable_23_571_table_elem_2
191
	    else if (n_minus_DLookupTable_23_571_bound_node_index_4 = 3) then
192
		n_minus_DLookupTable_23_571_table_elem_3
193
	    else if (n_minus_DLookupTable_23_571_bound_node_index_4 = 4) then
194
		n_minus_DLookupTable_23_571_table_elem_4
195
	    else if (n_minus_DLookupTable_23_571_bound_node_index_4 = 5) then
196
		n_minus_DLookupTable_23_571_table_elem_5
197
	    else if (n_minus_DLookupTable_23_571_bound_node_index_4 = 6) then
198
		n_minus_DLookupTable_23_571_table_elem_6
199
	    else if (n_minus_DLookupTable_23_571_bound_node_index_4 = 7) then
200
		n_minus_DLookupTable_23_571_table_elem_7
201
	    else if (n_minus_DLookupTable_23_571_bound_node_index_4 = 8) then
202
		n_minus_DLookupTable_23_571_table_elem_8
203
	    else n_minus_DLookupTable_23_571_table_elem_9;
204
	n_minus_DLookupTable_23_571_clip_input_1 = In1_1;
205
	n_minus_DLookupTable_23_571_clip_input_2 = In2_1;
206
	n_minus_DLookupTable_23_571_N_shape_1 = (( (n_minus_DLookupTable_23_571_coords_dim_1_2 - n_minus_DLookupTable_23_571_clip_input_1) * (n_minus_DLookupTable_23_571_coords_dim_2_2 - n_minus_DLookupTable_23_571_clip_input_2) ) / ( (n_minus_DLookupTable_23_571_coords_dim_1_2 - n_minus_DLookupTable_23_571_coords_dim_1_1) * (n_minus_DLookupTable_23_571_coords_dim_2_2 - n_minus_DLookupTable_23_571_coords_dim_2_1) ));
207
	n_minus_DLookupTable_23_571_N_shape_2 = (( (n_minus_DLookupTable_23_571_coords_dim_1_2 - n_minus_DLookupTable_23_571_clip_input_1) * (n_minus_DLookupTable_23_571_clip_input_2 - n_minus_DLookupTable_23_571_coords_dim_2_1) ) / ( (n_minus_DLookupTable_23_571_coords_dim_1_2 - n_minus_DLookupTable_23_571_coords_dim_1_1) * (n_minus_DLookupTable_23_571_coords_dim_2_2 - n_minus_DLookupTable_23_571_coords_dim_2_1) ));
208
	n_minus_DLookupTable_23_571_N_shape_3 = (( (n_minus_DLookupTable_23_571_clip_input_1 - n_minus_DLookupTable_23_571_coords_dim_1_1) * (n_minus_DLookupTable_23_571_coords_dim_2_2 - n_minus_DLookupTable_23_571_clip_input_2) ) / ( (n_minus_DLookupTable_23_571_coords_dim_1_2 - n_minus_DLookupTable_23_571_coords_dim_1_1) * (n_minus_DLookupTable_23_571_coords_dim_2_2 - n_minus_DLookupTable_23_571_coords_dim_2_1) ));
209
	n_minus_DLookupTable_23_571_N_shape_4 = (( (n_minus_DLookupTable_23_571_clip_input_1 - n_minus_DLookupTable_23_571_coords_dim_1_1) * (n_minus_DLookupTable_23_571_clip_input_2 - n_minus_DLookupTable_23_571_coords_dim_2_1) ) / ( (n_minus_DLookupTable_23_571_coords_dim_1_2 - n_minus_DLookupTable_23_571_coords_dim_1_1) * (n_minus_DLookupTable_23_571_coords_dim_2_2 - n_minus_DLookupTable_23_571_coords_dim_2_1) ));
210
	n_minus_DLookupTable_1 = ( (n_minus_DLookupTable_23_571_N_shape_1 * n_minus_DLookupTable_23_571_u_node_1) + (n_minus_DLookupTable_23_571_N_shape_2 * n_minus_DLookupTable_23_571_u_node_2) + (n_minus_DLookupTable_23_571_N_shape_3 * n_minus_DLookupTable_23_571_u_node_3) + (n_minus_DLookupTable_23_571_N_shape_4 * n_minus_DLookupTable_23_571_u_node_4) );
211
tel
212
213
(*
214
Original block name: LookupTableND_2D_1_PP
215
*)
216
node  LookupTableND_2D_1_PP(In1_1 : real;
217
	In2_1 : real;)
218
returns(Out1_1 : real;);
219
var n_minus_DLookupTable_1 : real;
220
	__time_step : real;
221
	__nb_step : int;
222
let
223
	n_minus_DLookupTable_1 = n_minus_DLookupTable_23_571_ext_node(In1_1, In2_1);
224
	Out1_1 = n_minus_DLookupTable_1;
225
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
226
	__nb_step = (0 -> ((pre __nb_step) + 1));
227
tel