Differences From Artifact [a6dcac55ff]:

To Artifact [c916553c94]:


15
16
17
18
19
20
21



22
23
24
25
26
27
28

			
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %% Revision 1.4  1996/08/18  20:06:21  peter
% %% Included zero outputs.
% %%
% %% 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







>
>
>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

			
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.5  1996/12/04 21:27:53  peterg
% %% Replaced str2num by sprintf
% %%
% %% Revision 1.4  1996/08/18  20:06:21  peter
% %% Included zero outputs.
% %%
% %% 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
57
58
59
60
61
62
63

64

65
66
67
68
69
70
71


inputs = structure(3);
outputs = structure(4);
zero_outputs = structure(5);

if strcmp(effort_attribute, 'MTT_port') % Its a numbered port

  port_number = sprintf('%1.0f',flow_attribute);

  % Effort 
  if bonds(1,1)==-1 % Source
    fprintf(filenum, '%s := %s_MTTu%1.0f;\n', ...
        varname(name, bond_number,1), name, port_number);
  else % Sensor
    fprintf(filenum, '%s_MTTy%1.0f := %s;\n', ...
        name, port_number, varname(name, bond_number,1));







>
|
>







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76


inputs = structure(3);
outputs = structure(4);
zero_outputs = structure(5);

if strcmp(effort_attribute, 'MTT_port') % Its a numbered port
  % Convert string to number
  port_number = abs(flow_attribute)-abs('0');

  % Effort 
  if bonds(1,1)==-1 % Source
    fprintf(filenum, '%s := %s_MTTu%1.0f;\n', ...
        varname(name, bond_number,1), name, port_number);
  else % Sensor
    fprintf(filenum, '%s_MTTy%1.0f := %s;\n', ...
        name, port_number, varname(name, bond_number,1));

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]