Project

General

Profile

Download (2.25 KB) Statistics
| Branch: | Tag: | Revision:
1
-- This file has been generated by CoCoSim2.
2

    
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 10-Oct-2018 21:36:21
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  xx1_minus_DLookupTable_20_114_ext_node(Constant_1 : real;)
17
returns(xx1_minus_DLookupTable_1 : real;);
18
var xx1_minus_DLookupTable_20_114_table_elem_1 : real;
19
	xx1_minus_DLookupTable_20_114_table_elem_2 : real;
20
	xx1_minus_DLookupTable_20_114_Breakpoints_dim1_1 : real;
21
	xx1_minus_DLookupTable_20_114_Breakpoints_dim1_2 : real;
22
	xx1_minus_DLookupTable_20_114_dimJump_1 : int;
23
	xx1_minus_DLookupTable_20_114_index_dim_1_1 : int;
24
	xx1_minus_DLookupTable_20_114_retTableInd_1 : int;
25
let
26
	xx1_minus_DLookupTable_20_114_table_elem_1 = 10.000000000000000;
27
	xx1_minus_DLookupTable_20_114_table_elem_2 = 100.000000000000000;
28
	xx1_minus_DLookupTable_20_114_Breakpoints_dim1_1 = 1.000000000000000;
29
	xx1_minus_DLookupTable_20_114_Breakpoints_dim1_2 = 2.000000000000000;
30
	xx1_minus_DLookupTable_20_114_dimJump_1 = 1;
31
	xx1_minus_DLookupTable_20_114_index_dim_1_1 = if ((Constant_1 >= xx1_minus_DLookupTable_20_114_Breakpoints_dim1_2) or abs_real(Constant_1 - xx1_minus_DLookupTable_20_114_Breakpoints_dim1_2) <= 0.000000000000000444089209850063) then
32
		2
33
	    else if ((Constant_1 >= xx1_minus_DLookupTable_20_114_Breakpoints_dim1_1) or abs_real(Constant_1 - xx1_minus_DLookupTable_20_114_Breakpoints_dim1_1) <= 0.000000000000000222044604925031) then
34
		1
35
	    else 1;
36
	xx1_minus_DLookupTable_20_114_retTableInd_1 = (xx1_minus_DLookupTable_20_114_index_dim_1_1 * 1);
37
	xx1_minus_DLookupTable_1 = if (xx1_minus_DLookupTable_20_114_retTableInd_1 = 1) then
38
		xx1_minus_DLookupTable_20_114_table_elem_1
39
	    else xx1_minus_DLookupTable_20_114_table_elem_2;
40
tel
41

    
42
(*
43
Original block name: LookupTable1D_2points_PP
44
*)
45
node  LookupTable1D_2points_PP(_virtual : bool;)
46
returns(Out2_1 : real;);
47
var Constant_1 : real;
48
	xx1_minus_DLookupTable_1 : real;
49
	__time_step : real;
50
	__nb_step : int;
51
let
52
	Constant_1 = 1.500000000000000;
53
	xx1_minus_DLookupTable_1 = xx1_minus_DLookupTable_20_114_ext_node(Constant_1);
54
	Out2_1 = xx1_minus_DLookupTable_1;
55
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
56
	__nb_step = (0 -> ((pre __nb_step) + 1));
57
tel
58

    
(811-811/1153)