Project

General

Profile

Download (2.01 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:44:22
5
node  abs_real(x : real;)
6
returns(y : real;);
7
let
8
	y = if (x >= 0.0) then
9
		x
10
	    else (- x);
11
tel
12

    
13
(*
14
external node code for doing Lookup_nD
15
*)
16
node  T_24514_002_ext_node(D_1 : real;)
17
returns(T_1 : real;);
18
var T_24514_002_table_elem_1 : real;
19
	T_24514_002_table_elem_2 : real;
20
	T_24514_002_Breakpoints_dim1_1 : real;
21
	T_24514_002_Breakpoints_dim1_2 : real;
22
	T_24514_002_dimJump_1 : int;
23
	T_24514_002_index_dim_1_1 : int;
24
	T_24514_002_retTableInd_1 : int;
25
let
26
	T_24514_002_table_elem_1 = 20.000000000000000;
27
	T_24514_002_table_elem_2 = 40.000000000000000;
28
	T_24514_002_Breakpoints_dim1_1 = 10.000000000000000;
29
	T_24514_002_Breakpoints_dim1_2 = 30.000000000000000;
30
	T_24514_002_dimJump_1 = 1;
31
	T_24514_002_index_dim_1_1 = if ((D_1 >= T_24514_002_Breakpoints_dim1_2) or abs_real(D_1 - T_24514_002_Breakpoints_dim1_2) <= 0.000000000000003552713678800501) then
32
		2
33
	    else if ((D_1 >= T_24514_002_Breakpoints_dim1_1) or abs_real(D_1 - T_24514_002_Breakpoints_dim1_1) <= 0.000000000000001776356839400250) then
34
		1
35
	    else 1;
36
	T_24514_002_retTableInd_1 = (T_24514_002_index_dim_1_1 * 1);
37
	T_1 = if (T_24514_002_retTableInd_1 = 1) then
38
		T_24514_002_table_elem_1
39
	    else T_24514_002_table_elem_2;
40
tel
41

    
42
(*
43
Original block name: FromWorkSpace_1_PP/FromWorkspace
44
*)
45
node  FromWorkspace_19_093(__time_step : real;
46
	__nb_step : int;)
47
returns(Out1_1 : real;);
48
var D_1 : real;
49
	T_1 : real;
50
let
51
	D_1 = if ((__nb_step mod 1) = 0) then
52
		__time_step
53
	    else if (__nb_step = 0) then
54
		0.0
55
	    else (pre D_1);
56
	T_1 = T_24514_002_ext_node(D_1);
57
	Out1_1 = T_1;
58
tel
59

    
60
(*
61
Original block name: FromWorkSpace_1_PP
62
*)
63
node  FromWorkSpace_1_PP(_virtual : bool;)
64
returns(Out1_1 : real;);
65
var FromWorkspace_1 : real;
66
	__time_step : real;
67
	__nb_step : int;
68
let
69
	FromWorkspace_1 = FromWorkspace_19_093(__time_step, __nb_step);
70
	Out1_1 = FromWorkspace_1;
71
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
72
	__nb_step = (0 -> ((pre __nb_step) + 1));
73
tel
74

    
(691-691/1153)