Overview
Comment:Replace mtt_info by mtt_error when appropriate
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 10131d4ff73c80d2861e4fa97f8cb98dbae03838dd0bd537d4c96246acc1170a
User & Date: gawthrop@users.sourceforge.net on 1998-07-08 11:33:54
Other Links: branch diff | manifest | tags
Context
1998-07-08
12:33:51
Reinstated the infofilenum parameter. check-in: de9e58a6eb user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:33:54
Replace mtt_info by mtt_error when appropriate check-in: 10131d4ff7 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:30:45
Removed second (fileID) argument from mtt_info check-in: ba1b9016e5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/comp/simple/SS_eqn.m from [ae72d83aa8] to [f0e2f6c09c].

24
25
26
27
28
29
30



31
32
33
34
35
36
37

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



% %% Revision 1.17  1998/07/04 07:15:44  peterg
% %% Back under RCS
% %%
% %% Revision 1.16  1998/04/11 19:07:16  peterg
% %% Now do named ports as ordinary ports iff at top level.
% %% --- not yet complete, need to pass necesssary info though to this
% %%     function







>
>
>







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

			
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.18  1998/07/08 11:30:45  peterg
% %% Removed second (fileID) argument from mtt_info
% %%
% %% Revision 1.17  1998/07/04 07:15:44  peterg
% %% Back under RCS
% %%
% %% Revision 1.16  1998/04/11 19:07:16  peterg
% %% Now do named ports as ordinary ports iff at top level.
% %% --- not yet complete, need to pass necesssary info though to this
% %%     function
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
%     cr contains 'MTT_port'
%     arg contains port number

if (strcmp(cr,"SS"))		# Then its the standard file
  a = split(args,",");
  [N,M]=size(a);
  if (N~=2)			# Must have 2 arguments
    mtt_info(sprintf("SS should have 2 args not %i", N));
  else
    effort_attribute = a(1,:);
    flow_attribute   = a(2,:);
  end;
else				# Old style file
  effort_attribute = cr;
  flow_attribute = args;







|







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
%     cr contains 'MTT_port'
%     arg contains port number

if (strcmp(cr,"SS"))		# Then its the standard file
  a = split(args,",");
  [N,M]=size(a);
  if (N~=2)			# Must have 2 arguments
    mtt_error(sprintf("SS should have 2 args not %i", N));
  else
    effort_attribute = a(1,:);
    flow_attribute   = a(2,:);
  end;
else				# Old style file
  effort_attribute = cr;
  flow_attribute = args;
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
	varname(name, 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', ...
	  zero_outputs, varname(name, bond_number,1));
    else
      mtt_info([effort_attribute, ' not appropriate for an output ']);
    end;
  end;
end;
  
% Flow
if strcmp(flow_attribute, 'external')
  if bonds(1,2)==1 % Source







|







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
	varname(name, 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', ...
	  zero_outputs, varname(name, bond_number,1));
    else
      mtt_error([effort_attribute, ' not appropriate for an output ']);
    end;
  end;
end;
  
% Flow
if strcmp(flow_attribute, 'external')
  if bonds(1,2)==1 % Source
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
	varname(name, 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', ...
	  zero_outputs, varname(name, bond_number,-1));
    else
      mtt_info([flow_attribute, ' not appropriate for an output ']);
    end;
  end;
end;

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







|








232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
	varname(name, 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', ...
	  zero_outputs, varname(name, bond_number,-1));
    else
      mtt_error([flow_attribute, ' not appropriate for an output ']);
    end;
  end;
end;

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


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