10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Copyright (c) P.J.Gawthrop, 1991, 1994.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.3 1996/11/12 09:53:59 peterg
# Reads in the params.r file now.
#
# Revision 1.2 1996/11/12 09:11:20 peterg
# Removed all the hoorrible name changes
#
# Revision 1.1 1996/11/05 09:19:28 peterg
# Initial revision
#
###############################################################
#Inform user
echo Creating $1_cse.tex
# Remove the old log file
rm -f cse_r2tex.log
# Use reduce to accomplish the transformation
reduce >cse_r2tex.log << EOF
%Read the definitions file
in "$1_def.r";
%Read the parameter file
in "$1_params.r";
%Read the simplification file
in "$1_simp.r";
%Read the constrained-state equations file
in "$1_cse.r";
OFF Echo;
OFF Nat;
%%%%OFF Exp; ON GCD;
%ON Rounded;
%Precision 5;
OUT "$1_cse.tex";
%Write out the constrained-state equations.
write "%File: $1_cse.tex";
write "%constrained-state equations";
IF MTTNx>0 THEN
FOR Row := 1:MTTNx DO
BEGIN
write"\begin{equation}";
write "\dot MTTEX", Row, " = ";
|
>
>
>
|
|
|
|
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# Copyright (c) P.J.Gawthrop, 1991, 1994.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.4 1999/11/22 23:04:08 peterg
## *** empty log message ***
##
# Revision 1.3 1996/11/12 09:53:59 peterg
# Reads in the params.r file now.
#
# Revision 1.2 1996/11/12 09:11:20 peterg
# Removed all the hoorrible name changes
#
# Revision 1.1 1996/11/05 09:19:28 peterg
# Initial revision
#
###############################################################
#Inform user
echo Creating $1_$2.tex
# Remove the old log file
rm -f cse_r2tex.log
# Use reduce to accomplish the transformation
reduce >cse_r2tex.log << EOF
%Read the definitions file
in "$1_def.r";
%Read the parameter file
in "$1_params.r";
%Read the simplification file
in "$1_simp.r";
%Read the constrained-state equations file
in "$1_$2.r";
OFF Echo;
OFF Nat;
%%%%OFF Exp; ON GCD;
%ON Rounded;
%Precision 5;
OUT "$1_$2.tex";
%Write out the constrained-state equations.
write "%File: $1_$2.tex";
write "%constrained-state equations";
IF MTTNx>0 THEN
FOR Row := 1:MTTNx DO
BEGIN
write"\begin{equation}";
write "\dot MTTEX", Row, " = ";
|
119
120
121
122
123
124
125
126
127
128
|
% Write "MTTE", Row, Col, " &=& {", MTTE(Row,Col), "}";
% IF Row<MTTNx OR Col<MTTNx THEN Write "\cr";
% END;
% END;
%write "\end{eqnarray}";
SHUT "$1_cse.tex";
quit;
EOF
|
|
|
122
123
124
125
126
127
128
129
130
131
|
% Write "MTTE", Row, Col, " &=& {", MTTE(Row,Col), "}";
% IF Row<MTTNx OR Col<MTTNx THEN Write "\cr";
% END;
% END;
%write "\end{eqnarray}";
SHUT "$1_$2.tex";
quit;
EOF
|