Project

General

Profile

Download (5.11 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:46: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_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_2_1 : int;
38
	n_minus_DLookupTable_23_571_retTableInd_1 : int;
39
let
40
	n_minus_DLookupTable_23_571_table_elem_1 = 1.000000000000000;
41
	n_minus_DLookupTable_23_571_table_elem_2 = 4.000000000000000;
42
	n_minus_DLookupTable_23_571_table_elem_3 = 7.000000000000000;
43
	n_minus_DLookupTable_23_571_table_elem_4 = 2.000000000000000;
44
	n_minus_DLookupTable_23_571_table_elem_5 = 5.000000000000000;
45
	n_minus_DLookupTable_23_571_table_elem_6 = 8.000000000000000;
46
	n_minus_DLookupTable_23_571_table_elem_7 = 3.000000000000000;
47
	n_minus_DLookupTable_23_571_table_elem_8 = 6.000000000000000;
48
	n_minus_DLookupTable_23_571_table_elem_9 = 9.000000000000000;
49
	n_minus_DLookupTable_23_571_Breakpoints_dim1_1 = 1.000000000000000;
50
	n_minus_DLookupTable_23_571_Breakpoints_dim1_2 = 2.000000000000000;
51
	n_minus_DLookupTable_23_571_Breakpoints_dim1_3 = 3.000000000000000;
52
	n_minus_DLookupTable_23_571_Breakpoints_dim2_1 = 0.000000000000000;
53
	n_minus_DLookupTable_23_571_Breakpoints_dim2_2 = 1.000000000000000;
54
	n_minus_DLookupTable_23_571_Breakpoints_dim2_3 = 2.000000000000000;
55
	n_minus_DLookupTable_23_571_dimJump_1 = 1;
56
	n_minus_DLookupTable_23_571_dimJump_2 = 3;
57
	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
58
		3
59
	    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
60
		2
61
	    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
62
		1
63
	    else 1;
64
	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
65
		3
66
	    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
67
		2
68
	    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
69
		1
70
	    else 1;
71
	n_minus_DLookupTable_23_571_retTableInd_1 = ((n_minus_DLookupTable_23_571_index_dim_1_1 * 1) + ((n_minus_DLookupTable_23_571_index_dim_2_1 - 1) * 3));
72
	n_minus_DLookupTable_1 = if (n_minus_DLookupTable_23_571_retTableInd_1 = 1) then
73
		n_minus_DLookupTable_23_571_table_elem_1
74
	    else if (n_minus_DLookupTable_23_571_retTableInd_1 = 2) then
75
		n_minus_DLookupTable_23_571_table_elem_2
76
	    else if (n_minus_DLookupTable_23_571_retTableInd_1 = 3) then
77
		n_minus_DLookupTable_23_571_table_elem_3
78
	    else if (n_minus_DLookupTable_23_571_retTableInd_1 = 4) then
79
		n_minus_DLookupTable_23_571_table_elem_4
80
	    else if (n_minus_DLookupTable_23_571_retTableInd_1 = 5) then
81
		n_minus_DLookupTable_23_571_table_elem_5
82
	    else if (n_minus_DLookupTable_23_571_retTableInd_1 = 6) then
83
		n_minus_DLookupTable_23_571_table_elem_6
84
	    else if (n_minus_DLookupTable_23_571_retTableInd_1 = 7) then
85
		n_minus_DLookupTable_23_571_table_elem_7
86
	    else if (n_minus_DLookupTable_23_571_retTableInd_1 = 8) then
87
		n_minus_DLookupTable_23_571_table_elem_8
88
	    else n_minus_DLookupTable_23_571_table_elem_9;
89
tel
90

    
91
(*
92
Original block name: LookupTableND_2D_flat_PP
93
*)
94
node  LookupTableND_2D_flat_PP(In1_1 : real;
95
	In2_1 : real;)
96
returns(Out1_1 : real;);
97
var n_minus_DLookupTable_1 : real;
98
	__time_step : real;
99
	__nb_step : int;
100
let
101
	n_minus_DLookupTable_1 = n_minus_DLookupTable_23_571_ext_node(In1_1, In2_1);
102
	Out1_1 = n_minus_DLookupTable_1;
103
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
104
	__nb_step = (0 -> ((pre __nb_step) + 1));
105
tel
106

    
(913-913/1153)