Differences From Artifact [49372aa275]:

To Artifact [3356f5589a]:


23
24
25
26
27
28
29



30
31
32
33
34
35
36
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39







+
+
+








			
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.14  1997/12/16 18:25:19  peterg
% %% Added unknown_input attribure to flow -- effort still needs doing
% %%
% %% Revision 1.13  1997/09/18 13:15:15  peterg
% %% Fixed incorrect error message flagging inappropriate flow outputs
% %% -- used to give the effort rather than the flow in the error message.
% %%
% %% Revision 1.12  1997/08/26 07:51:30  peterg
% %% Now counts the local input and outputs by order of appearence rather
% %% than by port number - it therfore handles ports with bicausality correctely.
148
149
150
151
152
153
154




155
156
157
158
159
160
161
162
163
164


165
166
167
168
169
170
171
172
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165






166
167

168
169
170
171
172
173
174







+
+
+
+




-
-
-
-
-
-
+
+
-







    fprintf(filenum, '%s := MTTu(%d,1);\n', ...
	varname(name, bond_number,1),inputs);
  else % Sensor
    outputs = outputs+1;
    fprintf(filenum, 'MTTy(%d,1) := %s;\n', ...
	outputs, varname(name, bond_number,1));
  end;
elseif strcmp(effort_attribute, 'unknown') % Unknown input
  unknown_inputs = unknown_inputs + 1;
  fprintf(filenum, '%s := MTTUi%d;\n', ...
      varname(name, bond_number,1), unknown_inputs);
elseif strcmp(effort_attribute, 'internal')
  % Do nothing
else 
  if bonds(1,1)==-1 % Named or unknown source
    if strcmp(effort_attribute, 'unknown') % Unknown input
      fprintf(filenum, '%s := MTTUi%d;\n', ...
	  varname(name, bond_number,-1), zero_outputs);
    else
      fprintf(filenum, '%s := %s;\n', ...
	  varname(name, bond_number,1), effort_attribute);
    fprintf(filenum, '%s := %s;\n', ...
	varname(name, bond_number,1), effort_attribute);
    end;
  else % Sensor
    if strcmp(effort_attribute, 'zero') %Zero output
      zero_outputs = zero_outputs + 1;
      fprintf(filenum, 'MTTyz%d := %s;\n', ...
	  zero_outputs, varname(name, bond_number,1));
    else
      mtt_info([effort_attribute, ' not appropriate for an output '],STDerr);

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