Differences From Artifact [5ad1df79af]:

To Artifact [da8322ed66]:


11
12
13
14
15
16
17



18
19
20
21
22
23
24
%    structure,eqnfile);

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



% %% Revision 1.2  1996/08/30 18:35:43  peter
% %% New name argument added.
% %%
% %% Revision 1.1  1996/08/30 16:38:25  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%







>
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
%    structure,eqnfile);

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.3  1996/09/12 19:30:31  peter
% %% Updated to use new eqaution.m
% %%
% %% Revision 1.2  1996/08/30 18:35:43  peter
% %% New name argument added.
% %%
% %% Revision 1.1  1996/08/30 16:38:25  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
    outnumber = bond_number(1);
    if f_1 == 1 			% Flow out
      outcause = -1;
    else                                % Effort out
      outcause = 1;
    end;    
    incause = [-outcause; -1]; % Flow input on port 2
    eqn =  equation(name,cr,args,outnumber,outcause,outport, ...
                               bond_number,incause,1:ports);
    fprintf(eqnfile, '%s',eqn);

  else % Modulation is output
    outport = 2;
    outcause = -1;
    outnumber = bond_number(2);
    innumber = bond_number(1)*[1;1];    
    incause = [1; -1]; % Effort and flow on port 1
    inports = [1; 1];
    eqn =  equation(name,cr,args,outnumber,outcause,outport, ...
                               innumber,incause,inports);
    fprintf(eqnfile, '%s',eqn);
  end;
end;

  % Effort on port 2 is always zero
  fprintf(eqnfile, '%s := 0;\n', ...







|










|







73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
    outnumber = bond_number(1);
    if f_1 == 1 			% Flow out
      outcause = -1;
    else                                % Effort out
      outcause = 1;
    end;    
    incause = [-outcause; -1]; % Flow input on port 2
    eqn =  equation("FMR",name,cr,args,outnumber,outcause,outport, ...
                               bond_number,incause,1:ports);
    fprintf(eqnfile, '%s',eqn);

  else % Modulation is output
    outport = 2;
    outcause = -1;
    outnumber = bond_number(2);
    innumber = bond_number(1)*[1;1];    
    incause = [1; -1]; % Effort and flow on port 1
    inports = [1; 1];
    eqn =  equation("FMR",name,cr,args,outnumber,outcause,outport, ...
                               innumber,incause,inports);
    fprintf(eqnfile, '%s',eqn);
  end;
end;

  % Effort on port 2 is always zero
  fprintf(eqnfile, '%s := 0;\n', ...

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