Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (3.53 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:19:18
5
#open <conv>
6
node  _max_real(x : real;
7
	y : real;)
8
returns(z : real;);
9
let
10
	z = if (x > y) then
11
		x
12
	    else y;
13
tel
14
15
node  _min_real(x : real;
16
	y : real;)
17
returns(z : real;);
18
let
19
	z = if (x < y) then
20
		x
21
	    else y;
22
tel
23
24
(*
25
Original block name: assignment_mixed_port_u_expanded_PP/Saturation
26
*)
27
node  Saturation_32_467(In_1 : real;
28
	__time_step : real;
29
	__nb_step : int;)
30
returns(Out_1 : real;);
31
var lower_1 : real;
32
	lower_limit_1 : real;
33
	upper_1 : real;
34
	upper_limit_1 : real;
35
let
36
	lower_1 = _max_real(upper_1, lower_limit_1);
37
	lower_limit_1 = 1.000000000000000;
38
	upper_1 = _min_real(upper_limit_1, In_1);
39
	upper_limit_1 = 2.000000000000000;
40
	Out_1 = lower_1;
41
tel
42
43
(*
44
Original block name: assignment_mixed_port_u_expanded_PP
45
*)
46
node  assignment_mixed_port_u_expanded_PP(In1_1 : real;
47
	In1_2 : real;
48
	In1_3 : real;
49
	In1_4 : real;
50
	In1_5 : real;
51
	In1_6 : real;
52
	In2_1 : real;)
53
returns(Out1_1 : real;
54
	Out1_2 : real;
55
	Out1_3 : real;
56
	Out1_4 : real;
57
	Out1_5 : real;
58
	Out1_6 : real;);
59
var Assignment_28_250_U_index_1 : int;
60
	Assignment_28_250_U_index_2 : int;
61
	Assignment_28_250_ind_dim_1_1 : int;
62
	Assignment_28_250_ind_dim_1_2 : int;
63
	Assignment_28_250_ind_dim_2_1 : int;
64
	Assignment_28_250_str_Y_index_1_1 : int;
65
	Assignment_28_250_str_Y_index_1_2 : int;
66
	Assignment_28_250_str_Y_index_2_1 : int;
67
	Assignment_28_250_str_Y_index_2_2 : int;
68
	Assignment_1 : real;
69
	Assignment_2 : real;
70
	Assignment_3 : real;
71
	Assignment_4 : real;
72
	Assignment_5 : real;
73
	Assignment_6 : real;
74
	Constant1_1 : real;
75
	Saturation_1 : real;
76
	__time_step : real;
77
	__nb_step : int;
78
let
79
	Assignment_28_250_ind_dim_1_1 = 1;
80
	Assignment_28_250_ind_dim_1_2 = 3;
81
	Assignment_28_250_ind_dim_2_1 = real_to_int(Saturation_1);
82
	Assignment_28_250_str_Y_index_1_1 = Assignment_28_250_ind_dim_1_1;
83
	Assignment_28_250_str_Y_index_1_2 = Assignment_28_250_ind_dim_2_1;
84
	Assignment_28_250_U_index_1 = ( (Assignment_28_250_str_Y_index_1_1 * 1) + ((Assignment_28_250_str_Y_index_1_2 - 1) * 3) );
85
	Assignment_28_250_str_Y_index_2_1 = Assignment_28_250_ind_dim_1_2;
86
	Assignment_28_250_str_Y_index_2_2 = Assignment_28_250_ind_dim_2_1;
87
	Assignment_28_250_U_index_2 = ( (Assignment_28_250_str_Y_index_2_1 * 1) + ((Assignment_28_250_str_Y_index_2_2 - 1) * 3) );
88
	Assignment_1 = if (Assignment_28_250_U_index_2 = 1) then
89
		Constant1_1
90
	    else if (Assignment_28_250_U_index_1 = 1) then
91
		Constant1_1
92
	    else In1_1;
93
	Assignment_2 = if (Assignment_28_250_U_index_2 = 2) then
94
		Constant1_1
95
	    else if (Assignment_28_250_U_index_1 = 2) then
96
		Constant1_1
97
	    else In1_2;
98
	Assignment_3 = if (Assignment_28_250_U_index_2 = 3) then
99
		Constant1_1
100
	    else if (Assignment_28_250_U_index_1 = 3) then
101
		Constant1_1
102
	    else In1_3;
103
	Assignment_4 = if (Assignment_28_250_U_index_2 = 4) then
104
		Constant1_1
105
	    else if (Assignment_28_250_U_index_1 = 4) then
106
		Constant1_1
107
	    else In1_4;
108
	Assignment_5 = if (Assignment_28_250_U_index_2 = 5) then
109
		Constant1_1
110
	    else if (Assignment_28_250_U_index_1 = 5) then
111
		Constant1_1
112
	    else In1_5;
113
	Assignment_6 = if (Assignment_28_250_U_index_2 = 6) then
114
		Constant1_1
115
	    else if (Assignment_28_250_U_index_1 = 6) then
116
		Constant1_1
117
	    else In1_6;
118
	Constant1_1 = 12.000000000000000;
119
	Saturation_1 = Saturation_32_467(In2_1, __time_step, __nb_step);
120
	Out1_1 = Assignment_1;
121
	Out1_2 = Assignment_2;
122
	Out1_3 = Assignment_3;
123
	Out1_4 = Assignment_4;
124
	Out1_5 = Assignment_5;
125
	Out1_6 = Assignment_6;
126
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
127
	__nb_step = (0 -> ((pre __nb_step) + 1));
128
tel