Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mux_value [2013/08/23 22:17]
admin [Notes]
mux_value [2026/08/28 03:28] (current)
hermann Sync from local documentation review
Line 1: Line 1:
-====== Mux Value ====== ​+====== Mux Value ======
  
 ===== Description ===== ===== Description =====
  
-This functor initiates ​and feeds back a loop variable containing ​a value. ​In the beginning ​of the first iteration, it reads the input value from the initial port+Initializes a loop variable ​and feeds it back with the value produced by the previous step, letting ​a value carry over from one iteration of a loop to the nextAt the start of the first iteration, it reads its initial ​value from Initial. The use of this functor is central to building dynamic models whose variables are updated from one step to the next through feedback.
  
 ===== Inputs ===== ===== Inputs =====
  
-^ Name ^ Type ^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-| Initial ​ | [[Double ​Type|Double]]  | The initial ​value. ​ | +| Initial ​ | [[Real Value Type]] ​ | Initial ​value, used on the first iteration.  | 
-| Feedback ​ | [[Double ​Type|Double]]  | Value generated ​from model step.  |+| Feedback ​ | [[Real Value Type]] ​ | Value generated ​by the previous ​model step. This port must be connected to a functor placed later in the same loop, which supplies the value produced by that iteration.  |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
 +
 +None.
  
 ===== Outputs ===== ===== Outputs =====
  
-^ Name ^ Type ^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-| Value | [[Double ​Type|Double]]  | The output ​value. ​ |+| Value  | [[Real Value Type]] ​ | Value for the current iteration: Initial on the first iteration, and the value received through Feedback on every iteration after that.  |
  
 ===== Group ===== ===== Group =====
Line 22: Line 24:
 [[Functor List#​Control | Control]] [[Functor List#​Control | Control]]
  
-===== Notes ===== +===== Notes ===== 
 + 
 +This functor must always be placed directly inside a loop container, such as [[Repeat]], [[For]], or [[For Each Category]]. Placing it anywhere else reports a warning.
  
-The use of this functor ​is critical for the development of dynamic models whose variables are dynamically updated as result ​of the model feedback.+Feedback should be connected to a functor ​evaluated later in the same iteration, so that it can supply the value produced by that step. Setting it to fixed constant reports a warning, since a constant defeats the purpose ​of feeding a value back from the previous step.
  
-<note important>​ +This functor was previously known as "​MuxDouble"​.
-//Muxes must always be placed directly inside loop containers like [[Repeat]], [[For]], [[For Each Category]] etc.// +
-</​note>​+
  
-===== Internal Name ===== +===== Internal Name =====
  
 MuxValue MuxValue