Differences From Artifact [b070756f62]:

To Artifact [1e5df81dfe]:


12
13
14
15
16
17
18



19
20
21
22
23
24
25
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28







+
+
+









% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.2  1997/12/04 13:48:00  peterg
% %% Added sign info to take account of direction of bonds.
% %%
% %% Revision 1.1  1997/04/09  10:18:26  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Copyright (c) P.J. Gawthrop, 1996.
38
39
40
41
42
43
44
45
46
47
48
49
50
51








52
53
54
55
56
57
58
41
42
43
44
45
46
47







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62







-
-
-
-
-
-
-
+
+
+
+
+
+
+
+








% Right-hand side causality
RHS_cause = (bonds(:,1)==CorI*ones(ports,1))*CorI
state_cause = zeros(ports,1); % State causality

for outport = 1:ports

  % Sort out direction
  if direction(outport,1) == 1
    sign = '+';
  else
    sign = '-';
  end;
  
#  % Sort out direction
#  if direction(outport,1) == 1
#    sign = '+';
#  else
#    sign = '-';
#  end;

  sign = '+';  
  LHS_number = bond_number(outport);
  if bonds(outport,1) == -CorI % Integral causality on this port
    state = structure(1)+1;
    LHS_cause = CorI;

    % Print equation of form x_i = MTTx(i)
    fprintf(eqnfile, '%s := MTTx(%1.0f,1);\n', ...

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