Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (2.68 KB)

1
-- This file has been generated by CoCoSim2.
2

    
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:57:47
5
(*
6
Original block name: RateLimiter_1_orig_vs_preprocessed_PP/RateLimiter
7
*)
8
node  RateLimiter_135_937(U_1 : real;
9
	__time_step : real;
10
	__nb_step : int;)
11
returns(Y_1 : real;);
12
var Diff_1 : real;
13
	Divide1_1 : real;
14
	F_1 : real;
15
	Product_1 : real;
16
	Product1_1 : real;
17
	R_1 : real;
18
	RelationalOperator_1 : bool;
19
	RelationalOperator1_1 : bool;
20
	Sum_1 : real;
21
	Sum1_1 : real;
22
	Switch1_1 : real;
23
	Switch2_1 : real;
24
	TS_1 : real;
25
	UD_1 : real;
26
let
27
	Diff_1 = 0.0 + U_1 - UD_1;
28
	Divide1_1 = 1.0 * Diff_1 / TS_1;
29
	F_1 = -0.300000000000000;
30
	Product_1 = 1.0 * TS_1 * R_1;
31
	Product1_1 = 1.0 * TS_1 * F_1;
32
	R_1 = 0.600000000000000;
33
	RelationalOperator_1 = (Divide1_1 > R_1);
34
	RelationalOperator1_1 = (Divide1_1 >= F_1);
35
	Sum_1 = 0.0 + Product_1 + UD_1;
36
	Sum1_1 = 0.0 + Product1_1 + UD_1;
37
	Switch1_1 = if RelationalOperator_1 then
38
		Sum_1
39
	    else Switch2_1;
40
	Switch2_1 = if RelationalOperator1_1 then
41
		U_1
42
	    else Sum1_1;
43
	TS_1 = 0.200000000000000;
44
	UD_1 = (0.000000000000000 -> (pre Switch1_1));
45
	Y_1 = Switch1_1;
46
tel
47

    
48
(*
49
Original block name: RateLimiter_1_orig_vs_preprocessed_PP/RateLimiter1
50
*)
51
node  RateLimiter1_136_739(U__1 : real;
52
	__time_step : real;
53
	__nb_step : int;)
54
returns(Y_1 : real;);
55
var Diff_1 : real;
56
	Divide1_1 : real;
57
	F_1 : real;
58
	Product_1 : real;
59
	Product1_1 : real;
60
	R_1 : real;
61
	RelationalOperator_1 : bool;
62
	RelationalOperator1_1 : bool;
63
	Sum_1 : real;
64
	Sum1_1 : real;
65
	Switch1_1 : real;
66
	Switch2_1 : real;
67
	TS_1 : real;
68
	UnitDelay_1 : real;
69
let
70
	Diff_1 = 0.0 + U__1 - UnitDelay_1;
71
	Divide1_1 = 1.0 * Diff_1 / TS_1;
72
	F_1 = -0.300000000000000;
73
	Product_1 = 1.0 * TS_1 * R_1;
74
	Product1_1 = 1.0 * TS_1 * F_1;
75
	R_1 = 0.600000000000000;
76
	RelationalOperator_1 = (Divide1_1 > R_1);
77
	RelationalOperator1_1 = (Divide1_1 >= F_1);
78
	Sum_1 = 0.0 + Product_1 + UnitDelay_1;
79
	Sum1_1 = 0.0 + Product1_1 + UnitDelay_1;
80
	Switch1_1 = if RelationalOperator_1 then
81
		Sum_1
82
	    else Switch2_1;
83
	Switch2_1 = if RelationalOperator1_1 then
84
		U__1
85
	    else Sum1_1;
86
	TS_1 = 0.200000000000000;
87
	UnitDelay_1 = (0.000000000000000 -> (pre Switch1_1));
88
	Y_1 = Switch1_1;
89
tel
90

    
91
(*
92
Original block name: RateLimiter_1_orig_vs_preprocessed_PP
93
*)
94
node  RateLimiter_1_orig_vs_preprocessed_PP(In1_1 : real;)
95
returns(Out1_1 : real;
96
	Out2_1 : real;);
97
var RateLimiter_1 : real;
98
	RateLimiter1_1 : real;
99
	__time_step : real;
100
	__nb_step : int;
101
let
102
	RateLimiter_1 = RateLimiter_135_937(In1_1, __time_step, __nb_step);
103
	RateLimiter1_1 = RateLimiter1_136_739(In1_1, __time_step, __nb_step);
104
	Out1_1 = RateLimiter_1;
105
	Out2_1 = RateLimiter1_1;
106
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
107
	__nb_step = (0 -> ((pre __nb_step) + 1));
108
tel
109