Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / Simulink / src_saturate_test / saturate_test.lus @ 6c3ea955

History | View | Annotate | Download (7.47 KB)

1
-- This file has been generated by cocoSim
2

    
3

    
4
-- System nodes
5
node saturate_test (In1_1_1 : real; In2_1_1 : real; In2_1_2 : real; In2_1_3 : real; In3_1_1 : real; In3_1_2 : real; In3_1_3 : real; In3_1_4 : real; In3_1_5 : real; In3_1_6 : real; In4_1_1 : real; In4_1_2 : real; In4_1_3 : real; In5_1_1 : real; In5_1_2 : real; In5_1_3 : real; In5_1_4 : real; In5_1_5 : real; In5_1_6 : real; In6_1_1 : real; In7_1_1 : real; In8_1_1 : real; In9_1_1 : real)
6
returns (Out1_1_1 : real;
7
	Out2_2_1 : real; Out2_2_2 : real; Out2_2_3 : real;
8
	Out3_3_1 : real; Out3_3_2 : real; Out3_3_3 : real; Out3_3_4 : real; Out3_3_5 : real; Out3_3_6 : real;
9
	Out4_4_1 : real; Out4_4_2 : real; Out4_4_3 : real;
10
	Out5_5_1 : real; Out5_5_2 : real; Out5_5_3 : real; Out5_5_4 : real; Out5_5_5 : real; Out5_5_6 : real;
11
	Out6_6_1 : real; Out6_6_2 : real; Out6_6_3 : real;
12
	Out7_7_1 : real; Out7_7_2 : real; Out7_7_3 : real; Out7_7_4 : real; Out7_7_5 : real; Out7_7_6 : real;
13
	Out8_8_1 : real; Out8_8_2 : real; Out8_8_3 : real;
14
	Out9_9_1 : real; Out9_9_2 : real; Out9_9_3 : real; Out9_9_4 : real; Out9_9_5 : real; Out9_9_6 : real); 
15
var
16
	Saturation_1_1 : real;
17
	Saturation1_1_1 : real; Saturation1_1_2 : real; Saturation1_1_3 : real;
18
	Saturation2_1_1 : real; Saturation2_1_2 : real; Saturation2_1_3 : real; Saturation2_1_4 : real; Saturation2_1_5 : real; Saturation2_1_6 : real;
19
	Saturation3_1_1 : real; Saturation3_1_2 : real; Saturation3_1_3 : real;
20
	Saturation4_1_1 : real; Saturation4_1_2 : real; Saturation4_1_3 : real; Saturation4_1_4 : real; Saturation4_1_5 : real; Saturation4_1_6 : real;
21
	Saturation5_1_1 : real; Saturation5_1_2 : real; Saturation5_1_3 : real;
22
	Saturation6_1_1 : real; Saturation6_1_2 : real; Saturation6_1_3 : real; Saturation6_1_4 : real; Saturation6_1_5 : real; Saturation6_1_6 : real;
23
	Saturation7_1_1 : real; Saturation7_1_2 : real; Saturation7_1_3 : real;
24
	Saturation8_1_1 : real; Saturation8_1_2 : real; Saturation8_1_3 : real; Saturation8_1_4 : real; Saturation8_1_5 : real; Saturation8_1_6 : real;
25
	i_virtual_local : real;
26
let 
27
	Saturation_1_1 =  if In1_1_1 >= 0.600000 then 0.600000 
28
		else if In1_1_1 <= -0.500000 then -0.500000 
29
		else In1_1_1 ;
30
	Saturation1_1_1 =  if In2_1_1 >= 0.600000 then 0.600000 
31
		else if In2_1_1 <= -0.500000 then -0.500000 
32
		else In2_1_1 ;
33
	Saturation1_1_2 =  if In2_1_2 >= 0.600000 then 0.600000 
34
		else if In2_1_2 <= -0.500000 then -0.500000 
35
		else In2_1_2 ;
36
	Saturation1_1_3 =  if In2_1_3 >= 0.600000 then 0.600000 
37
		else if In2_1_3 <= -0.500000 then -0.500000 
38
		else In2_1_3 ;
39
	Saturation2_1_1 =  if In3_1_1 >= 0.600000 then 0.600000 
40
		else if In3_1_1 <= -0.500000 then -0.500000 
41
		else In3_1_1 ;
42
	Saturation2_1_2 =  if In3_1_2 >= 0.600000 then 0.600000 
43
		else if In3_1_2 <= -0.500000 then -0.500000 
44
		else In3_1_2 ;
45
	Saturation2_1_3 =  if In3_1_3 >= 0.600000 then 0.600000 
46
		else if In3_1_3 <= -0.500000 then -0.500000 
47
		else In3_1_3 ;
48
	Saturation2_1_4 =  if In3_1_4 >= 0.600000 then 0.600000 
49
		else if In3_1_4 <= -0.500000 then -0.500000 
50
		else In3_1_4 ;
51
	Saturation2_1_5 =  if In3_1_5 >= 0.600000 then 0.600000 
52
		else if In3_1_5 <= -0.500000 then -0.500000 
53
		else In3_1_5 ;
54
	Saturation2_1_6 =  if In3_1_6 >= 0.600000 then 0.600000 
55
		else if In3_1_6 <= -0.500000 then -0.500000 
56
		else In3_1_6 ;
57
	Saturation3_1_1 =  if In4_1_1 >= 0.500000 then 0.500000 
58
		else if In4_1_1 <= -0.500000 then -0.500000 
59
		else In4_1_1 ;
60
	Saturation3_1_2 =  if In4_1_2 >= 0.600000 then 0.600000 
61
		else if In4_1_2 <= -0.600000 then -0.600000 
62
		else In4_1_2 ;
63
	Saturation3_1_3 =  if In4_1_3 >= 0.700000 then 0.700000 
64
		else if In4_1_3 <= -0.700000 then -0.700000 
65
		else In4_1_3 ;
66
	Saturation4_1_1 =  if In5_1_1 >= 0.500000 then 0.500000 
67
		else if In5_1_1 <= -0.500000 then -0.500000 
68
		else In5_1_1 ;
69
	Saturation4_1_2 =  if In5_1_2 >= 0.600000 then 0.600000 
70
		else if In5_1_2 <= -0.600000 then -0.600000 
71
		else In5_1_2 ;
72
	Saturation4_1_3 =  if In5_1_3 >= 0.700000 then 0.700000 
73
		else if In5_1_3 <= -0.700000 then -0.700000 
74
		else In5_1_3 ;
75
	Saturation4_1_4 =  if In5_1_4 >= 1.500000 then 1.500000 
76
		else if In5_1_4 <= -1.500000 then -1.500000 
77
		else In5_1_4 ;
78
	Saturation4_1_5 =  if In5_1_5 >= 1.600000 then 1.600000 
79
		else if In5_1_5 <= -1.600000 then -1.600000 
80
		else In5_1_5 ;
81
	Saturation4_1_6 =  if In5_1_6 >= 1.700000 then 1.700000 
82
		else if In5_1_6 <= -1.700000 then -1.700000 
83
		else In5_1_6 ;
84
	Saturation5_1_1 =  if In6_1_1 >= 2.000000 then 2.000000 
85
		else if In6_1_1 <= -2.000000 then -2.000000 
86
		else In6_1_1 ;
87
	Saturation5_1_2 =  if In6_1_1 >= 3.000000 then 3.000000 
88
		else if In6_1_1 <= -3.000000 then -3.000000 
89
		else In6_1_1 ;
90
	Saturation5_1_3 =  if In6_1_1 >= 4.000000 then 4.000000 
91
		else if In6_1_1 <= -4.000000 then -4.000000 
92
		else In6_1_1 ;
93
	Saturation6_1_1 =  if In7_1_1 >= 2.000000 then 2.000000 
94
		else if In7_1_1 <= -2.000000 then -2.000000 
95
		else In7_1_1 ;
96
	Saturation6_1_2 =  if In7_1_1 >= 3.000000 then 3.000000 
97
		else if In7_1_1 <= -3.000000 then -3.000000 
98
		else In7_1_1 ;
99
	Saturation6_1_3 =  if In7_1_1 >= 4.000000 then 4.000000 
100
		else if In7_1_1 <= -4.000000 then -4.000000 
101
		else In7_1_1 ;
102
	Saturation6_1_4 =  if In7_1_1 >= 5.000000 then 5.000000 
103
		else if In7_1_1 <= -5.000000 then -5.000000 
104
		else In7_1_1 ;
105
	Saturation6_1_5 =  if In7_1_1 >= 6.000000 then 6.000000 
106
		else if In7_1_1 <= -6.000000 then -6.000000 
107
		else In7_1_1 ;
108
	Saturation6_1_6 =  if In7_1_1 >= 7.000000 then 7.000000 
109
		else if In7_1_1 <= -7.000000 then -7.000000 
110
		else In7_1_1 ;
111
	Saturation7_1_1 =  if In8_1_1 >= 2.000000 then 2.000000 
112
		else if In8_1_1 <= -2.000000 then -2.000000 
113
		else In8_1_1 ;
114
	Saturation7_1_2 =  if In8_1_1 >= 2.000000 then 2.000000 
115
		else if In8_1_1 <= -3.000000 then -3.000000 
116
		else In8_1_1 ;
117
	Saturation7_1_3 =  if In8_1_1 >= 2.000000 then 2.000000 
118
		else if In8_1_1 <= -4.000000 then -4.000000 
119
		else In8_1_1 ;
120
	Saturation8_1_1 =  if In9_1_1 >= 2.000000 then 2.000000 
121
		else if In9_1_1 <= -2.000000 then -2.000000 
122
		else In9_1_1 ;
123
	Saturation8_1_2 =  if In9_1_1 >= 3.000000 then 3.000000 
124
		else if In9_1_1 <= -2.000000 then -2.000000 
125
		else In9_1_1 ;
126
	Saturation8_1_3 =  if In9_1_1 >= 4.000000 then 4.000000 
127
		else if In9_1_1 <= -2.000000 then -2.000000 
128
		else In9_1_1 ;
129
	Saturation8_1_4 =  if In9_1_1 >= 5.000000 then 5.000000 
130
		else if In9_1_1 <= -2.000000 then -2.000000 
131
		else In9_1_1 ;
132
	Saturation8_1_5 =  if In9_1_1 >= 6.000000 then 6.000000 
133
		else if In9_1_1 <= -2.000000 then -2.000000 
134
		else In9_1_1 ;
135
	Saturation8_1_6 =  if In9_1_1 >= 7.000000 then 7.000000 
136
		else if In9_1_1 <= -2.000000 then -2.000000 
137
		else In9_1_1 ;
138
	Out1_1_1 = Saturation_1_1;
139
	Out2_2_1 = Saturation1_1_1;
140
	Out2_2_2 = Saturation1_1_2;
141
	Out2_2_3 = Saturation1_1_3;
142
	Out3_3_1 = Saturation2_1_1;
143
	Out3_3_2 = Saturation2_1_2;
144
	Out3_3_3 = Saturation2_1_3;
145
	Out3_3_4 = Saturation2_1_4;
146
	Out3_3_5 = Saturation2_1_5;
147
	Out3_3_6 = Saturation2_1_6;
148
	Out4_4_1 = Saturation3_1_1;
149
	Out4_4_2 = Saturation3_1_2;
150
	Out4_4_3 = Saturation3_1_3;
151
	Out5_5_1 = Saturation4_1_1;
152
	Out5_5_2 = Saturation4_1_2;
153
	Out5_5_3 = Saturation4_1_3;
154
	Out5_5_4 = Saturation4_1_4;
155
	Out5_5_5 = Saturation4_1_5;
156
	Out5_5_6 = Saturation4_1_6;
157
	Out6_6_1 = Saturation5_1_1;
158
	Out6_6_2 = Saturation5_1_2;
159
	Out6_6_3 = Saturation5_1_3;
160
	Out7_7_1 = Saturation6_1_1;
161
	Out7_7_2 = Saturation6_1_2;
162
	Out7_7_3 = Saturation6_1_3;
163
	Out7_7_4 = Saturation6_1_4;
164
	Out7_7_5 = Saturation6_1_5;
165
	Out7_7_6 = Saturation6_1_6;
166
	Out8_8_1 = Saturation7_1_1;
167
	Out8_8_2 = Saturation7_1_2;
168
	Out8_8_3 = Saturation7_1_3;
169
	Out9_9_1 = Saturation8_1_1;
170
	Out9_9_2 = Saturation8_1_2;
171
	Out9_9_3 = Saturation8_1_3;
172
	Out9_9_4 = Saturation8_1_4;
173
	Out9_9_5 = Saturation8_1_5;
174
	Out9_9_6 = Saturation8_1_6;
175
	i_virtual_local= 0.0 -> 1.0;
176
tel
177