Index: mttroot/mtt/bin/trans/cbg2ese_m2r ================================================================== --- mttroot/mtt/bin/trans/cbg2ese_m2r +++ mttroot/mtt/bin/trans/cbg2ese_m2r @@ -14,24 +14,29 @@ ## Version control history ############################################################### ## $Id$ ## ## $Log$ +## Revision 1.2 1996/08/08 18:08:37 peter +## Sorted out file naming scheme. +## ## Revision 1.1 1996/08/08 15:57:15 peter ## Initial revision ## ############################################################### -infofile='stdout'; +infofile='mtt_info.txt'; eqnfile="$1_ese.r"; deffile="$1_def.r"; + # Remove the old log file rm -f cbg2ese_m.log rm -f $1_ese.r rm -f $1_def.r -rm -f mtt_info.txt +rm -f $infofile +touch $infofile #Inform user echo Creating $eqnfile echo Creating $1_def.r @@ -43,12 +48,11 @@ deffile = '$1_def.r'; structure = cbg2ese(system_name,'','',infofile) makedef(structure,deffile); - EOF - +cat $infofile Index: mttroot/mtt/lib/comp/simple/SS_eqn.m ================================================================== --- mttroot/mtt/lib/comp/simple/SS_eqn.m +++ mttroot/mtt/lib/comp/simple/SS_eqn.m @@ -4,10 +4,13 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.3 1996/08/09 14:08:04 peter +% %% Empty effort and flow attributes replaced by 'external'. +% %% % %% Revision 1.2 1996/08/08 16:38:19 peter % %% Changed to filenumer type of fprintf % %% % %% Revision 1.1 1996/08/08 16:19:08 peter % %% Initial revision @@ -33,10 +36,11 @@ flow_attribute = 'external'; end; inputs = structure(3); outputs = structure(4); +zero_outputs = structure(5); % Effort if strcmp(effort_attribute, 'external') if bonds(1,1)==-1 % Source inputs = inputs+1; @@ -50,14 +54,21 @@ elseif strcmp(effort_attribute, 'internal') % Do nothing else % named constant if bonds(1,1)==-1 % Source fprintf(filenum, '%s := %s;\n', ... - varname(bond_number,1), effort_attribute); + varname(bond_number,1), effort_attribute); else % Sensor - % THIS STILL NEEDS DOING! - mtt_info('Constant outputs not implemented yet!'); + if strcmp(effort_attribute, 'zero') %Zero output + zero_outputs = zero_outputs + 1; + fprintf(filenum, 'MTTyz%1.0f := %s;\n', ... + zero_outputs, varname(bond_number,1)); + fprintf(filenum, '%s := MTTUi%1.0f;\n', ... + varname(bond_number,-1), zero_outputs); + else + mtt_info([effort_attribute, ' not appropriate for an output ']); + end; end; end; % Flow if strcmp(flow_attribute, 'external') @@ -74,23 +85,30 @@ else % Named constant if bonds(1,2)==1 % Source fprintf(filenum, '%s := %s;\n', ... varname(bond_number,-1), flow_attribute); else % Sensor - % THIS STILL NEEDS DOING! - mtt_info('Zero outputs not implemented yet!'); + if strcmp(flow_attribute, 'zero') %Zero output + zero_outputs = zero_outputs + 1; + fprintf(filenum, 'MTTyz%1.0f := %s;\n', ... + zero_outputs, varname(bond_number,-1)); + fprintf(filenum, '%s := MTTUi%1.0f;\n', ... + varname(bond_number,1), zero_outputs); + else + mtt_info([effort_attribute, ' not appropriate for an output ']); + end; end; end; structure(3) = inputs; structure(4) = outputs; - +structure(5) = zero_outputs;