Differences From Artifact [f2e12d75c2]:

To Artifact [7cc82fd47a]:


1
2
3
4
5
6
7
8
9



10
11
12
13
14
15
16
function  structure = EMTF_eqn(name,bond_number,bonds,direction,cr,args, ...
                            structure,eqnfile);


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



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


			
if nargin<8
  eqnfile = 'stdout';
end;









>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function  structure = EMTF_eqn(name,bond_number,bonds,direction,cr,args, ...
                            structure,eqnfile);


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.2  2000/12/28 11:45:48  peterg
% %% *** empty log message ***
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


			
if nargin<8
  eqnfile = 'stdout';
end;
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
70
71
72
73
74
75
76
77
78
else
  outbond = bond_number(1);
  inbond =  bond_number([2 3]);
  outport = 1;
  inport = [2;3];
end;

eqn =  equation(name,cr,args,outbond,outcause,outport, ...
                             inbond,incause,inport);
fprintf(eqnfile, '%s',eqn);

% Flow
outcause = -1;
incause = [-1;1];
if f_1==-1
  outbond = bond_number(2);
  inbond =  bond_number([1 3]);
  outport = 2;
  inport = [1;3];
else
  outbond = bond_number(1);
  inbond =  bond_number([2 3]);
  outport = 1;
  inport = [2;3];
end;

eqn =  equation(name,cr,args,outbond,outcause,outport, ...
                             inbond,incause,inport);
fprintf(eqnfile, '%s',eqn);

% Modulation: flow on port 3 is always zero
  fprintf(eqnfile, '%s := 0;\n', ...
      varname(name,bond_number(3), -1));














|


















|













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
70
71
72
73
74
75
76
77
78
79
80
81
else
  outbond = bond_number(1);
  inbond =  bond_number([2 3]);
  outport = 1;
  inport = [2;3];
end;

eqn =  equation("EMTF",name,cr,args,outbond,outcause,outport, ...
                             inbond,incause,inport);
fprintf(eqnfile, '%s',eqn);

% Flow
outcause = -1;
incause = [-1;1];
if f_1==-1
  outbond = bond_number(2);
  inbond =  bond_number([1 3]);
  outport = 2;
  inport = [1;3];
else
  outbond = bond_number(1);
  inbond =  bond_number([2 3]);
  outport = 1;
  inport = [2;3];
end;

eqn =  equation("EMTF",name,cr,args,outbond,outcause,outport, ...
                             inbond,incause,inport);
fprintf(eqnfile, '%s',eqn);

% Modulation: flow on port 3 is always zero
  fprintf(eqnfile, '%s := 0;\n', ...
      varname(name,bond_number(3), -1));








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