Overview
Comment:Stopped it trying to fix its own causality.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 3245ee9a06f16cc3f9c7144141a4cb90d3ed6df4e58f4ea250e907a09127015e
User & Date: gawthrop@users.sourceforge.net on 1998-07-27 20:19:33
Other Links: branch diff | manifest | tags
Context
1998-07-27
20:25:15
Sorted out new mtt_r2m check-in: 61125cc04d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
20:19:33
Stopped it trying to fix its own causality. check-in: 3245ee9a06 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
18:59:11
Added WMIN etc check-in: 193d680978 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/comp/simple/C_cause.m from [a12fffd3b5] to [2222eab409].

16
17
18
19
20
21
22



23
24
25
26
27
28
29
30
31

































32
33


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



% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


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

% Unicausal multiport C component
% Same causal pattern as R component

[bonds,status] = R_cause(bonds);










































>
>
>








|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  1996/11/01 12:35:36  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


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

% Unicausal multiport C component
% Same causal pattern as R component

% [bonds,status] = R_cause(bonds);

% Set causality to preferred if not already set.
% Find the number of ports
[ports,junk] = size(bonds);

% default undercausal status
statuses = -ones(ports,1);

% Force unicausality but DONT set if not already set
preferred = -1;
for i = 1:ports
  if (bonds(i,1)~=0)&(bonds(i,2)~=0) % Both bonds set
    statuses(i) = bonds(i,1)~=bonds(i,2);
  elseif bonds(i,2)~=0               % Bond 1 set
    bonds(i,1) = bonds(i,2);
    statuses(i) = 0;
  elseif bonds(i,1)~=0               % Bond 2 set
    bonds(i,2) = bonds(i,1);
    statuses(i) = 0;
  else				# Don't set
#    bonds(i,1) = preferred;
#    bonds(i,2) = preferred;
#    statuses(i) = 0;
  end;
end;

if max(statuses)==1
  status = 1;
elseif min(statuses)==-1
  status = -1;
else
  status = 0;
end;



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