13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
% [bonds,status] = abg2cbg(system_name, system_type, full_name, port_bonds, infofile)
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.11 1996/12/07 17:10:48 peterg
% %% Allows port SS at top level - ie takes it to be an ardianry SS at top
% %% level.
% %%
% %% Revision 1.10 1996/12/04 21:48:55 peterg
% %% Compares full-name with empty string (instead of testing for zero
% %% length.
|
>
>
>
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
% [bonds,status] = abg2cbg(system_name, system_type, full_name, port_bonds, infofile)
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.12 1996/12/31 11:42:36 peterg
% %% *** empty log message ***
% %%
% %% Revision 1.11 1996/12/07 17:10:48 peterg
% %% Allows port SS at top level - ie takes it to be an ardianry SS at top
% %% level.
% %%
% %% Revision 1.10 1996/12/04 21:48:55 peterg
% %% Compares full-name with empty string (instead of testing for zero
% %% length.
|
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
% 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);
else % Copy the port bonds
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));
bonds(j,:) = direction*port_bonds(i,:);
end;
end;
end;
% Set initial status
status = -ones(n_components,1);
|
|
|
>
>
|
>
>
|
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
% 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);
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);
end;
end;
end;
end;
end;
% Set initial status
status = -ones(n_components,1);
|