Overview
Comment:Now used equation.m to write the equations.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 097b219f21d5a670f7ab92529aec1e2bbe083c4bcbc0f6fda278453326707274
User & Date: gawthrop@users.sourceforge.net on 1996-09-10 10:41:37
Other Links: branch diff | manifest | tags
Context
1996-09-10
11:11:11
Initial revision check-in: 9d350271b5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:41:37
Now used equation.m to write the equations. check-in: 097b219f21 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:10:41
Now uses eqaution.m to format the equation. check-in: 6545991175 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/comp/simple/TF_eqn.m from [779108ce5c] to [0f6f6099bc].

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













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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
-
+







+
+
+



-
+



+
+
+
+
-
+
+
+
+
+
+

+

+
+
-
-
+
+
+
+
+

-
+
+
+
+


+
+
+
+

+
+
-
-
+
+
+
+
+

-
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
function  structure = TF_eqn(bond_number,bonds,direction,cr,args, ...
function  structure = TF_eqn(name,bond_number,bonds,direction,cr,args, ...
                            structure,eqnfile);

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  1996/08/19 09:05:04  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

% Check that there are exactly two bonds.
if check_bonds(bonds,2,'TF')==0
  return
end
% Needs port labels etc...

% 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
outcause = 1;
incause = 1;
if bonds(1,1)==1
  oneeqn(bond_number(2),1,bond_number(1),1,cr,args,eqnfile);
if e_1==1
  outbond = bond_number(2);
  inbond =  bond_number(1);
  outport = 2;
  inport = 1;
else
  oneeqn(bond_number(1),1,bond_number(2),1,cr,args,eqnfile);
  outbond = bond_number(1);
  inbond =  bond_number(2);
  outport = 1;
  inport = 2;
end;

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

% Flow
outcause = -1;
incause = -1;
if bonds(1,2)==-1
  oneeqn(bond_number(2),-1,bond_number(1),-1,cr,args,eqnfile);
if f_1==-1
  outbond = bond_number(2);
  inbond =  bond_number(1);
  outport = 2;
  inport = 1;
else
  oneeqn(bond_number(1),-1,bond_number(2),-1,cr,args,eqnfile);
  outbond = bond_number(1);
  inbond =  bond_number(2);
  outport = 1;
  inport = 2;
end;

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









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