Index: mttroot/mtt/bin/trans/m/cbg2ese.m ================================================================== --- mttroot/mtt/bin/trans/m/cbg2ese.m +++ mttroot/mtt/bin/trans/m/cbg2ese.m @@ -1,9 +1,9 @@ function structure = cbg2ese(system_name, system_type, system_cr, ... system_args, full_name, full_name_repetition, ... repetition,... - structure, structure_file, infofile) + structure, structure_file,infofilenum) % Set up globals to count the component inputs and outputs. This relies on % the named SS (the ports) being in the correct order. Using globals here % avoids changing the common argument list for all _eqn files for something % which is only used for named SS components. global local_u_index @@ -21,10 +21,14 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.22 1998/07/04 07:10:27 peterg +% %% Don't evaluate alias if no constitutive relationship or args and write +% %% message. +% %% % %% Revision 1.21 1998/07/03 18:58:58 peterg % %% Put arg alias stuff within function alias_args % %% Called recursively to handle arithmetic expressions % %% % %% Revision 1.20 1998/07/03 14:39:09 peterg @@ -164,18 +168,18 @@ local_u_index = 0; local_y_index = 0; if (length(system_args)==0) mtt_info(sprintf("No arguments given so no argument aliasing done for system %s(%s)",\ - system_name,system_type),infofile); + system_name,system_type), infofilenum); else eval([ "alias = ", alias_name ";"]); end; if (length(system_cr)==0) mtt_info(sprintf("No cr given so no cr aliasing done for system %s(%s)",\ - system_name,system_type),infofile); + system_name,system_type), infofilenum); else eval([ "alias = ", alias_name ";"]); end; for i = 1:n_components @@ -219,11 +223,11 @@ if repetitions>1 port_pairs = ports/2; if round(port_pairs)~=port_pairs; mtt_info(['Repeated component ', comp_name, ... - ' has an odd number of ports - ignoring repetitions']); + ' has an odd number of ports - ignoring repetitions'], infofilenum); repetitions = 1; end; end; if repetitions>1 @@ -257,11 +261,11 @@ if exist(eqn_name)~=2 % Try a compound component disp('---PUSH---'); structure = cbg2ese(comp_name, comp_type, cr, args, ... full_name, full_name_repetition, ... - k, structure, structure_file, infofile); + k, structure, structure_file, infofilenum); % Link up the bonds fprintf(ese_file, ... '\n\t%s Equations linking up subsystem %s (%s)\n\n', ... pc, comp_name, comp_type);