Differences From Artifact [ac5dd715a8]:

To Artifact [f7d2755771]:


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
rm -f ${log}

# Inform user
echo Creating ${ibg}

# Use matrix manipulation to accomplish the transformation
${MATRIX} > ${log} 2> ${err} <<EOF
	name = '$1'
	infofile = fopen('mtt_info.txt', 'w');
	errorfile = fopen('mtt_error.txt', 'w');

	## Interpret the connections from the fig version
	[rbonds,rstrokes,rcomponents,port_coord,port_name,port_list] = $1_rbg;
	[n_ports, junk] = size(port_list);

	## Strip the directional information
	rbonds = rbonds(:,1:6);

	[bonds] = \
	    rbg2ibg(name,rbonds,rstrokes,rcomponents,port_coord,port_name, \
		    infofile,errorfile);

	## Write the intermediate bond graph m-file
	write_ibg(name,bonds);
EOF

# Errors and info
if [ "$info" = "info" ]; then
    cat mtt_info.txt
fi








|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







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
rm -f ${log}

# Inform user
echo Creating ${ibg}

# Use matrix manipulation to accomplish the transformation
${MATRIX} > ${log} 2> ${err} <<EOF
  name = '$1'
  infofile = fopen('mtt_info.txt', 'w');
  errorfile = fopen('mtt_error.txt', 'w');
  
  ## Interpret the connections from the fig version
  [rbonds,rstrokes,rcomponents,port_coord,port_name,port_list] = $1_rbg;
  [n_ports, junk] = size(port_list);
  
  ## Strip the directional information
  rbonds = rbonds(:,1:6);
  
  [bonds] = \
      rbg2ibg(name,rbonds,rstrokes,rcomponents,port_coord,port_name, \
	      infofile,errorfile);
  
  ## Write the intermediate bond graph m-file
  write_ibg(name,bonds);
EOF

# Errors and info
if [ "$info" = "info" ]; then
    cat mtt_info.txt
fi


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