Overview
Comment:SS_seqn Port SS now has forced "external,external" attribute
Sensor_seqn has temporary fix which leads to redundant equations
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 06129d0cd0fdd5bc0f3d52b4b83ec52c3718dcb48c101ce09ddab6b56bded179
User & Date: gawthrop@users.sourceforge.net on 2003-03-25 10:24:06
Other Links: branch diff | manifest | tags
Context
2003-03-25
10:28:04
Explicitly passes is_port to equation genration - only relevant to SS. check-in: 2372f2422a user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:24:06
SS_seqn Port SS now has forced "external,external" attribute
Sensor_seqn has temporary fix which leads to redundant equations
check-in: 06129d0cd0 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2003-03-24
15:10:14
Removed erroneous "gino" check-in: 0659348b7c user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/comp/simple/SS_seqn.m from [557276af06] to [1a54bd1685].

1

2
3
4
5
6
7
8
function [eqn,insigs,innames] = SS_seqn (Name, name, cr, arg, outsig, insigs,innames)


  ## usage:  [eqn,inbonds] = SS_seqn (Name, cr, arg, outbond, inbonds)
  ##
  ## 
  ## Multi port SS's ??

  delim = "__";
|
>







1
2
3
4
5
6
7
8
9
function [eqn,insigs,innames] = SS_seqn (Name, name, cr, arg, outsig, \
					 insigs,innames,is_port)

  ## usage:  [eqn,inbonds] = SS_seqn (Name, cr, arg, outbond, inbonds)
  ##
  ## 
  ## Multi port SS's ??

  delim = "__";
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    mtt_error(sprintf("SS should have 2 args not %i", N_a));
  end;

  effort_attribute = deblank(attrib_name(1,:));
  flow_attribute   = deblank(attrib_name(2,:));

  ## Default attributes
  if strcmp(effort_attribute,"")
    effort_attribute = "external";
  end;
  
  if strcmp(flow_attribute,"")
    flow_attribute = "external";
  end;


  if mtt_is_external("SS",outsig,insigs) # Source
    if outsig(2)==1		# effort output.
      attribute = effort_attribute;







|



|







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
    mtt_error(sprintf("SS should have 2 args not %i", N_a));
  end;

  effort_attribute = deblank(attrib_name(1,:));
  flow_attribute   = deblank(attrib_name(2,:));

  ## Default attributes
  if strcmp(effort_attribute,"")||is_port
    effort_attribute = "external";
  end;
  
  if strcmp(flow_attribute,"")||is_port
    flow_attribute = "external";
  end;


  if mtt_is_external("SS",outsig,insigs) # Source
    if outsig(2)==1		# effort output.
      attribute = effort_attribute;
50
51
52
53
54
55
56
57
58

   ## Create the equation
   LHS = Sensor_seqn (attribute,full_name);
   RHS = varname(Name, insigs(1,1), insigs(1,2));
   eqn = sprintf("%s := %s;", LHS, RHS);
 endif
 

endfunction







<

51
52
53
54
55
56
57

58

   ## Create the equation
   LHS = Sensor_seqn (attribute,full_name);
   RHS = varname(Name, insigs(1,1), insigs(1,2));
   eqn = sprintf("%s := %s;", LHS, RHS);
 endif
 

endfunction

Modified mttroot/mtt/lib/comp/simple/Sensor_seqn.m from [2a1d2646ad] to [4a6bbeb765].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function LHS = Sensor_seqn (attribute,name)

  ## usage:  LHS = Sensor_seqn (attribute,name)
  ##
  ## Write the LHS of a sensor equation
  

  if strcmp(attribute,"external")
    LHS = sprintf("MTTy_%s", name);  
  elseif strcmp(attribute,"internal")
    LHS = sprintf("%% NOT USED MTT_y_%s", name); 
  else
    error(sprintf("attribute ""%s"" not appropriate for a \
    source"), attribute);
  endif
endfunction










|





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function LHS = Sensor_seqn (attribute,name)

  ## usage:  LHS = Sensor_seqn (attribute,name)
  ##
  ## Write the LHS of a sensor equation
  

  if strcmp(attribute,"external")
    LHS = sprintf("MTTy_%s", name);  
  elseif strcmp(attribute,"internal")
    LHS = sprintf("MTTy_%s", name); 
  else
    error(sprintf("attribute ""%s"" not appropriate for a \
    source"), attribute);
  endif
endfunction


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