13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
+
+
+
+
|
% [bonds,status] = abg2cbg(system_name, system_type, full_name, port_bonds, infofile)
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.14 1996/12/31 16:20:42 peterg
% %% Just write causality information at top level -- it gets a bit
% %% voluminous if written at deeper levels.
% %%
% %% Revision 1.13 1996/12/31 11:49:09 peterg
% %% Don't copy port bond causality if already set -- allows subsystem
% %% causality to be preset directely on named SS.
% %%
% %% Revision 1.12 1996/12/31 11:42:36 peterg
% %% *** empty log message ***
% %%
|
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
-
-
+
+
|
% If not at top level, then sort out the port bonds.
if at_top_level==0
% Find number of port bonds
[n_port_bonds,columns] = size(port_bonds);
% Check compatibility - if ok copy port bonds to the internal bonds list.
if n_port_bonds~=n_ports
mtt_info(sprintf('%1.0f port bonds incompatible with %1.0f ports', ...
n_port_bonds, n_ports), infofile);
mtt_info(sprintf('%s: %1.0f port bonds incompatible with %1.0f ports', ...
full_name, n_port_bonds, n_ports), infofile);
else % Copy the port bonds -- but only if not set already
for i = 1:n_ports % The port SSs come first
j = abs(components(i,1)); % Get the bonds attached to the ports
direction = -sign(components(i,1));
for k=1:2
if bonds(j,k)==0 % causality not set yet - so copy.
bonds(j,k) = direction*port_bonds(i,k);
|