For

The For component iterates through the subcomponents depending on the index value specified, like a Fortran Do loop.
You can set the following properties for the For component:
start
Sets the starting value of the index.
end
Sets the ending value of the index.
step
Sets the update width for index updates.
About Referencing Index Values
To use the current index value from a subcomponent during a loop, it can be referenced in the $WHEEL_CURRENT_INDEX environment variable.
number of instances to keep
Specifies the maximum number of directories to keep for each index. If unspecified, all directories are saved.
For details, see For Component Run-time Behavior below.
skip copy
Sets the list of files, directories, or glob patterns to exclude from the copy operation between loop iterations.
Files and directories matching the specified patterns are not copied when WHEEL creates a new iteration directory from the previous one. This is useful for excluding large output files or temporary files generated during previous iterations.
Enter the desired pattern in the input field and click the + button to add it.
Glob patterns (e.g., *.log, output_*, results/) are supported.
For Component Run-time Behavior
When the For component runs for the first time, the component directory is copied with the index value appended. When all the subcomponents in the copied directory have finished executing, a new index value is calculated and further directories are copied based on that value.
This process is repeated sequentially until the index value exceeds the end value. When the end value is exceeded, the directory is copied to the original directory, and processing of the For component ends. Note that even if you set a negative value for step, if the start value > end value, the operation will be successful. In this case, execution ends when the index falls below the end value.
For example, a for component with start=1, end=3, step=2 is processed as follows:
- Copy
fordirectory asfor_1directory - Sequentially execute components in the
for_1directory - index Calculation 1 +2 = 3 => equal to the end value of 3, run the next loop
- Copy
for_1directory asfor_3directory - Sequentially execute components in the
for_3directory - index Calculation 3 +2 = 5 => Since the end value of 3 has been exceeded, the ending process is performed.
- Copy
for_3directory asfordirectory
If the number of instance to keep value is set to nonzero, delete the old directories (such as for_1 and for_3) that exceed the number set after the 4, 7 operation.
When the instance directory name collides
If the directory name with the index value appended (e.g. for_1) would collide with an already-existing component, file, or directory of that same name, WHEEL automatically escalates the separator used between the name and the index.
For example, if a directory or component already named for_1 exists, the For component uses for__1 (two underscores) instead. If that also collides, it continues to for___1 (three underscores), and so on until the collision is resolved.
Once decided, the same separator is used consistently for the rest of that loop’s run (and reused if the run is resumed).