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.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 ***
% %%
% %% 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.
% %%
|
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
|
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
bonds(bond_index,1) = prefered;
bonds(bond_index,2) = prefered;
end;
end;
% Print final causality
final_done = (sum(status==zeros(n_components,1))/n_components)*100;;
mtt_info(sprintf('Final causality of %s is %3.0f%s complete.', ...
full_name, final_done, pc), infofile);
final_done = (sum(status==zeros(n_components,1))/n_components)*100;
if at_top_level
mtt_info(sprintf('Final causality of %s is %3.0f%s complete.', ...
full_name, final_done, pc), infofile);
% List overcausal bonds
[over_causal_bonds,n] = getindex(status,1);
if n>0
for i=over_causal_bonds'
eval([ '[comp_type,name] = ', system_type, '_cmp(i);' ]);
mtt_info(sprintf('Component %s (%s) is overcausal', name, comp_type), ...
infofile);
end;
end;
% List undercausal bonds
[under_causal_bonds,n] = getindex(status,-1);
if n>0
for i=under_causal_bonds'
eval([ '[comp_type,name] = ', system_type, '_cmp(i);' ]);
mtt_info(sprintf('Component %s (%s) is undercausal', name, comp_type), ...
infofile);
% List overcausal bonds
[over_causal_bonds,n] = getindex(status,1);
if n>0
for i=over_causal_bonds'
eval([ '[comp_type,name] = ', system_type, '_cmp(i);' ]);
mtt_info(sprintf('Component %s (%s) is overcausal', name, comp_type), ...
infofile);
end;
end;
% List undercausal bonds
[under_causal_bonds,n] = getindex(status,-1);
if n>0
for i=under_causal_bonds'
eval([ '[comp_type,name] = ', system_type, '_cmp(i);' ]);
mtt_info(sprintf('Component %s (%s) is undercausal', name, comp_type), ...
infofile);
end;
end;
end;
% $$$ file_name = [full_name, '_', system_type]
file_name = [full_name, '_cbg.m']
cbgfilenum = fopen(file_name,'w');
write_cbg(cbgfilenum,full_name,system_type,bonds,status);
|