Project

General

Profile

Download (2.08 KB) Statistics
| Branch: | Tag: | Revision:
1 4748b215 hbourbou
-- This file has been generated by CoCoSim2.
2
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:17:59
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: Assignment6_PP/Saturation
26
*)
27
node  Saturation_44_037(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 = 3.000000000000000;
40
	Out_1 = lower_1;
41
tel
42
43
(*
44
Original block name: Assignment6_PP
45
*)
46
node  Assignment6_PP(In1_1 : real;
47
	In1_2 : real;
48
	In1_3 : real;)
49
returns(Out1_1 : real;
50
	Out1_2 : real;
51
	Out1_3 : real;);
52
var Add_1 : real;
53
	Assignment_38_044_U_index_1 : int;
54
	Assignment_38_044_ind_dim_1_1 : int;
55
	Assignment_38_044_str_Y_index_1_1 : int;
56
	Assignment_1 : real;
57
	Assignment_2 : real;
58
	Assignment_3 : real;
59
	Constant1_1 : real;
60
	Gain_1 : real;
61
	Saturation_1 : real;
62
	UnitDelay_1 : real;
63
	__time_step : real;
64
	__nb_step : int;
65
let
66
	Add_1 = 0.0 + Constant1_1 + UnitDelay_1;
67
	Assignment_38_044_ind_dim_1_1 = real_to_int(Saturation_1);
68
	Assignment_38_044_str_Y_index_1_1 = Assignment_38_044_ind_dim_1_1;
69
	Assignment_38_044_U_index_1 = (Assignment_38_044_str_Y_index_1_1 * 1);
70
	Assignment_1 = if (Assignment_38_044_U_index_1 = 1) then
71
		Gain_1
72
	    else In1_1;
73
	Assignment_2 = if (Assignment_38_044_U_index_1 = 2) then
74
		Gain_1
75
	    else In1_2;
76
	Assignment_3 = if (Assignment_38_044_U_index_1 = 3) then
77
		Gain_1
78
	    else In1_3;
79
	Constant1_1 = 1.000000000000000;
80
	Gain_1 = (Saturation_1 * 3.000000000000000);
81
	Saturation_1 = Saturation_44_037(Add_1, __time_step, __nb_step);
82
	UnitDelay_1 = (0.000000000000000 -> (pre Add_1));
83
	Out1_1 = Assignment_1;
84
	Out1_2 = Assignment_2;
85
	Out1_3 = Assignment_3;
86
	__time_step = (0.0 -> ((pre __time_step) + 1.000000000000000));
87
	__nb_step = (0 -> ((pre __nb_step) + 1));
88
tel