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,13 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.29 1998/07/10 09:01:42 peterg +% %% Added error + info file in new form +% %% % %% Revision 1.28 1998/07/08 09:23:42 peterg % %% Undid the previous change -- needs more thought. % %% % %% Revision 1.27 1998/07/03 19:03:31 peterg % %% Always override the causality of port bonds! @@ -231,13 +234,13 @@ else % Copy the port bonds & status for j = 1:n_port_bonds jj = port_bond_index(j); for k = 1:2 - if bonds(jj,k)==0 % only copy if not already set +# if bonds(jj,k)==0 % only copy if not already set bonds(jj,k) = port_bonds(j,k); - end; +# end; end; status(1:n_ports) = port_status; end end else @@ -257,11 +260,11 @@ old_done = inf; % Inner loop propagates causality while done~=old_done % disp(sprintf('Causality is %3.0f%s complete.', done, pc)); old_done = done; - +done,ci_index for i = n_port_bonds+1:n_components % Miss out the ports if status(i) ~= 0 % only do this if causality not yet complete % Get the bonds on this component comp = nozeros(components(i,:)); @@ -331,12 +334,12 @@ status(i) = -1; end; end; else % its a simple component -- or explicit causality defined - % disp(['---', name, ' (', cause_name, ') ---']); - % comp_bonds_in = comp_bonds; +# disp(['---', name, ' (', cause_name, ') ---']); +# comp_bonds_in = comp_bonds % Convert from arrow orientated to component orientated causality comp_bonds = comp_bonds.*direction; % Evaluate the built-in causality procedure @@ -343,11 +346,11 @@ eval([ '[comp_bonds,status(i)] = ', cause_name, '(comp_bonds);' ]); % and convert from component orientated to arrow orientated causality comp_bonds = comp_bonds.*direction; - % comp_bonds_out = comp_bonds; +# comp_bonds_out = comp_bonds end; % Update the full bonds list bonds(bond_list,:) = comp_bonds; end; @@ -357,11 +360,11 @@ %disp(sprintf('Causality is %3.0f%s complete.', done, pc), infofile)); end; % Set causality of a C or I which is not already set - [ci_index,prefered] = getdynamic(status,system_type); + [ci_index,prefered] = getdynamic(status,system_type) if ci_index>0 disp('Set causality of a C or I which is not already set') ci_bond_index = nozeros(components(ci_index,:)); # Get all bonds ci_direction = sign(ci_bond_index); ci_bond_index = abs(ci_bond_index); @@ -375,11 +378,11 @@ if at_top_level mtt_info(sprintf('Final causality of %s is %3.0f%s complete.', ... full_name, final_done, pc), infofile); - if final_done<=100 + if final_done<100 mtt_error(sprintf("Unable to complete causality"),errorfile); end; % List overcausal bonds [over_causal_bonds,n] = getindex(status,1);