Repeat

Description

This container executes the functors it contains a specified number of times. Each execution is called an iteration. While an iteration runs, the container makes the current iteration number available to its contents through the internal output port Step, counting from 1 up to Iterations. If Iterations is zero, the contained functors are not executed at all.

Inputs

Name	Type	Description
Iterations	Non Negative Integer Value Type	Number of iterations.

Optional Inputs

Name	Type	Default	Description
Sequence Input	None Type	None	Ensures that the functor connected to this port finishes executing before this container starts. See Sequence ports in the EGO Script documentation.

Outputs

Name	Type	Description
Sequence Output	None Type	Connect this port to another container's Sequence Input to make this container finish executing before that other container starts.

Internal Outputs

Name	Type	Description
Step	Non Negative Integer Value Type	Current iteration, always in the range from 1 to Iterations.

Group

Control

Notes

When there is no dependency between iterations, this container may run several of them at the same time instead of one after another.

A Step functor, a file functor (Load* / Save*), or a Select* functor placed directly inside this container reads the current iteration automatically through its own input, with no need to connect it to Step explicitly.

When Iterations is zero and a result produced by the contained functors is used outside the container, connect a matching junction (such as Map Junction or Value Junction) after the container, so a value still reaches the rest of the model from another source in that case.

Internal Name

Repeat