Mux Tuple

Description

Initializes a loop variable and feeds it back with the tuple produced by the previous step, letting a tuple carry over from one iteration of a loop to the next. At the start of the first iteration, it reads its initial tuple 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

Name Type Description
Initial Tuple Type Initial tuple, used on the first iteration.
Feedback Tuple Type Tuple generated by the previous model step. This port must be connected to a functor placed later in the same loop, which supplies the tuple produced by that iteration.

Optional Inputs

None.

Outputs

Name Type Description
Tuple Tuple Type Tuple for the current iteration: Initial on the first iteration, and the tuple received through Feedback on every iteration after that.

Group

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.

Feedback should be connected to a functor evaluated later in the same iteration, so that it can supply the tuple produced by that step. Setting it to a fixed constant reports a warning, since a constant defeats the purpose of feeding a tuple back from the previous step.

The only containers this functor can be placed inside are those responsible for creating loops.

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.

Internal Name

MuxTuple