Overview
Comment:Initial revision
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 7733a1b838c65d621a1fa132d670533f05cb790563a463ebf826e340f82dce3e
User & Date: gawthrop@users.sourceforge.net on 1996-09-13 18:45:03
Other Links: branch diff | manifest | tags
Context
1996-09-13
19:40:51
Fixed problem with default paramaters. check-in: 685005a729 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
18:45:03
Initial revision check-in: 7733a1b838 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
18:44:11
Added params dependencies. check-in: e9cd462384 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/ss_r2m version [dec8c0a922].































































































1
2
3
4
5
6
7
8
9
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: ss_r2m
# Reduce steady-state values to Fortran
# P.J.Gawthrop 10 July 1990, Dec 1993, Jan 1994, May 1994.
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1993, 1994.

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

#Inform user
echo Creating $1_ss.m
# Remove the old log file
rm -f ss_r2m.log

# Usv reduce to accomplish the transformation
reduce >ss_r2m.log << EOF

%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 reduce steady-state values file
in "$1_ss.r";

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

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

OUT "$1_ss.m";
%Headings - Matlab style
%(Note. The ;; are deleted by for2mat)

IF MTTNvar>0 THEN
BEGIN
  write "function [MTTX0,MTTY0,MTTU0] = $1_ss(...";
  FOR i := 1:MTTNvar DO
  BEGIN
     IF i<MTTNvar THEN write MTTVar(i,1), ",..."
                  ELSE write MTTVar(i,1), ");;";
  END;
END
ELSE write "function [MTTX0,MTTY0,MTTU0] = $1_ss;;";


IF MTTNvar>0 THEN
BEGIN
  write "%function [MTTX0,MTTY0,MTTU0] = $1_ss(...";
  FOR i := 1:MTTNvar DO
  BEGIN
     IF i<MTTNvar THEN write "%", MTTVar(i,1), ",..."
                  ELSE write "%", MTTVar(i,1), ");;";
  END;
END
ELSE write "%function [MTTX0,MTTY0,MTTU0] = $1_ss;;";


write "%Steady-state values for system $1";
write "%File $1_ss.m";
write "%Generated by MTT";


ON NERO;	% Suppress zero elements.

%Fortran switches - one line expressions
OFF echo;
ON fort$
cardno!* := 1$
fortwidth!* := 100$
OFF period$

write "MTTX0 = zeros(", MTTNx, ",1)";
write "MTTy0 = zeros(", MTTNy, ",1)";
write "MTTu0 = zeros(", MTTNu, ",1)";


MTTX0 := MTTX0;
MTTY0 := MTTY0;
MTTU0 := MTTU0;

SHUT "$1_ss.m";


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