In this exercise you will create a multiple paddock simulation.
1. Create a new simulation from the file "Rotation Sample.apsim".
2. Copy the manager folder from the paddock node to the root of the simulation
3. Delete the original manager folder from the paddock node.
4. Copy the "Phases" outputfile component in the paddock node to the root if the simulation, and delete the original in the paddock.
5. Drag and drop the paddock component to the root of the simulation. There will be two paddocks now. Rename each paddock to something unique.
6. Set the area property of each paddock.
7. Open the Rotation Manager component in the Manager folder, check the tickbox for each paddock, and set the initial state of each paddock to something unique.
8. Open the "Variables" node of the Phases outputfile. Delete the "currentState" variable. Add a new variable "currentPaddock", and another "paddockState as currentState".
9. Save the file and press Run.
10. If R is installed on your system, the "Rugplot Graph" component will display a coloured sequence diagram of the simulation. There should be two crops being harvested.
Event and Variable scope
Multipaddock simulations are no different to single paddock simulations, though several conventions change with the new context. In a single paddock simulation, events such as "sow" remain restricted to that paddock, and do not find their way to other paddocks in the system. Similarly, requests for variables (eg yield, soil water) are limited to that paddock, and also the parent. So, a manager component asking for plant status will get the status of all crops in its same paddock. If it asks for rain, no components in the paddock will respond, but the met component at the root of the simulation will.
Manager and outputfile components in the top level (root) of a simulation need to specify which paddock theses variables and events are sent to.