9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# Acausal bond graph to causal bond graph: mfile format
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.13 1998/07/27 20:30:12 peterg
## *** empty log message ***
##
## Revision 1.12 1998/07/10 08:43:46 peterg
## Added -I switch
##
## Revision 1.11 1998/01/23 13:29:54 peterg
|
>
>
>
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# Acausal bond graph to causal bond graph: mfile format
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.14 2000/12/28 12:16:13 peterg
## *** empty log message ***
##
## Revision 1.13 1998/07/27 20:30:12 peterg
## *** empty log message ***
##
## Revision 1.12 1998/07/10 08:43:46 peterg
## Added -I switch
##
## Revision 1.11 1998/01/23 13:29:54 peterg
|
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
rm -f $infofile
#Inform user
echo "Creating $1_cbg.m (maximise $blurb causality)"
echo Creating $1_type.sh
# Use matrix manipulation to accomplish the transformation
$MATRIX << EOF >abg2cbg_m.log #2>mtt_error.txt
infofilenum = fopen("$infofile",'w');
errorfilenum = fopen("$errorfile",'w');
typefilenum = fopen("$typefile",'w');
%Convert from acausal to causal bond graph in m-file form.
system_name='$1';
port_bonds = [];
port_direction = [];
port_status = [];
|
>
>
>
|
|
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
rm -f $infofile
#Inform user
echo "Creating $1_cbg.m (maximise $blurb causality)"
echo Creating $1_type.sh
## Start the type.sh file
mtt_header $1 type sh > $typefile
# Use matrix manipulation to accomplish the transformation
$MATRIX << EOF >abg2cbg_m.log #2>mtt_error.txt
infofilenum = fopen("$infofile",'w');
errorfilenum = fopen("$errorfile",'w');
typefilenum = fopen("$typefile",'a');
%Convert from acausal to causal bond graph in m-file form.
system_name='$1';
port_bonds = [];
port_direction = [];
port_status = [];
|