File mttroot/mtt/lib/comp/simple/one_cause.m artifact 3018a4a5e9 part of check-in e7296f7eec


function [bonds,status] = one_cause(bonds);
% one_cause - causality for a one junction
% 
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%     %%%%% Model Transformation Tools %%%%%
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% Matlab function  one_cause


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


% Copyright (c) P.J. Gawthrop, 1996.

%Effort
[bonds,e_status] = juncause(bonds,-1,1);

%Flow
[bonds,f_status] = juncause(bonds,-1,-1);

if (e_status==1)|(f_status==1)       % Over causal
  status = 1;
elseif (e_status==-1)|(f_status==-1) % Under causal
  status = -1;
else                                  % causal
  status = 0;
end;



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