Overview
Comment: | Now do named ports as ordinary ports iff at top level. --- not yet complete, need to pass necesssary info though to this function |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
2be3eae02d7c546b327caed85c3cb853 |
User & Date: | gawthrop@users.sourceforge.net on 1998-04-11 19:07:16 |
Other Links: | branch diff | manifest | tags |
Context
1998-04-12
| ||
11:58:19 | Rename port components by changing name_r to [name_r check-in: c37b1923c1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
1998-04-11
| ||
19:07:16 |
Now do named ports as ordinary ports iff at top level. --- not yet complete, need to pass necesssary info though to this function check-in: 2be3eae02d user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
18:59:16 | at_top_level now global - passed to SS components check-in: 9275f53188 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/lib/comp/simple/SS_eqn.m from [3356f5589a] to [5110a0fa2a].
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 | function structure = SS_eqn(name,bond_number,bonds,direction,cr,args, ... structure,filenum); % Set up globals to count the component inputs and outputs. This relies on % the named SS (the ports) being in the correct order. Using globals here % avoids changing the common argument list for all _eqn files for something % which is only used for named SS components. global local_u_index global local_y_index % SS_eqn - equations for SS component % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%%% Model Transformation Tools %%%%% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Matlab function SS_eqn % structure = SS_eqn(name,bond_number,bonds,direction,cr,args, ... % structure,filenum); % Copyright (c) P.J. Gawthrop, 1996. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.14 1997/12/16 18:25:19 peterg % %% Added unknown_input attribure to flow -- effort still needs doing % %% % %% Revision 1.13 1997/09/18 13:15:15 peterg % %% Fixed incorrect error message flagging inappropriate flow outputs % %% -- used to give the effort rather than the flow in the error message. % %% | > > > > | 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 | function structure = SS_eqn(name,bond_number,bonds,direction,cr,args, ... structure,filenum); % Set up globals to count the component inputs and outputs. This relies on % the named SS (the ports) being in the correct order. Using globals here % avoids changing the common argument list for all _eqn files for something % which is only used for named SS components. global local_u_index global local_y_index global at_top_level % SS_eqn - equations for SS component % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%%% Model Transformation Tools %%%%% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Matlab function SS_eqn % structure = SS_eqn(name,bond_number,bonds,direction,cr,args, ... % structure,filenum); % Copyright (c) P.J. Gawthrop, 1996. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.15 1997/12/16 19:16:07 peterg % %% Added unknown input to the effort part. % %% % %% Revision 1.14 1997/12/16 18:25:19 peterg % %% Added unknown_input attribure to flow -- effort still needs doing % %% % %% Revision 1.13 1997/09/18 13:15:15 peterg % %% Fixed incorrect error message flagging inappropriate flow outputs % %% -- used to give the effort rather than the flow in the error message. % %% |
︙ | ︙ | |||
100 101 102 103 104 105 106 | inputs = structure(3); outputs = structure(4); zero_outputs = structure(5); unknown_inputs = structure(6); | | | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | inputs = structure(3); outputs = structure(4); zero_outputs = structure(5); unknown_inputs = structure(6); if strcmp(effort_attribute, 'MTT_port')&&~at_top_level % It's a named port % Note: we don't have numbered ports now, so the correct indices are deduced % by incrementing the two globals: local_u_index and local_y_index % $$$ % Convert string to number % $$$ % port_number = abs(flow_attribute)-abs('0'); % $$$ % port_number = str2num(flow_attribute); |
︙ | ︙ |