Differences From Artifact [2ea9ad400f]:

To Artifact [b78d61b0f4]:


19
20
21
22
23
24
25




26
27
28
29
30
31
32
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.29  1998/08/25 09:22:34  peterg
# ## Correctely recognises port SSs its now easy -- they are in there own
# ## field
# ##
# ## Revision 1.28  1998/08/25 08:31:42  peterg
# ## Fixed bug - didn't find the ports - use deblank
# ##
# ## Revision 1.27  1998/08/25 07:16:49  peterg
# ## Modified to data struture representation
# ##
# ## Revision 1.26  1998/08/24 14:53:55  peterg
192
193
194
195
196
197
198
199

200

201
202

203
204
205
206





207
208


209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
196
197
198
199
200
201
202

203
204
205
206
207
208




209
210
211
212
213


214
215
216
217
218
219
220
221


222
223
224
225
226
227
228







-
+

+


+
-
-
-
-
+
+
+
+
+
-
-
+
+






-
-








  if (length(system_cr)==0)
    mtt_info(sprintf("No cr given so no cr aliasing done for system %s(%s)",\
		     system_name,system_type), infofilenum);
  endif;


  fields=["ports";"subsystems"];	# Do for both ports and subsystems -
  fields=["ports";"subsystems"]; # Do for both ports and subsystems -
				# ports first
  lists=["portlist";"subsystemlist"];
  for i=1:2
    field=deblank(fields(i,:));
    list=deblank(lists(i,:));
    if struct_contains(CBG,field);
      eval(["CBG_field = CBG.",field, ";"]);
      for [subsystem,comp_name] = CBG_field
i,comp_name
    if struct_contains(CBG,list);
      eval(["namelist=CBG.",list,";"]); # List of ports/subsystems
      [N,M]=size(namelist);	# Number of ports/subsystems
      for j=1:N
      	comp_name = deblank(namelist(j,:)); # Name of this component
				#comp = nozeros(components(i,:));
    	comp = subsystem.connections;
	eval(["subsystem=CBG.",field,".",comp_name,";"]); # Pluck out the details
    	comp = subsystem.connections; # Connections
    	bond_list = abs(comp);
    	direction = sign(comp)'*[1 1];
				# Convert from arrow orientated to component orientated causality
    	comp_bonds = CBG.bonds(bond_list,:).*direction;
	
    	disp(["---- ", field, " ---"]);    
				# 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,subsystem.type,full_name);    
    	if struct_contains(CBG,"alias")
	  subsystem.arg = alias_args(subsystem.arg,CBG.alias,";",message,infofilenum)
	  subsystem.cr = alias_args(subsystem.cr,CBG.alias,";",message,infofilenum)

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