Multiple Paddocks
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 Rotation Sample simulation and delete the original manager folder from the paddock node.
3. Copy the ‘Phases’ outputfile component from the paddock node to the Rotation Sample simulation, and delete the original in the paddock.
4. Drag and drop the paddock component to the same simulation node as before. There will be two paddocks now. Rename each paddock to something unique, and check that there is a value in the area property of each paddock.
5. Check that the two paddocks, the Manager folder and the Phases node are all under the Rotation Sample node, and at the same level.
6. 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.
7. Open the “Variables” node of the Phases outputfile. Delete the “currentState” variable. Add a new variable “currentPaddock”, and another “paddockState as currentState”.
8. Save the file and press Run.
9. 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.