Overview
Comment:Minor bug fixes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: e87199e5d9ad40234cc98535194af521d74fd30270109a30a1e01d2ce854c44c
User & Date: gawthrop@users.sourceforge.net on 1997-08-18 16:25:25
Other Links: branch diff | manifest | tags
Context
1997-08-18
19:39:48
Now generates (exampaded) port_bond list correctely check-in: 34c2407185 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
16:25:25
Minor bug fixes check-in: e87199e5d9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:12:23
Initial revision check-in: 9612f6fc83 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/abg2cbg.m from [1e301015c1] to [1126ffe3fb].

13
14
15
16
17
18
19








20
21
22
23
24
25
26
% [bonds,status] = abg2cbg(system_name, system_type, full_name, port_bonds, infofile)

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








% %% Revision 1.19  1997/08/18 11:23:59  peterg
% %% Main component loop now misses out the ports (SS:[]) -- the causality
% %% is merely passed through these components.
% %%
% %% Revision 1.18  1997/08/08 08:11:04  peterg
% %% Suppress compoment trace.
% %%







>
>
>
>
>
>
>
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
% [bonds,status] = abg2cbg(system_name, system_type, full_name, port_bonds, infofile)

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.20  1997/08/18 12:45:24  peterg
% %% Replaced: comp_bonds = bonds(bond_list,:)
% %% by: 	for kk = 1:n_comp
% %% 	  comp_bonds(kk,:) = bonds(comp(kk),:);
% %% 	end;
% %%
% %% to avoid an octave bug in 1.92.
% %%
% %% Revision 1.19  1997/08/18 11:23:59  peterg
% %% Main component loop now misses out the ports (SS:[]) -- the causality
% %% is merely passed through these components.
% %%
% %% Revision 1.18  1997/08/08 08:11:04  peterg
% %% Suppress compoment trace.
% %%
213
214
215
216
217
218
219

220
221
222
223
224
225
226
227
228
        % Bonds on this component (arrow-orientated) -- these become the
        % port bonds on the ith component of this subsystem.
	
	% a bug in octave 1.92 (??) prevents this from working -- replace by
	% a loop -- but check on V2.0
      	% comp_bonds = bonds(bond_list,:)
	

	for kk = 1:n_comp
	  comp_bonds(kk,:) = bonds(comp(kk),:);
	end;
	

      % Invoke  the appropriate causality procedure
      if exist(cause_name)~=2 % Try a compound component
        % Port status depends on whether the corresponding bonds are
        %  fully causal at this stage.







>
|
|







221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
        % Bonds on this component (arrow-orientated) -- these become the
        % port bonds on the ith component of this subsystem.
	
	% a bug in octave 1.92 (??) prevents this from working -- replace by
	% a loop -- but check on V2.0
      	% comp_bonds = bonds(bond_list,:)
	
	comp_bonds=[];
	for kk = 1:n_bonds
	  comp_bonds(kk,:) = bonds(bond_list(kk),:);
	end;
	

      % Invoke  the appropriate causality procedure
      if exist(cause_name)~=2 % Try a compound component
        % Port status depends on whether the corresponding bonds are
        %  fully causal at this stage.
240
241
242
243
244
245
246

247
248
249
250
251
252
253
254
255
256
257
258
259
260
	    status(i) = 1;
	  else           % no component is overcausal but some are undercausal
	    status(i) = -1;
	  end;
	end;

      else % its a simple component

	comp_bonds_in = comp_bonds

	% Convert from arrow orientated to component orientated causality
	comp_bonds = comp_bonds.*direction;
	
	disp(['---', name, ' (', cause_name, ') ---']);

        % Evaluate the built-in causality procedure
	eval([ '[comp_bonds,status(i)] = ', cause_name, '(comp_bonds);' ]);

       % and convert from component orientated to arrow orientated causality
       comp_bonds = comp_bonds.*direction; 
       
       comp_bonds_out = comp_bonds







>





<
<







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


262
263
264
265
266
267
268
	    status(i) = 1;
	  else           % no component is overcausal but some are undercausal
	    status(i) = -1;
	  end;
	end;

      else % its a simple component
	disp(['---', name, ' (', cause_name, ') ---']);
	comp_bonds_in = comp_bonds

	% Convert from arrow orientated to component orientated causality
	comp_bonds = comp_bonds.*direction;
	


        % Evaluate the built-in causality procedure
	eval([ '[comp_bonds,status(i)] = ', cause_name, '(comp_bonds);' ]);

       % and convert from component orientated to arrow orientated causality
       comp_bonds = comp_bonds.*direction; 
       
       comp_bonds_out = comp_bonds


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