Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (1.46 KB)

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

    
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:57:39
5
(*
6
Original block name: RateLimiter_1_PP/RateLimiter
7
*)
8
node  RateLimiter_16_209(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_PP
50
*)
51
node  RateLimiter_1_PP(In1_1 : real;)
52
returns(Out1_1 : real;);
53
var RateLimiter_1 : real;
54
	__time_step : real;
55
	__nb_step : int;
56
let
57
	RateLimiter_1 = RateLimiter_16_209(In1_1, __time_step, __nb_step);
58
	Out1_1 = RateLimiter_1;
59
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
60
	__nb_step = (0 -> ((pre __nb_step) + 1));
61
tel
62