Creating a Feedback Loop Solver
Creating a Feedback Loop Solver in COPs In Copernicus context, we can create a "solver" to iterate using a feedback loop.
To set up a solver in COPs, follow these steps:
- Create a Block Node:
Lay down a 'block' node, which will automatically create a Block Start and Block End node pair. These nodes define the start and end points of our feedback loop.
- Add an Invoke Node:
The 'invoke' node is used to control the block. It will repeatedly execute the block of nodes defined between the Block Start and Block End nodes, allowing for iterative processing.
- Specify Input and Output:
You need to manually specify the input and output connections for the Block Start and Block End nodes. Ensure that these connections are consistent and correctly set up to allow data to flow through the loop. Set Inputs and Outputs on the Invoke Node:
Select the Invoke node and click "Set inputs and outputs from selected block." This action will automatically create corresponding input and output connections on the Invoke node that match those on the Block Start and Block End nodes. These connections must match for the feedback loop to function correctly. Adjust Iterations: The number of iterations for the feedback loop can be controlled in the Invoke node settings. This allows you to specify how many times the block should be executed. By default is set to 1, you can set it to $F to behave similarly to a sop solver.
By following these steps, you can create a feedback loop in the COP context, enabling iterative processing and solving.
When creating solvers that utilise 2D vector field, you may be interested in some way of visualising them. Check out this node here