Overview
Comment:Revised for new data structures
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: ec0a59e6a57a528986911e81795a54dbed1e894773001313b57a1c3882c61838
User & Date: gawthrop@users.sourceforge.net on 1998-08-24 09:31:12
Other Links: branch diff | manifest | tags
Context
1998-08-24
10:16:32
Coverted to new structure - still needs status sorting. check-in: 31a0093978 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:31:12
Revised for new data structures check-in: ec0a59e6a5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
07:35:03
About to go to new abg format. check-in: 6b1935a6ad user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/getdynamic.m from [905e653ece] to [96484d5f7e].

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



function [index,prefered] = getdynamic(status,system_type);
% Get the index of a dynamic components which is not set.

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



% %% Revision 1.1  1996/08/16 12:50:41  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


index=0; prefered=0;
n_components = length(status);

for i = 1:n_components
  if status(i)==-1 % Undercausal
    eval([ '[comp_type,name,cr,arg] = ', system_type, '_cmp(i);' ]); 
    if strcmp(comp_type,'C')
      index=i;
      prefered=-1;
      break;
    end;
    if strcmp(comp_type,'I')
      index=i;
      prefered=1;
      break;
    end;
  end;




end;



|
|

|
|
|
|
|
>
>
>
|
|
|
<
>

|
<
|
<
|
<
|
<
|
|
|
|
<
|
|
|
|
>
>
>
>
|
>
>
>
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 [name,prefered] = getdynamic(subsystems);
# Get the index of a dynamic components which is not set.

# ###############################################################
# ## Version control history
# ###############################################################
# ## $Id$
# ## $Log$
# ## Revision 1.2  1996/08/16 12:51:22  peter
# ## Removed debugging lines.
# ##
# ## Revision 1.1  1996/08/16 12:50:41  peter
# ## Initial revision
# ##

# ###############################################################

  prefered = 0;			# No prefered causality to start with

  for [subsystem,name] = subsystems

    if subsystem.status==-1 # Undercausal

      if strcmp(subsystem.type,'C')

      	prefered=-1;
      	break;
      endif;
      if strcmp(subsystem.type,'I')

      	prefered=1;
      	break;
      endif;
    endif;
  endfor;

  if prefered==0
    name = "";
  end;
  
endfunction


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