Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
mux_table [2013/08/23 22:17] admin [Notes] |
mux_table [2026/08/28 03:28] (current) hermann Sync from local documentation review |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Mux Table ====== | + | ====== Mux Table ====== |
| ===== Description ===== | ===== Description ===== | ||
| - | This functor makes a table dynamic, feeding it back with a table output from a model step. In the beginning of the first iteration, it reads the table input from the initial port. | + | Initializes a loop variable and feeds it back with the table produced by the previous step, letting a table carry over from one iteration of a loop to the next. At the start of the first iteration, it reads its initial table 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 | [[Table Type|Table]] | The initial table. | | + | | Initial | [[Table Type]] | Initial table, used on the first iteration. | |
| - | | Feedback | [[Table Type|Table]] | Table generated from model step. | | + | | Feedback | [[Table Type]] | Table generated by the previous model step. This port must be connected to a functor placed later in the same loop, which supplies the table produced by that iteration. | |
| ===== Optional Inputs ===== | ===== Optional Inputs ===== | ||
| + | |||
| + | None. | ||
| ===== Outputs ===== | ===== Outputs ===== | ||
| - | ^ Name ^ Type ^ Description ^ | + | ^ Name ^ Type ^ Description ^ |
| - | | Table | [[Table Type|Table]] | The output table. | | + | | Table | [[Table Type]] | Table for the current iteration: Initial on the first iteration, and the table 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 a result of the model feedback. | + | Feedback should be connected to a functor evaluated later in the same iteration, so that it can supply the table produced by that step. Setting it to a fixed constant reports a warning, since a constant defeats the purpose of feeding a table back from the previous step. |
| - | <note important> | + | The connection made to the Feedback port is never treated as a dependency cycle: the model's dependency graph does not consider this functor dependent on whatever is connected to that port. |
| - | //Muxes must always be placed directly inside loop containers like [[Repeat]], [[For]], [[For Each Category]] etc.// | + | |
| - | </note> | + | |
| - | ===== Internal Name ===== | + | ===== Internal Name ===== |
| MuxTable | MuxTable | ||