Overview
Comment:Now uses eqaution.m to format the equation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 6545991175b10673990a96f4132a12348741cad56661a43c80c41a26c77f414d
User & Date: gawthrop@users.sourceforge.net on 1996-09-10 10:10:41
Other Links: branch diff | manifest | tags
Context
1996-09-10
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
1996-08-30
20:03:45
Removed dependencies from vc check-in: d0499434e0 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/comp/simple/AE_eqn.m from [329cb92f23] to [2991c6f3bd].

1
2
3
4
5
6
7
8
9




10
11
12
13
14
15
16
function  structure = AE_eqn(name,bond_number,bonds,direction,cr,args, ...
                            structure,eqnfile);
% AE_eqn. Equation generation for effort amplifier.

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




% %% Revision 1.2  1996/08/30 13:23:11  peter
% %% Added bond number check
% %%
% %% Revision 1.1  1996/08/22 13:12:34  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%









>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function  structure = AE_eqn(name,bond_number,bonds,direction,cr,args, ...
                            structure,eqnfile);
% AE_eqn. Equation generation for effort amplifier.

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.3  1996/08/30 19:03:10  peter
% %% Added argument check.
% %% Added extra name argument.
% %%
% %% Revision 1.2  1996/08/30 13:23:11  peter
% %% Added bond number check
% %%
% %% Revision 1.1  1996/08/22 13:12:34  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
32
33
34
35
36
37
38
39
40
41
42
43
44


45
46
47


48
49
50



51
52


53
54
55


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

if e_2 == -1 				% Unicausal: e_2 := e_1
  LHS_number = bond_number(2);
  RHS_number = bond_number(1);


else 	                                % Bicausal: e_1 := e_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);




 












|
|


|
|
>
>

|
|
>
>


|
>
>
>

|
>
>



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


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

if e_2 == -1 				% Unicausal: e_2 := e_1
  outbond = bond_number(2);
  inbond = bond_number(1);
  outport = 2;
  inport = 1;
else 	                                % Bicausal: e_1 := e_2      
  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 ]