Project

General

Profile

Download (12.3 KB) Statistics
| Branch: | Tag: | Revision:
1
-- This file has been generated by CoCoSim2.
2

    
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:44:55
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  LookupTableDynamic_64_293_ext_node(In1_1 : real;
17
	Constant_1 : real;
18
	Constant_2 : real;
19
	Constant_3 : real;
20
	Constant_4 : real;
21
	Constant_5 : real;
22
	Constant_6 : real;
23
	Constant_7 : real;
24
	In3_1 : real;
25
	In3_2 : real;
26
	In3_3 : real;
27
	In3_4 : real;
28
	In3_5 : real;
29
	In3_6 : real;
30
	In3_7 : real;)
31
returns(LookupTableDynamic_1 : real;);
32
var LookupTableDynamic_64_293_table_elem_1 : real;
33
	LookupTableDynamic_64_293_table_elem_2 : real;
34
	LookupTableDynamic_64_293_table_elem_3 : real;
35
	LookupTableDynamic_64_293_table_elem_4 : real;
36
	LookupTableDynamic_64_293_table_elem_5 : real;
37
	LookupTableDynamic_64_293_table_elem_6 : real;
38
	LookupTableDynamic_64_293_table_elem_7 : real;
39
	LookupTableDynamic_64_293_Breakpoints_dim1_1 : real;
40
	LookupTableDynamic_64_293_Breakpoints_dim1_2 : real;
41
	LookupTableDynamic_64_293_Breakpoints_dim1_3 : real;
42
	LookupTableDynamic_64_293_Breakpoints_dim1_4 : real;
43
	LookupTableDynamic_64_293_Breakpoints_dim1_5 : real;
44
	LookupTableDynamic_64_293_Breakpoints_dim1_6 : real;
45
	LookupTableDynamic_64_293_Breakpoints_dim1_7 : real;
46
	LookupTableDynamic_64_293_dimJump_1 : int;
47
	LookupTableDynamic_64_293_index_dim_1_1 : int;
48
	LookupTableDynamic_64_293_index_dim_1_2 : int;
49
	LookupTableDynamic_64_293_coords_dim_1_1 : real;
50
	LookupTableDynamic_64_293_coords_dim_1_2 : real;
51
	LookupTableDynamic_64_293_u_node_1 : real;
52
	LookupTableDynamic_64_293_N_shape_1 : real;
53
	LookupTableDynamic_64_293_u_node_2 : real;
54
	LookupTableDynamic_64_293_N_shape_2 : real;
55
	LookupTableDynamic_64_293_bound_node_index_1 : int;
56
	LookupTableDynamic_64_293_bound_node_index_2 : int;
57
	LookupTableDynamic_64_293_clip_input_1 : real;
58
let
59
	LookupTableDynamic_64_293_table_elem_1 = In3_1;
60
	LookupTableDynamic_64_293_table_elem_2 = In3_2;
61
	LookupTableDynamic_64_293_table_elem_3 = In3_3;
62
	LookupTableDynamic_64_293_table_elem_4 = In3_4;
63
	LookupTableDynamic_64_293_table_elem_5 = In3_5;
64
	LookupTableDynamic_64_293_table_elem_6 = In3_6;
65
	LookupTableDynamic_64_293_table_elem_7 = In3_7;
66
	LookupTableDynamic_64_293_Breakpoints_dim1_1 = Constant_1;
67
	LookupTableDynamic_64_293_Breakpoints_dim1_2 = Constant_2;
68
	LookupTableDynamic_64_293_Breakpoints_dim1_3 = Constant_3;
69
	LookupTableDynamic_64_293_Breakpoints_dim1_4 = Constant_4;
70
	LookupTableDynamic_64_293_Breakpoints_dim1_5 = Constant_5;
71
	LookupTableDynamic_64_293_Breakpoints_dim1_6 = Constant_6;
72
	LookupTableDynamic_64_293_Breakpoints_dim1_7 = Constant_7;
73
	LookupTableDynamic_64_293_dimJump_1 = 1;
74
	LookupTableDynamic_64_293_index_dim_1_1 = if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_7) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_7) <= 0.000000000000001000000000000000) then
75
		6
76
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_6) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_6) <= 0.000000000000001000000000000000) then
77
		6
78
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_5) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_5) <= 0.000000000000001000000000000000) then
79
		5
80
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_4) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_4) <= 0.000000000000001000000000000000) then
81
		4
82
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_3) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_3) <= 0.000000000000001000000000000000) then
83
		3
84
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_2) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_2) <= 0.000000000000001000000000000000) then
85
		2
86
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_1) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_1) <= 0.000000000000001000000000000000) then
87
		1
88
	    else 1;
89
	LookupTableDynamic_64_293_coords_dim_1_1 = if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_7) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_7) <= 0.000000000000001000000000000000) then
90
		LookupTableDynamic_64_293_Breakpoints_dim1_6
91
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_6) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_6) <= 0.000000000000001000000000000000) then
92
		LookupTableDynamic_64_293_Breakpoints_dim1_6
93
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_5) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_5) <= 0.000000000000001000000000000000) then
94
		LookupTableDynamic_64_293_Breakpoints_dim1_5
95
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_4) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_4) <= 0.000000000000001000000000000000) then
96
		LookupTableDynamic_64_293_Breakpoints_dim1_4
97
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_3) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_3) <= 0.000000000000001000000000000000) then
98
		LookupTableDynamic_64_293_Breakpoints_dim1_3
99
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_2) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_2) <= 0.000000000000001000000000000000) then
100
		LookupTableDynamic_64_293_Breakpoints_dim1_2
101
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_1) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_1) <= 0.000000000000001000000000000000) then
102
		LookupTableDynamic_64_293_Breakpoints_dim1_1
103
	    else LookupTableDynamic_64_293_Breakpoints_dim1_1;
104
	LookupTableDynamic_64_293_index_dim_1_2 = if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_7) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_7) <= 0.000000000000001000000000000000) then
105
		7
106
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_6) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_6) <= 0.000000000000001000000000000000) then
107
		7
108
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_5) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_5) <= 0.000000000000001000000000000000) then
109
		6
110
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_4) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_4) <= 0.000000000000001000000000000000) then
111
		5
112
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_3) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_3) <= 0.000000000000001000000000000000) then
113
		4
114
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_2) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_2) <= 0.000000000000001000000000000000) then
115
		3
116
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_1) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_1) <= 0.000000000000001000000000000000) then
117
		2
118
	    else 2;
119
	LookupTableDynamic_64_293_coords_dim_1_2 = if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_7) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_7) <= 0.000000000000001000000000000000) then
120
		LookupTableDynamic_64_293_Breakpoints_dim1_7
121
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_6) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_6) <= 0.000000000000001000000000000000) then
122
		LookupTableDynamic_64_293_Breakpoints_dim1_7
123
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_5) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_5) <= 0.000000000000001000000000000000) then
124
		LookupTableDynamic_64_293_Breakpoints_dim1_6
125
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_4) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_4) <= 0.000000000000001000000000000000) then
126
		LookupTableDynamic_64_293_Breakpoints_dim1_5
127
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_3) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_3) <= 0.000000000000001000000000000000) then
128
		LookupTableDynamic_64_293_Breakpoints_dim1_4
129
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_2) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_2) <= 0.000000000000001000000000000000) then
130
		LookupTableDynamic_64_293_Breakpoints_dim1_3
131
	    else if ((In1_1 >= LookupTableDynamic_64_293_Breakpoints_dim1_1) or abs_real(In1_1 - LookupTableDynamic_64_293_Breakpoints_dim1_1) <= 0.000000000000001000000000000000) then
132
		LookupTableDynamic_64_293_Breakpoints_dim1_2
133
	    else LookupTableDynamic_64_293_Breakpoints_dim1_2;
134
	LookupTableDynamic_64_293_bound_node_index_1 = (LookupTableDynamic_64_293_index_dim_1_1 * 1);
135
	LookupTableDynamic_64_293_u_node_1 = if (LookupTableDynamic_64_293_bound_node_index_1 = 1) then
136
		LookupTableDynamic_64_293_table_elem_1
137
	    else if (LookupTableDynamic_64_293_bound_node_index_1 = 2) then
138
		LookupTableDynamic_64_293_table_elem_2
139
	    else if (LookupTableDynamic_64_293_bound_node_index_1 = 3) then
140
		LookupTableDynamic_64_293_table_elem_3
141
	    else if (LookupTableDynamic_64_293_bound_node_index_1 = 4) then
142
		LookupTableDynamic_64_293_table_elem_4
143
	    else if (LookupTableDynamic_64_293_bound_node_index_1 = 5) then
144
		LookupTableDynamic_64_293_table_elem_5
145
	    else if (LookupTableDynamic_64_293_bound_node_index_1 = 6) then
146
		LookupTableDynamic_64_293_table_elem_6
147
	    else LookupTableDynamic_64_293_table_elem_7;
148
	LookupTableDynamic_64_293_bound_node_index_2 = (LookupTableDynamic_64_293_index_dim_1_2 * 1);
149
	LookupTableDynamic_64_293_u_node_2 = if (LookupTableDynamic_64_293_bound_node_index_2 = 1) then
150
		LookupTableDynamic_64_293_table_elem_1
151
	    else if (LookupTableDynamic_64_293_bound_node_index_2 = 2) then
152
		LookupTableDynamic_64_293_table_elem_2
153
	    else if (LookupTableDynamic_64_293_bound_node_index_2 = 3) then
154
		LookupTableDynamic_64_293_table_elem_3
155
	    else if (LookupTableDynamic_64_293_bound_node_index_2 = 4) then
156
		LookupTableDynamic_64_293_table_elem_4
157
	    else if (LookupTableDynamic_64_293_bound_node_index_2 = 5) then
158
		LookupTableDynamic_64_293_table_elem_5
159
	    else if (LookupTableDynamic_64_293_bound_node_index_2 = 6) then
160
		LookupTableDynamic_64_293_table_elem_6
161
	    else LookupTableDynamic_64_293_table_elem_7;
162
	LookupTableDynamic_64_293_clip_input_1 = In1_1;
163
	LookupTableDynamic_64_293_N_shape_1 = ((LookupTableDynamic_64_293_coords_dim_1_2 - LookupTableDynamic_64_293_clip_input_1) / (LookupTableDynamic_64_293_coords_dim_1_2 - LookupTableDynamic_64_293_coords_dim_1_1));
164
	LookupTableDynamic_64_293_N_shape_2 = ((LookupTableDynamic_64_293_clip_input_1 - LookupTableDynamic_64_293_coords_dim_1_1) / (LookupTableDynamic_64_293_coords_dim_1_2 - LookupTableDynamic_64_293_coords_dim_1_1));
165
	LookupTableDynamic_1 = ( (LookupTableDynamic_64_293_N_shape_1 * LookupTableDynamic_64_293_u_node_1) + (LookupTableDynamic_64_293_N_shape_2 * LookupTableDynamic_64_293_u_node_2) );
166
tel
167

    
168
(*
169
Original block name: LookupTableDynamic_1_PP
170
*)
171
node  LookupTableDynamic_1_PP(In1_1 : real;
172
	In1_2 : real;
173
	In1_3 : real;
174
	In3_1 : real;
175
	In3_2 : real;
176
	In3_3 : real;
177
	In3_4 : real;
178
	In3_5 : real;
179
	In3_6 : real;
180
	In3_7 : real;)
181
returns(Out1_1 : real;
182
	Out1_2 : real;
183
	Out1_3 : real;);
184
var Constant_1 : real;
185
	Constant_2 : real;
186
	Constant_3 : real;
187
	Constant_4 : real;
188
	Constant_5 : real;
189
	Constant_6 : real;
190
	Constant_7 : real;
191
	LookupTableDynamic_1 : real;
192
	LookupTableDynamic_2 : real;
193
	LookupTableDynamic_3 : real;
194
	__time_step : real;
195
	__nb_step : int;
196
let
197
	Constant_1 = 1.000000000000000;
198
	Constant_2 = 2.000000000000000;
199
	Constant_3 = 3.000000000000000;
200
	Constant_4 = 4.000000000000000;
201
	Constant_5 = 5.000000000000000;
202
	Constant_6 = 6.000000000000000;
203
	Constant_7 = 7.000000000000000;
204
	LookupTableDynamic_1 = LookupTableDynamic_64_293_ext_node(In1_1, Constant_1, Constant_2, Constant_3, Constant_4, Constant_5, Constant_6, Constant_7, In3_1, In3_2, In3_3, In3_4, In3_5, In3_6, In3_7);
205
	LookupTableDynamic_2 = LookupTableDynamic_64_293_ext_node(In1_2, Constant_1, Constant_2, Constant_3, Constant_4, Constant_5, Constant_6, Constant_7, In3_1, In3_2, In3_3, In3_4, In3_5, In3_6, In3_7);
206
	LookupTableDynamic_3 = LookupTableDynamic_64_293_ext_node(In1_3, Constant_1, Constant_2, Constant_3, Constant_4, Constant_5, Constant_6, Constant_7, In3_1, In3_2, In3_3, In3_4, In3_5, In3_6, In3_7);
207
	Out1_1 = LookupTableDynamic_1;
208
	Out1_2 = LookupTableDynamic_2;
209
	Out1_3 = LookupTableDynamic_3;
210
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
211
	__nb_step = (0 -> ((pre __nb_step) + 1));
212
tel
213

    
(841-841/1153)