Project

General

Profile

Download (5.62 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:32:05
5
node  bool_to_real(x : bool;)
6
returns(y : real;);
7
let
8
	y = if x then
9
		1.0
10
	    else 0.0;
11
tel
12

    
13
(*
14
Original block name: DTI_PP/Discrete_minus_TimeIntegrator
15
*)
16
node  Discrete_minus_TimeIntegrator_50_063(f_lpar_x_rpar__1 : real;
17
	__time_step : real;
18
	__nb_step : int;)
19
returns(F_lpar_x_rpar__1 : real;);
20
var Sample_1 : real;
21
	Sum6_1 : real;
22
	UnitDelay_1 : real;
23
let
24
	Sample_1 = (f_lpar_x_rpar__1 * 1.000000000000000);
25
	Sum6_1 = 0.0 + Sample_1 + UnitDelay_1;
26
	UnitDelay_1 = (0.000000000000000 -> (pre Sum6_1));
27
	F_lpar_x_rpar__1 = UnitDelay_1;
28
tel
29

    
30
(*
31
Original block name: DTI_PP/Discrete_minus_TimeIntegrator1
32
*)
33
node  Discrete_minus_TimeIntegrator1_51_095(f_lpar_x_rpar__1 : real;
34
	reset_falling_1 : bool;
35
	__time_step : real;
36
	__nb_step : int;)
37
returns(F_lpar_x_rpar__1 : real;);
38
var Constant_1 : real;
39
	DataTypeConversion_1 : real;
40
	DataTypeConversion1_1 : real;
41
	Init_1 : real;
42
	Product_1 : real;
43
	Product2_1 : real;
44
	Sample_1 : real;
45
	Sum1_1 : real;
46
	Sum2_1 : real;
47
	Sum3_1 : real;
48
	Sum4_1 : real;
49
	Sum5_1 : real;
50
	Sum6_1 : real;
51
	UnitDelay_1 : real;
52
	UnitDelay1_1 : real;
53
	UnitDelay2_1 : bool;
54
	eq0_1 : bool;
55
	ne1_1 : bool;
56
	zero_1 : real;
57
let
58
	Constant_1 = 0.000000000000000;
59
	DataTypeConversion_1 = bool_to_real(eq0_1);
60
	DataTypeConversion1_1 = bool_to_real(ne1_1);
61
	Init_1 = 0.000000000000000;
62
	Product_1 = 1.0 * Init_1 * UnitDelay1_1;
63
	Product2_1 = 1.0 * Sum3_1 * DataTypeConversion_1 * DataTypeConversion1_1;
64
	Sample_1 = (f_lpar_x_rpar__1 * 1.000000000000000);
65
	Sum1_1 = 0.0 + Sample_1 + Sum2_1;
66
	Sum2_1 = 0.0 + Sum4_1 + Product_1;
67
	Sum3_1 = 0.0 - UnitDelay_1 + Init_1;
68
	Sum4_1 = 0.0 + UnitDelay_1 + Product2_1;
69
	Sum5_1 = 0.0 + UnitDelay_1 + Product_1;
70
	Sum6_1 = 0.0 + Sum5_1 + Product2_1;
71
	UnitDelay_1 = (0.000000000000000 -> (pre Sum1_1));
72
	UnitDelay1_1 = (1.000000000000000 -> (pre Constant_1));
73
	UnitDelay2_1 = (false -> (pre reset_falling_1));
74
	eq0_1 = (bool_to_real(reset_falling_1) <= zero_1);
75
	ne1_1 = (bool_to_real(UnitDelay2_1) > zero_1);
76
	zero_1 = 0.000000000000000;
77
	F_lpar_x_rpar__1 = Sum6_1;
78
tel
79

    
80
(*
81
Original block name: DTI_PP/Discrete_minus_TimeIntegrator2
82
*)
83
node  Discrete_minus_TimeIntegrator2_52_085(f_lpar_x_rpar__1 : real;
84
	x0_1 : real;
85
	__time_step : real;
86
	__nb_step : int;)
87
returns(F_lpar_x_rpar__1 : real;);
88
var Constant_1 : real;
89
	Product_1 : real;
90
	Sample_1 : real;
91
	Sum1_1 : real;
92
	Sum2_1 : real;
93
	Sum6_1 : real;
94
	UnitDelay_1 : real;
95
	UnitDelay1_1 : real;
96
let
97
	Constant_1 = 0.000000000000000;
98
	Product_1 = 1.0 * x0_1 * UnitDelay1_1;
99
	Sample_1 = (f_lpar_x_rpar__1 * 1.000000000000000);
100
	Sum1_1 = 0.0 + Sample_1 + Sum2_1;
101
	Sum2_1 = 0.0 + UnitDelay_1 + Product_1;
102
	Sum6_1 = 0.0 + UnitDelay_1 + Product_1;
103
	UnitDelay_1 = (0.000000000000000 -> (pre Sum1_1));
104
	UnitDelay1_1 = (1.000000000000000 -> (pre Constant_1));
105
	F_lpar_x_rpar__1 = Sum6_1;
106
tel
107

    
108
(*
109
Original block name: DTI_PP/Discrete_minus_TimeIntegrator3
110
*)
111
node  Discrete_minus_TimeIntegrator3_53_481(f_lpar_x_rpar__1 : real;
112
	reset_level_1 : bool;
113
	x0_1 : real;
114
	__time_step : real;
115
	__nb_step : int;)
116
returns(F_lpar_x_rpar__1 : real;);
117
var Add_1 : real;
118
	Constant_1 : real;
119
	DataTypeConversion_1 : real;
120
	DataTypeConversion1_1 : real;
121
	DataTypeConversion2_1 : real;
122
	Product_1 : real;
123
	Product1_1 : real;
124
	Product2_1 : real;
125
	Sample_1 : real;
126
	Sum1_1 : real;
127
	Sum2_1 : real;
128
	Sum3_1 : real;
129
	Sum4_1 : real;
130
	Sum5_1 : real;
131
	Sum6_1 : real;
132
	UnitDelay_1 : real;
133
	UnitDelay1_1 : real;
134
	UnitDelay2_1 : bool;
135
	eq0_1 : bool;
136
	ne0_1 : bool;
137
	ne1_1 : bool;
138
	zero_1 : real;
139
let
140
	Add_1 = 0.0 + Product1_1 + Product2_1;
141
	Constant_1 = 0.000000000000000;
142
	DataTypeConversion_1 = bool_to_real(ne0_1);
143
	DataTypeConversion1_1 = bool_to_real(eq0_1);
144
	DataTypeConversion2_1 = bool_to_real(ne1_1);
145
	Product_1 = 1.0 * x0_1 * UnitDelay1_1;
146
	Product1_1 = 1.0 * Sum3_1 * DataTypeConversion_1;
147
	Product2_1 = 1.0 * Sum3_1 * DataTypeConversion1_1 * DataTypeConversion2_1;
148
	Sample_1 = (f_lpar_x_rpar__1 * 1.000000000000000);
149
	Sum1_1 = 0.0 + Sample_1 + Sum2_1;
150
	Sum2_1 = 0.0 + Sum4_1 + Product_1;
151
	Sum3_1 = 0.0 - UnitDelay_1 + x0_1;
152
	Sum4_1 = 0.0 + UnitDelay_1 + Add_1;
153
	Sum5_1 = 0.0 + UnitDelay_1 + Product_1;
154
	Sum6_1 = 0.0 + Sum5_1 + Add_1;
155
	UnitDelay_1 = (0.000000000000000 -> (pre Sum1_1));
156
	UnitDelay1_1 = (1.000000000000000 -> (pre Constant_1));
157
	UnitDelay2_1 = (false -> (pre reset_level_1));
158
	eq0_1 = (bool_to_real(reset_level_1) = zero_1);
159
	ne0_1 = (bool_to_real(reset_level_1) <> zero_1);
160
	ne1_1 = (bool_to_real(UnitDelay2_1) <> zero_1);
161
	zero_1 = 0.000000000000000;
162
	F_lpar_x_rpar__1 = Sum6_1;
163
tel
164

    
165
(*
166
Original block name: DTI_PP
167
*)
168
node  DTI_PP(In1_1 : bool;
169
	In2_1 : real;)
170
returns(Out1_1 : real;
171
	Out2_1 : real;
172
	Out3_1 : real;
173
	Out4_1 : real;);
174
var Add_1 : real;
175
	Discrete_minus_TimeIntegrator_1 : real;
176
	Discrete_minus_TimeIntegrator1_1 : real;
177
	Discrete_minus_TimeIntegrator2_1 : real;
178
	Discrete_minus_TimeIntegrator3_1 : real;
179
	__time_step : real;
180
	__nb_step : int;
181
let
182
	Add_1 = 0.0 + bool_to_real(In1_1) + In2_1;
183
	Discrete_minus_TimeIntegrator_1 = Discrete_minus_TimeIntegrator_50_063(Add_1, __time_step, __nb_step);
184
	Discrete_minus_TimeIntegrator1_1 = Discrete_minus_TimeIntegrator1_51_095(Add_1, In1_1, __time_step, __nb_step);
185
	Discrete_minus_TimeIntegrator2_1 = Discrete_minus_TimeIntegrator2_52_085(Add_1, In2_1, __time_step, __nb_step);
186
	Discrete_minus_TimeIntegrator3_1 = Discrete_minus_TimeIntegrator3_53_481(Add_1, In1_1, In2_1, __time_step, __nb_step);
187
	Out1_1 = Discrete_minus_TimeIntegrator_1;
188
	Out2_1 = Discrete_minus_TimeIntegrator1_1;
189
	Out3_1 = Discrete_minus_TimeIntegrator2_1;
190
	Out4_1 = Discrete_minus_TimeIntegrator3_1;
191
	__time_step = (0.0 -> ((pre __time_step) + 1.000000000000000));
192
	__nb_step = (0 -> ((pre __nb_step) + 1));
193
tel
194

    
(373-373/1153)