Index: mttroot/mtt/bin/trans/m/abg2cbg.m ================================================================== --- mttroot/mtt/bin/trans/m/abg2cbg.m +++ mttroot/mtt/bin/trans/m/abg2cbg.m @@ -15,10 +15,14 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% 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 @@ -155,11 +159,11 @@ % Outer while loop sets preferred causality ci_index=1; while( ci_index>0) old_done = inf; - % Inner loop propogates causality + % Inner loop propagates causality while done~=old_done disp(sprintf('Causality is %3.0f%s complete.', done, pc)); old_done = done; for i = 1:n_components @@ -230,31 +234,34 @@ 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); - -% 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); +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); + end; end; end; % $$$ file_name = [full_name, '_', system_type] file_name = [full_name, '_cbg.m']