Overview
Comment:Writes MTTyz vector in the same format as MTTx and MTTy: MTTyz($d,1)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: c0575fea61cbb5c559613a0b6fa2239679cbf4f336d47be126e70fba1b6bf5f2
User & Date: geraint@users.sourceforge.net on 2004-08-29 13:11:21
Other Links: branch diff | manifest | tags
Context
2004-08-29
13:12:19
Added rule to create MTTyz vector (unknown inputs). check-in: 2c374ef156 user: geraint@users.sourceforge.net tags: origin/master, trunk
13:11:21
Writes MTTyz vector in the same format as MTTx and MTTy: MTTyz($d,1) check-in: c0575fea61 user: geraint@users.sourceforge.net tags: origin/master, trunk
03:18:11
Do not write temporary variables if NUM_OF_TMP_VAR = 0. check-in: b3f70e2ca1 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/comp/simple/SS_eqn.m from [6dfb5b2a2f] to [693178b62c].

27
28
29
30
31
32
33



34
35
36
37
38
39
40
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43







+
+
+








			
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.25  2003/01/07 18:09:21  geraint
% %% More informative error message.
% %%
% %% Revision 1.24  1999/10/22 02:20:32  peterg
% %% Changed error handleing of number of attributes >2
% %%
% %% Revision 1.23  1998/12/03 16:46:16  peterg
% %% Deblanked attributes so that zero attribute works.
% %%
% %% Revision 1.22  1998/07/28 19:05:46  peterg
207
208
209
210
211
212
213
214

215
216
217
218
219
220
221
210
211
212
213
214
215
216

217
218
219
220
221
222
223
224







-
+







    else 
      if bonds(1,1)==-1 % Named or unknown source
	fprintf(filenum, "%s := %s;\n", ...
		varname(sname, bond_number,1), effort_attribute);
      else % Sensor
	if strcmp(effort_attribute, "zero") %Zero output
	  zero_outputs = zero_outputs + 1;
	  fprintf(filenum, "MTTyz%d := %s;\n", ...
	  fprintf(filenum, "MTTyz(%d,1) := %s;\n", ...
		  zero_outputs, varname(sname, bond_number,1));
	else
	  mtt_error([effort_attribute, " not appropriate for an output (", name, ")"]);
	end;
      end;
    end;
    
238
239
240
241
242
243
244
245

246
247
248
249
250
251
252
253
254
255
256
257
258
241
242
243
244
245
246
247

248
249
250
251
252
253
254
255
256
257
258
259
260
261







-
+













    else % Named constant
      if bonds(1,2)==1 % Source
	fprintf(filenum, "%s := %s;\n", ...
		varname(sname, bond_number,-1), flow_attribute);
      else % Sensor
	if strcmp(flow_attribute, "zero") %Zero output
	  zero_outputs = zero_outputs + 1
	  fprintf(filenum, "MTTyz%d := %s;\n", ...
	  fprintf(filenum, "MTTyz(%d,1) := %s;\n", ...
		  zero_outputs, varname(sname, bond_number,-1));
	else
	  mtt_error([flow_attribute, " not appropriate for an output (", name, ")"]);
	end;
      end;
    end;
  end;
  structure(3) = inputs;
  structure(4) = outputs;
  structure(5) = zero_outputs;
  structure(6) = unknown_inputs;
  
end;


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