Comment on page
Subsystem Loop
s
The
Subsystem Loop
node in AugeLab Studio is a subsystem node used to loop over each element of a listed value. This node is useful for iterating through sequences, such as lists or tuples, and performing operations on each element individually. The node allows you to connect multiple sequences with the same length, and it will iterate over them simultaneously.The
Subsystem Loop
node is a special type of subsystem that contains a child scenario. It takes multiple input sequences, iterates over their elements, and performs operations on each element using the connected subsystem nodes. The outputs of the subsystem nodes are collected and returned as lists.
The
Subsystem Loop
node does not have any visible input sockets in the node editor. Instead, it accepts sequences (e.g., lists or tuples) connected to its input sockets, which will be iterated over during evaluation.The
Subsystem Loop
node does not have any visible output sockets in the node editor. Instead, it returns the results from the connected subsystem nodes in lists.- 1.Drag and drop the
Subsystem Loop
node from the node library onto the canvas in AugeLab Studio. - 2.Connect the sequences you want to iterate over to the input sockets of the node. Make sure that all connected sequences have the same length.
- 3.Create the subsystem inside the
Node Subsystem Loop
node by adding nodes that will operate on each element of the connected sequences. - 4.The subsystem nodes will be executed for each element in the sequences.
- 5.The results from each iteration will be collected and returned as lists.
Note: Make sure that the sequences connected to the input sockets have the same length. If the sequences have different lengths, the iteration will stop at the shortest sequence.
Let's walk through an example to illustrate how the Node Subsystem Loop node works.
- 1.Drag and drop the
Subsystem Loop
node onto the canvas. - 2.Connect two sequences (lists) with the same length to the
Node Subsystem Loop
node's input sockets. For example, connect[1, 2, 3]
to the first input socket and['a', 'b', 'c']
to the second input socket. - 3.Create a subsystem inside the
Subsystem Loop
node by adding nodes that operate on the elements of the connected sequences. For example, add aAdd
node that adds the two input elements together. - 4.Create
Subsystem In
andSubsystem Out
nodes to allow connection through upper scenario. - 5.The
Add
node will be executed three times (for each element in the sequences). The results will be collected and returned as lists. In this case, the output will be[1, 2, 3]
for the first iteration and['a', 'b', 'c']
for the second iteration.
- The
Subsystem Loop
node is particularly useful when you need to perform the same operations on multiple elements within a sequence. - If the connected sequences have different lengths, the iteration will stop at the shortest sequence.
- It is essential to ensure that the subsystem inside the
Subsystem Loop
node is properly configured to process the elements of the connected sequences correctly.
That concludes the documentation for the
Subsystem Loop
node in AugeLab Studio. This node provides a powerful way to loop over each element of a listed value and perform operations efficiently on multiple elements simultaneously.