Overview
Comment:Added structure file
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: bc45f2ebf3d9615a0a86fc84d14799cf5793816d6284560402bda952035675f3
User & Date: gawthrop@users.sourceforge.net on 1997-04-15 09:18:26
Other Links: branch diff | manifest | tags
Context
1997-04-15
09:49:04
Initial revision check-in: 0f5da0b8c1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:18:26
Added structure file check-in: bc45f2ebf3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:17:26
Added the structure file - contains details of states etc. check-in: 8f27e9fb0d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/cbg2ese_m2r from [439cd48f13] to [b1398a61d6].

12
13
14
15
16
17
18



19
20
21
22
23
24
25

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



## Revision 1.8  1996/12/05 10:05:28  peterg
## Removed the Octave switch: empty_list_elements_ok = 1;
## This is now in .octaverc
##
# Revision 1.7  1996/08/30  11:29:49  peter
# Added constitutive relationship to argument list.
# Put in explicit argument list to cbg2ese.







>
>
>







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

###############################################################
## Version control history
###############################################################
## $Id$
##
## $Log$
# Revision 1.9  1996/12/07  18:21:25  peterg
# Now uses fopen + file number
#
## Revision 1.8  1996/12/05 10:05:28  peterg
## Removed the Octave switch: empty_list_elements_ok = 1;
## This is now in .octaverc
##
# Revision 1.7  1996/08/30  11:29:49  peter
# Added constitutive relationship to argument list.
# Put in explicit argument list to cbg2ese.
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
95
96
97
98
##
## Revision 1.1  1996/08/08 15:57:15  peter
## Initial revision
##
###############################################################

infofile='mtt_info.txt';

eqnfile="$1_ese.r";
deffile="$1_def.r";

# Remove the old log file
rm -f cbg2ese_m.log
rm -f $1_ese.r

#Inform user
echo Creating $eqnfile
echo Creating $1_def.r


# Use matrix manipulation to accomplish the transformation
$RMATRIX > cbg2ese_m2r.log 2>mtt_error.txt << EOF

infofile = '$infofile';;
infofilenum = fopen(infofile,'w');


deffile = '$1_def.r';
deffilenum = fopen(deffile,'w');

system_name = '$1';
system_type = '';
system_cr = '';
system_args = '';
full_name = '';
full_name_repetition = '';


% Structure matrix [states,nonstates,inputs,outputs,zero_outputs]

structure = zeros(1,5);

structure = cbg2ese(system_name, system_type, system_cr, ...
                     system_args, full_name, full_name_repetition, ...
                     1, structure, infofilenum);
makedef(structure,deffilenum);
  
EOF

cat $infofile

cat $1*ese.r - > $1_ese.tmp 2>> mtt_error.txt <<EOF
END;
EOF
mv $1_ese.tmp $1_ese.r





# Now invoke the standard error handling.
mtt_error mtt_error.txt










>









|
>






>
>

















|











>
>
>






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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
##
## Revision 1.1  1996/08/08 15:57:15  peter
## Initial revision
##
###############################################################

infofile='mtt_info.txt';
structurefile="$1_struc.txt";
eqnfile="$1_ese.r";
deffile="$1_def.r";

# Remove the old log file
rm -f cbg2ese_m.log
rm -f $1_ese.r

#Inform user
echo Creating $eqnfile
echo Creating $deffile
echo Creating $structurefile

# Use matrix manipulation to accomplish the transformation
$RMATRIX > cbg2ese_m2r.log 2>mtt_error.txt << EOF

infofile = '$infofile';;
infofilenum = fopen(infofile,'w');
structurefile = '$structurefile';;
structurefilenum = fopen(structurefile,'w');
deffile = '$1_def.r';
deffilenum = fopen(deffile,'w');

system_name = '$1';
system_type = '';
system_cr = '';
system_args = '';
full_name = '';
full_name_repetition = '';


% Structure matrix [states,nonstates,inputs,outputs,zero_outputs]

structure = zeros(1,5);

structure = cbg2ese(system_name, system_type, system_cr, ...
                     system_args, full_name, full_name_repetition, ...
                     1, structure, structurefilenum, infofilenum);
makedef(structure,deffilenum);
  
EOF

cat $infofile

cat $1*ese.r - > $1_ese.tmp 2>> mtt_error.txt <<EOF
END;
EOF
mv $1_ese.tmp $1_ese.r

# Sort the struc file
mv $structurefile junk
sort -k 1,1 -k 2,2n junk >$structurefile

# Now invoke the standard error handling.
mtt_error mtt_error.txt




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