Overview
Comment:Don't evaluate alias if no constitutive relationship or args and write
message.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: afb9d0acb1f5fe216bc48c89445ae5a7f24d853aa90ba54cb69548c2bff7f289
User & Date: gawthrop@users.sourceforge.net on 1998-07-04 07:10:27
Other Links: branch diff | manifest | tags
Context
1998-07-04
07:15:44
Back under RCS check-in: d8841870ba user: gawthrop@users.sourceforge.net tags: origin/master, trunk
07:10:27
Don't evaluate alias if no constitutive relationship or args and write
message.
check-in: afb9d0acb1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1998-07-03
19:03:31
Always override the causality of port bonds! check-in: 5046e243f1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/cbg2ese.m from [e667e5d1a5] to [6933fd7ec1].

19
20
21
22
23
24
25




26
27
28
29
30
31
32
% Structure matrix [states,nonstates,inputs,outputs,zero_outputs]

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




% %% Revision 1.20  1998/07/03 14:39:09  peterg
% %% Added info messages a bit busy now!
% %%
% %% Revision 1.19  1998/04/12 11:58:19  peterg
% %% Rename port components by changing name_r to [name_r
% %%
% %% Revision 1.18  1998/04/11 18:59:16  peterg







>
>
>
>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
% Structure matrix [states,nonstates,inputs,outputs,zero_outputs]

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.21  1998/07/03 18:58:58  peterg
% %% Put arg alias stuff within function alias_args
% %% Called recursively to handle arithmetic expressions
% %%
% %% Revision 1.20  1998/07/03 14:39:09  peterg
% %% Added info messages a bit busy now!
% %%
% %% Revision 1.19  1998/04/12 11:58:19  peterg
% %% Rename port components by changing name_r to [name_r
% %%
% %% Revision 1.18  1998/04/11 18:59:16  peterg
155
156
157
158
159
160
161














162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177



178




179
180
181
182
183
184
185
  % Set up the first dummy bond number - needed for repetative components
  next_bond = max(max(abs(components)))+1;

  % Set up the counters for the labelled SS. These are, by definition,
  % encountered first and so the counters will not be messed up by subsystems.
  local_u_index = 0;
  local_y_index = 0;














  
  for i = 1:n_components
    comp = nozeros(components(i,:));
    bond_list = abs(comp);
    direction = sign(comp)'*[1 1];
    % Convert from arrow orientated to component orientated causality
    comp_bonds = bonds(bond_list,:).*direction;

disp('---- Component ---');    
    % Get the component details
    eval([ '[comp_type,comp_name,cr,args,repetitions] = ', cmp_name, '(i)' ...
	  ]);
						   
    % Alias the args list
    eval([ "alias = ", alias_name ";"]);
    message = sprintf("\tfor component  %s (%s) within %s",comp_name,comp_type,full_name);    



    args = alias_args(args,alias,";",message);





    % Substitute positional ($1 etc) arguments
    cr = subs_arg(cr,system_cr, ...
	'lin',full_name,comp_type,comp_name);
    args = subs_arg(args,system_args, ...
	'1',full_name,comp_type,comp_name);
    







>
>
>
>
>
>
>
>
>
>
>
>
>
>













|
<
|
>
>
>
|
>
>
>
>







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193

194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
  % Set up the first dummy bond number - needed for repetative components
  next_bond = max(max(abs(components)))+1;

  % Set up the counters for the labelled SS. These are, by definition,
  % encountered first and so the counters will not be messed up by subsystems.
  local_u_index = 0;
  local_y_index = 0;

  if (length(system_args)==0)
    mtt_info(sprintf("No arguments given so no argument aliasing done for system %s(%s)",\
     system_name,system_type),infofile);
  else
    eval([ "alias = ", alias_name ";"]);
  end;

  if (length(system_cr)==0)
    mtt_info(sprintf("No cr given so no cr aliasing done for system %s(%s)",\
     system_name,system_type),infofile);
  else
    eval([ "alias = ", alias_name ";"]);
  end;
  
  for i = 1:n_components
    comp = nozeros(components(i,:));
    bond_list = abs(comp);
    direction = sign(comp)'*[1 1];
    % Convert from arrow orientated to component orientated causality
    comp_bonds = bonds(bond_list,:).*direction;

disp('---- Component ---');    
    % Get the component details
    eval([ '[comp_type,comp_name,cr,args,repetitions] = ', cmp_name, '(i)' ...
	  ]);
						   
    % Alias the args list -- if not at top level

    message = sprintf("\tfor component  %s (%s) within %s",\
                      comp_name,comp_type,full_name);    

    if (length(system_args)>0)
      args = alias_args(args,alias,";",message)
    end;
    if (length(system_cr)>0)
      cr = alias_args(cr,alias,";",message)
    end;

    % Substitute positional ($1 etc) arguments
    cr = subs_arg(cr,system_cr, ...
	'lin',full_name,comp_type,comp_name);
    args = subs_arg(args,system_args, ...
	'1',full_name,comp_type,comp_name);
    


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