Differences From Artifact [7bd05447ed]:

To Artifact [8cc9c0a13a]:


1
2
3
4
5
6
7
8
9



10
11
12
13
14
15
16
function [bonds,components,n_vector_bonds] = rbg2abg(name,rbonds,rstrokes,rcomponents,\
				      port_coord,port_name,\
				      infofile,errorfile)

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



  ## ## Revision 1.46  2000/09/11 08:22:02  peterg
  ## ## Checks for absent port list in subsystem abg file.
  ## ##
  ## ## Revision 1.45  1999/10/19 02:13:31  peterg
  ## ## Now assigns correct bonds to the new junction port names
  ## ##
  ## ## Revision 1.44  1999/10/19 00:05:44  peterg









>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function [bonds,components,n_vector_bonds] = rbg2abg(name,rbonds,rstrokes,rcomponents,\
				      port_coord,port_name,\
				      infofile,errorfile)

  ## ###############################################################
  ## ## Version control history
  ## ###############################################################
  ## ## $Id$
  ## ## $Log$
  ## ## Revision 1.47  2002/08/27 16:09:01  geraint
  ## ## Added port_name to error message when multiple bonds are near a port.
  ## ##
  ## ## Revision 1.46  2000/09/11 08:22:02  peterg
  ## ## Checks for absent port list in subsystem abg file.
  ## ##
  ## ## Revision 1.45  1999/10/19 02:13:31  peterg
  ## ## Now assigns correct bonds to the new junction port names
  ## ##
  ## ## Revision 1.44  1999/10/19 00:05:44  peterg
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
      error(sprintf ...
	    ("A port is near to more than one bond at coordinates %g,%g %s\n", ...
	     port_coord(i,1)/scale,  port_coord(i,2)/scale, deblank(port_name(i,:))));
    endif
    

    ##The (signed) bond corresponding to the ith port label
    port_bond(i) = near_bond(1)*sign(1.5-near_bond(2));
  endfor

  port_bond
  ##We now have the (signed) bond (port_bond(i)) correponding to the
  ## ith port label within the component 

  ## Locate the components at the ends of each bond







|







231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
      error(sprintf ...
	    ("A port is near to more than one bond at coordinates %g,%g %s\n", ...
	     port_coord(i,1)/scale,  port_coord(i,2)/scale, deblank(port_name(i,:))));
    endif
    

    ##The (signed) bond corresponding to the ith port label
    port_bond(i,1) = near_bond(1)*sign(1.5-near_bond(2));
  endfor

  port_bond
  ##We now have the (signed) bond (port_bond(i)) correponding to the
  ## ith port label within the component 

  ## Locate the components at the ends of each bond
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458


  bonds = causality;


  ## Find number of bonds on each component BEFORE vectorisation
  for i=1:n_components
    n_vector_bonds(i) = length(nozeros(components(i,:)))
  endfor
  
  ## Now expand vector ports
  disp("Expanding vector ports");
  [n_bonds,junk] = size(bonds);
  n_ports = length(port_bond);
  n_exp_ports=n_ports;







|







447
448
449
450
451
452
453
454
455
456
457
458
459
460
461


  bonds = causality;


  ## Find number of bonds on each component BEFORE vectorisation
  for i=1:n_components
    n_vector_bonds(i,1) = length(nozeros(components(i,:)))
  endfor
  
  ## Now expand vector ports
  disp("Expanding vector ports");
  [n_bonds,junk] = size(bonds);
  n_ports = length(port_bond);
  n_exp_ports=n_ports;

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