Overview
Comment:Added -cr option -- forces cr to be loaded before the ese.r file
This avoids causality problems when using multi-port Rs to represent
arbitary equations
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 22863cf2852726c504aa9750b0970e91c5b6aa21162b09b9df6c7a6434149b39
User & Date: gawthrop@users.sourceforge.net on 2001-07-06 00:46:50
Other Links: branch diff | manifest | tags
Context
2001-07-06
01:17:14
New sensitivity components (for extruder model) check-in: 2a52198114 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
00:46:50
Added -cr option -- forces cr to be loaded before the ese.r file
This avoids causality problems when using multi-port Rs to represent
arbitary equations
check-in: 22863cf285 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2001-07-05
08:42:43
Updated to allow auto-generation of sensitivity version check-in: e1825154c8 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/abg2lbl_fig2txt from [4150ea54b3] to [7cf338a0f7].

1

2
3
4
5
6
7
8
9
10
11
12
13
14
15



16
17
18
19
20
21
22

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
-
+














+
+
+







#! /bin/sh
#!/bin/sh

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

# Bourne shell script: abg2lbl_fig2txt
#
# Acausal bond graph to causal bond graph: mfile format

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.20  2001/07/04 05:19:57  gawthrop
## Added RT & CT to list
##
## Revision 1.19  2001/07/03 23:51:10  gawthrop
## Now puts outline #Summary and #Description lines at top of lbl file
##
## Revision 1.18  2001/06/13 18:24:10  gawthrop
## Made "lin" default in place of "none"
## Still needs arg and cr alias clashes to be sorted ....
##
86
87
88
89
90
91
92






93
94
95
96
97
98
99
100
101
102
103


104
105
106
107
108
109
110
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110


111
112
113
114
115
116
117
118
119







+
+
+
+
+
+









-
-
+
+







# Copyright (c) P.J.Gawthrop, 1997

infofile='mtt_info.txt'
typefile="$1_type.sh"
sensitivity=$2;
system=$1
outfile=$1_lbl.txt

if [ -n "$sensitivity" ]; then
    sys="-s ${system}"
else
    sys=${system}
fi

# Remove the old log file
rm -f abg2lbl_fig2txt.log
rm -f $1_cbg.m
rm -f $typefile
rm -f $infofile
rm -f mtt_junk*

## Create lbl files beneath this one
mtt -q -u -l 1 $1 sub sh # Create the list
sh $1_sub.sh "abg2lbl_fig2txt "
mtt -q -u -l 1 ${sys} sub sh # Create the list
sh $1_sub.sh "abg2lbl_fig2txt " " $sensitivity"

if [ -f "$1_lbl.txt" ]; then
  ##echo "$1_lbl.txt exists in `pwd` - no action taken"
  exit
##else 
  ##echo "$1_lbl.txt dosn not exist in `pwd` "
fi
149
150
151
152
153
154
155

156
157
158
159
160
161
162
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172







+







create_lbl_body()
{
awk '/:/ {print $NF}' $1_abg.fig | \
sed 's/\\001//' | \
sort | \
tee $1_raw_list | \
sort -u> $1_unique_raw_list


#Write out non-unique names
#echo 'Non-unique names (if any):'
#diff $1_unique_raw_list  $1_raw_list | grep '>' | sed 's/>/	/'

#Write out the outline lbl file
grep -v  '\[[0-9]*\]'  $1_unique_raw_list | \
283
284
285
286
287
288
289


290

291
292
293
294
295
296
293
294
295
296
297
298
299
300
301
302
303
304
305
306










+
+

+



-
-
-
create_lbl_body $1> mtt_junk_lbl.txt

write_header            > ${outfile}
cat mtt_junk_alias.txt >> ${outfile}
create_args mtt_junk   >> ${outfile}
write_blurb            >> ${outfile}
cat mtt_junk_lbl.txt   >> ${outfile}
## Put a blank line at end
cat >> ${outfile} <<EOF

EOF
## Clean up
rm -f mtt_junk*




Modified mttroot/mtt/bin/trans/ese2rdae_r from [18b252a8a0] to [d1a65686e6].

10
11
12
13
14
15
16




17
18
19
20
21
22
23
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27







+
+
+
+







# Copyright (c) P.J.Gawthrop, 1991, 1994, 1996

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.10  2000/11/30 15:23:16  peterg
## Taken out all subsystem stuff - now done in mtt using
## mtt_make_subsystems
##
## Revision 1.9  2000/09/07 12:18:31  peterg
## Prettified layout of this file
##
## Revision 1.8  2000/09/07 12:07:26  peterg
## *** empty log message ***
##
## Revision 1.7  2000/09/01 13:34:15  peterg
83
84
85
86
87
88
89




90
91
92
93
94
95
96
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104







+
+
+
+







###############################################################


while [ -n "`echo $1 | grep '^-'`" ]; do
  case $1 in
	-I )
                info=info;;
	-cr )
                load_cr=yes;
                blurb2=' using cr first';
                ;;
	-partition )
                partition=yes;
                blurb='with partitioning';
		;;
	*)
		echo "$1 is an invalid argument - ignoring";
                exit ;;
111
112
113
114
115
116
117
118




119
120

121
122
123
124
125
126



127
128
129
130
131
132
133
119
120
121
122
123
124
125
126
127
128
129
130
131

132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148








+
+
+
+

-
+






+
+
+








defname=$topname"_def.r"
crname=$topname"_cr.r"
paramname=$topname"_params.r"
daename=$sysname"_rdae.r"
esename=$sysname"_ese.r"
logname=ese2rdae.log

if [ -n "${load_cr}" ]; then
    load_cr_comm="in \"${crname}\";"
fi

# Inform user
echo Creating $daename $blurb
echo Creating $daename $blurb $blurb2

# Remove the old log file
rm -f $logname

# Use symbolic algebra to accomplish the transformation
$SYMBOLIC >$logname  << EOF

%Read in the the cr is -cr set
$load_cr_comm

%Read the formatting function
in "$MTTPATH/trans/reduce_matrix.r";

% Definitions
in "$defname";


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