Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (4.01 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:39:49
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  T_21949_005_ext_node(D_1 : real;)
17
returns(T_1 : real;);
18
var T_21949_005_table_elem_1 : real;
19
	T_21949_005_table_elem_2 : real;
20
	T_21949_005_table_elem_3 : real;
21
	T_21949_005_table_elem_4 : real;
22
	T_21949_005_table_elem_5 : real;
23
	T_21949_005_table_elem_6 : real;
24
	T_21949_005_table_elem_7 : real;
25
	T_21949_005_Breakpoints_dim1_1 : real;
26
	T_21949_005_Breakpoints_dim1_2 : real;
27
	T_21949_005_Breakpoints_dim1_3 : real;
28
	T_21949_005_Breakpoints_dim1_4 : real;
29
	T_21949_005_Breakpoints_dim1_5 : real;
30
	T_21949_005_Breakpoints_dim1_6 : real;
31
	T_21949_005_Breakpoints_dim1_7 : real;
32
	T_21949_005_dimJump_1 : int;
33
	T_21949_005_index_dim_1_1 : int;
34
	T_21949_005_retTableInd_1 : int;
35
let
36
	T_21949_005_table_elem_1 = 5.000000000000000;
37
	T_21949_005_table_elem_2 = 20.000000000000000;
38
	T_21949_005_table_elem_3 = 25.000000000000000;
39
	T_21949_005_table_elem_4 = 40.000000000000000;
40
	T_21949_005_table_elem_5 = 4.000000000000000;
41
	T_21949_005_table_elem_6 = 4.000000000000000;
42
	T_21949_005_table_elem_7 = 55.000000000000000;
43
	T_21949_005_Breakpoints_dim1_1 = 0.000000000000000;
44
	T_21949_005_Breakpoints_dim1_2 = 0.200000000000000;
45
	T_21949_005_Breakpoints_dim1_3 = 0.400000000000000;
46
	T_21949_005_Breakpoints_dim1_4 = 0.600000000000000;
47
	T_21949_005_Breakpoints_dim1_5 = 0.800000000000000;
48
	T_21949_005_Breakpoints_dim1_6 = 1.000000000000000;
49
	T_21949_005_Breakpoints_dim1_7 = 1.200000000000000;
50
	T_21949_005_dimJump_1 = 1;
51
	T_21949_005_index_dim_1_1 = if ((D_1 >= T_21949_005_Breakpoints_dim1_7) or abs_real(D_1 - T_21949_005_Breakpoints_dim1_7) <= 0.000000000000000222044604925031) then
52
		7
53
	    else if ((D_1 >= T_21949_005_Breakpoints_dim1_6) or abs_real(D_1 - T_21949_005_Breakpoints_dim1_6) <= 0.000000000000000222044604925031) then
54
		6
55
	    else if ((D_1 >= T_21949_005_Breakpoints_dim1_5) or abs_real(D_1 - T_21949_005_Breakpoints_dim1_5) <= 0.000000000000000111022302462516) then
56
		5
57
	    else if ((D_1 >= T_21949_005_Breakpoints_dim1_4) or abs_real(D_1 - T_21949_005_Breakpoints_dim1_4) <= 0.000000000000000111022302462516) then
58
		4
59
	    else if ((D_1 >= T_21949_005_Breakpoints_dim1_3) or abs_real(D_1 - T_21949_005_Breakpoints_dim1_3) <= 0.000000000000000055511151231258) then
60
		3
61
	    else if ((D_1 >= T_21949_005_Breakpoints_dim1_2) or abs_real(D_1 - T_21949_005_Breakpoints_dim1_2) <= 0.000000000000000027755575615629) then
62
		2
63
	    else if ((D_1 >= T_21949_005_Breakpoints_dim1_1) or abs_real(D_1 - T_21949_005_Breakpoints_dim1_1) <= 0.000000000000000000000000000000) then
64
		1
65
	    else 1;
66
	T_21949_005_retTableInd_1 = (T_21949_005_index_dim_1_1 * 1);
67
	T_1 = if (T_21949_005_retTableInd_1 = 1) then
68
		T_21949_005_table_elem_1
69
	    else if (T_21949_005_retTableInd_1 = 2) then
70
		T_21949_005_table_elem_2
71
	    else if (T_21949_005_retTableInd_1 = 3) then
72
		T_21949_005_table_elem_3
73
	    else if (T_21949_005_retTableInd_1 = 4) then
74
		T_21949_005_table_elem_4
75
	    else if (T_21949_005_retTableInd_1 = 5) then
76
		T_21949_005_table_elem_5
77
	    else if (T_21949_005_retTableInd_1 = 6) then
78
		T_21949_005_table_elem_6
79
	    else T_21949_005_table_elem_7;
80
tel
81
82
(*
83
Original block name: FromWorkSpace_nointerp_hold_PP/FromWorkspace
84
*)
85
node  FromWorkspace_19_081(__time_step : real;
86
	__nb_step : int;)
87
returns(Out1_1 : real;);
88
var D_1 : real;
89
	T_1 : real;
90
let
91
	D_1 = if ((__nb_step mod 1) = 0) then
92
		__time_step
93
	    else if (__nb_step = 0) then
94
		0.0
95
	    else (pre D_1);
96
	T_1 = T_21949_005_ext_node(D_1);
97
	Out1_1 = T_1;
98
tel
99
100
(*
101
Original block name: FromWorkSpace_nointerp_hold_PP
102
*)
103
node  FromWorkSpace_nointerp_hold_PP(_virtual : bool;)
104
returns(Out1_1 : real;);
105
var FromWorkspace_1 : real;
106
	__time_step : real;
107
	__nb_step : int;
108
let
109
	FromWorkspace_1 = FromWorkspace_19_081(__time_step, __nb_step);
110
	Out1_1 = FromWorkspace_1;
111
	__time_step = (0.0 -> ((pre __time_step) + 0.100000000000000));
112
	__nb_step = (0 -> ((pre __nb_step) + 1));
113
tel