Overview
Comment:Initial revision
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: cddf7c01dc95bc8cad3c8f241ed16b25be53f9bcd8f671c7dc095d19f01165c8
User & Date: gawthrop@users.sourceforge.net on 1996-08-30 18:38:57
Other Links: branch diff | manifest | tags
Context
1996-08-30
18:45:32
Removed header stuff. check-in: b0ecb47dad user: gawthrop@users.sourceforge.net tags: origin/master, trunk
18:38:57
Initial revision check-in: cddf7c01dc user: gawthrop@users.sourceforge.net tags: origin/master, trunk
18:37:17
inor changes. check-in: 36bcfe473f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/lib/comp/simple/AF_eqn.m version [49bdac978b].





























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
function  structure = AF_eqn(name,bond_number,bonds,direction,cr,args, ...
    structure,eqnfile);
% AF_eqn - equations for flow amplifier
% 
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%     %%%%% Model Transformation Tools %%%%%
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% Matlab function  AF_eqn
% structure = AF_eqn(bond_number,bonds,direction,cr,args, ...
%    structure,eqnfile);

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


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

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

% Check that there are exactly two bonds.
if check_bonds(bonds,2,'AF')==0
  return
end

% There are 2 ports; extract the information
e_1 = bonds(1,1);
f_1 = bonds(1,2);
e_2 = bonds(2,1);
f_2 = bonds(2,2);

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

if f_2 == 1 				% Unicausal: f_2 := f_1
  LHS_number = bond_number(2);
  RHS_number = bond_number(1);
else 	                                % Bicausal: f_1 := f_2      
  LHS_number = bond_number(1);
  RHS_number = bond_number(2);
end

oneeqn(name,LHS_number,LHS_cause,RHS_number,RHS_cause,cr,args,eqnfile);








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