Overview
Comment: | Only change to component-orientated causality for simple components NOT for compound components. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
bd79acf2f350d631b3b5a27d3a256b99 |
User & Date: | gawthrop@users.sourceforge.net on 1997-08-04 13:11:19 |
Other Links: | branch diff | manifest | tags |
Context
1997-08-04
| ||
14:18:55 | If no ports labels at all, just use the default component list. check-in: 9df910b7db user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
13:11:19 |
Only change to component-orientated causality for simple components NOT for compound components. check-in: bd79acf2f3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
12:50:39 |
Many bug fixes to the named port version + tied up the logic and supporting comments. check-in: f7ba5ad7f2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/m/abg2cbg.m from [52c4f8c2fd] to [0176f779b9].
︙ | ︙ | |||
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.14 1996/12/31 16:20:42 peterg % %% Just write causality information at top level -- it gets a bit % %% voluminous if written at deeper levels. % %% % %% Revision 1.13 1996/12/31 11:49:09 peterg % %% Don't copy port bond causality if already set -- allows subsystem % %% causality to be preset directely on named SS. | > > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | % [bonds,status] = abg2cbg(system_name, system_type, full_name, port_bonds, infofile) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.15 1997/01/05 12:25:59 peterg % %% More informative message about port bonds incompatible with ports % %% % %% Revision 1.14 1996/12/31 16:20:42 peterg % %% Just write causality information at top level -- it gets a bit % %% voluminous if written at deeper levels. % %% % %% Revision 1.13 1996/12/31 11:49:09 peterg % %% Don't copy port bond causality if already set -- allows subsystem % %% causality to be preset directely on named SS. |
︙ | ︙ | |||
174 175 176 177 178 179 180 | if status(i) ~= 0 % only do this if causality not yet complete % Get the bonds on this component comp = nozeros(components(i,:)); bond_list = abs(comp); direction = sign(comp)'*[1 1]; | < < < | > > > > > > < > > > | > < | | 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 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | if status(i) ~= 0 % only do this if causality not yet complete % Get the bonds on this component comp = nozeros(components(i,:)); bond_list = abs(comp); direction = sign(comp)'*[1 1]; % Get the component details eval([ '[comp_type,name,cr,arg] = ', system_type, '_cmp(i);' ]); % Change name of 0 and 1 components -- matlab doesn't like numbers here if strcmp(comp_type,'0') comp_type = 'zero'; end; if strcmp(comp_type,'1') comp_type = 'one'; end; % Component causality procedure name cause_name = [comp_type, '_cause']; % Bonds on this component (arrow-orientated) comp_bonds = bonds(bond_list,:); % Invoke the appropriate causality procedure if exist(cause_name)~=2 % Try a compound component [comp_bonds,s] = abg2cbg(name, comp_type, full_name, comp_bonds, ... typefile, infofile); % Create a single status from the status vector s if max(abs(s)) == 0 % Causal status(i) = 0; else if max(s) == 1 % At least one component is overcausal status(i) = 1; else % no component is overcausal but some are undercausal status(i) = -1; end; end; else % its a simple component % 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; end; % Update the full bonds list bonds(bond_list,:) = comp_bonds; end; end; done = sum(sum(abs(bonds)))/total*100; % mtt_info(sprintf('Causality is %3.0f%s complete.', done, pc), infofile); end; |
︙ | ︙ |