Differences From Artifact [3aa29e9779]:

To Artifact [572667c334]:


16
17
18
19
20
21
22



23
24
25
26
27
28
29
# Copyright (c) P.J.Gawthrop 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



# Revision 1.4  1997/05/01  13:44:19  peterg
# Changed double to float.
#
# Revision 1.3  1997/03/20  14:51:11  peterg
# Includes the sympar.c file.
#
# Revision 1.2  1997/01/21  22:57:17  peterg







>
>
>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (c) P.J.Gawthrop 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.5  1997/05/01 13:50:55  peterg
## Replaced float by double.
##
# Revision 1.4  1997/05/01  13:44:19  peterg
# Changed double to float.
#
# Revision 1.3  1997/03/20  14:51:11  peterg
# Includes the sympar.c file.
#
# Revision 1.2  1997/01/21  22:57:17  peterg
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
%Read the reduce definitions file
in "$1_def.r";

%Set up the number of argument variables to zero in case the user has forgotten
MTTNVar := 0;

%Read the symbolic parameters file
in "$1_sympar.r";

%Read the reduce state-space equations   file
in "$1_ode.r";


ON BigFloat, NumVal;
PRECISION 16; %Compatible with Matlab







|







52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
%Read the reduce definitions file
in "$1_def.r";

%Set up the number of argument variables to zero in case the user has forgotten
MTTNVar := 0;

%Read the symbolic parameters file
%%in "$1_sympar.r";

%Read the reduce state-space equations   file
in "$1_ode.r";


ON BigFloat, NumVal;
PRECISION 16; %Compatible with Matlab
144
145
146
147
148
149
150

151
152
153


154
155
156
157
158
159
160
SHUT "$1_ode.c1";

% Load the general translator package
LOAD GENTRAN;
GENTRANLANG!* := 'C;
ON GENTRANSEG;
MAXEXPPRINTLEN!* := 80;


% let it know that sign is a function
GENTRAN DECLARE sign : function;



GENTRANOUT "$1_ode.c2";
%Do the translation
%State
IF MTTNx>0 THEN
BEGIN
  FOR i := 1:MTTNx DO







>



>
>







147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
SHUT "$1_ode.c1";

% Load the general translator package
LOAD GENTRAN;
GENTRANLANG!* := 'C;
ON GENTRANSEG;
MAXEXPPRINTLEN!* := 80;
ON DOUBLE;

% let it know that sign is a function
GENTRAN DECLARE sign : function;
GENTRAN DECLARE r_switch : function;
GENTRAN DECLARE i_switch : function;

GENTRANOUT "$1_ode.c2";
%Do the translation
%State
IF MTTNx>0 THEN
BEGIN
  FOR i := 1:MTTNx DO

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]