Differences From Artifact [c289a11e44]:

To Artifact [43eb33081e]:


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.24  1998/06/25 17:45:03  peterg
% %% No change -- but checked that explicit causality works!
% %%
% %% Revision 1.23  1998/04/04 10:46:37  peterg
% %% Coerces port bonds to have smae direction as the imposing bonds
% %% _cbg now generates the (coerced) components as welll as the (coerced)
% %% causality.







>
>
>
>
>







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

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.25  1998/06/25 18:53:30  peterg
% %% Actually, the previous comment was optimistic.
% %% The port causalities on a compound are now forced to be the same as
% %% that specified by a a _cuase.m file (if it exists)
% %%
% %% Revision 1.24  1998/06/25 17:45:03  peterg
% %% No change -- but checked that explicit causality works!
% %%
% %% Revision 1.23  1998/04/04 10:46:37  peterg
% %% Coerces port bonds to have smae direction as the imposing bonds
% %% _cbg now generates the (coerced) components as welll as the (coerced)
% %% causality.
340
341
342
343
344
345
346
347
348
349

350
351
352
353
354
355
356
    %disp(sprintf('Causality is %3.0f%s complete.', done, pc), infofile));
    
  end;
  
  % Set causality of a C or I which is not already set
  [ci_index,prefered] = getdynamic(status,system_type);
  if ci_index>0
    bond_index = components(ci_index,1) % its a one port
    bonds(bond_index,1) = prefered;
    bonds(bond_index,2) = prefered;

  end;
  
end;

% Print final causality
final_done =  (sum(status==zeros(n_components,1))/n_components)*100;








|
|
|
>







345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
    %disp(sprintf('Causality is %3.0f%s complete.', done, pc), infofile));
    
  end;
  
  % Set causality of a C or I which is not already set
  [ci_index,prefered] = getdynamic(status,system_type);
  if ci_index>0
    ci_bond_index = nozeros(components(ci_index,:)); # Get all bonds
    ci_direction = sign(ci_bond_index);
    ci_bond_index = abs(ci_bond_index);
    bonds(ci_bond_index,1:2) = prefered*ci_direction'*[1 1];
  end;
  
end;

% Print final causality
final_done =  (sum(status==zeros(n_components,1))/n_components)*100;


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