Differences From Artifact [5440b5dfe8]:

To Artifact [aeca6fdc92]:


9
10
11
12
13
14
15



16
17
18
19
20
21
22
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.17  2001/07/28 21:09:22  geraint
## Eliminated duplicate lines in type.sh.
##
## Revision 1.16  2001/07/26 04:07:28  gawthrop
## Changed a to w on open (Geraint's suggestion)
## Explictly close files
##
## Revision 1.15  2001/07/23 23:24:02  gawthrop
## Now only writes to type.sh and cbg.m when causality is complete
##
150
151
152
153
154
155
156
157
158
159



160
161
162
163
164
165
166
153
154
155
156
157
158
159



160
161
162
163
164
165
166
167
168
169







-
-
-
+
+
+








## 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",'w');
  infofilenum  = fopen("$infofile",'wt');
  errorfilenum = fopen("$errorfile",'wt');
  typefilenum  = fopen("$typefile",'wt');

  %Convert from acausal to causal bond graph in m-file form.
  system_name='$1';

  port_bonds = [];
  port_direction = [];
  port_status = [];

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