The Plant Modelling Framework (PMF) is a software framework for creating models that represent the plant components of farm system models in the agricultural production system simulator (APSIM). It is the next step in the evolution of generic crop templates for APSIM, building on software and science lessons from past versions and capitalising on new software approaches. The PMF contains a top-level Plant class that provides an interface with the APSIM model environment and controls the other classes in the plant model. Other classes include mid-level Organ, Phenology, Structure and Arbitrator classes that represent specific elements or processes of the crop and sub-classes that the mid-level classes use to represent repeated data structures. It also contains low-level Function classes which represent generic mathematical, logical, procedural or reference code and provide values to the processes carried out by mid-level classes. A plant configuration file specifies which mid-level and Function classes are to be included and how they are to be arranged and parameterised to represent a particular crop model. The PMF has an integrated design environment to allow plant models to be created visually. The aims of the PMF are to maximise code reuse and allow flexibility in the structure of models. Four examples are included to demonstrate the flexibility of application of the PMF; 1. Slurp, a simple model of the water use of a static crop, 2. Oat, an annual grain crop model with detailed growth, development and resource use processes, 3. Lucerne, perennial forage model with detailed growth, development and resource use processes, 4. Wheat, another detailed annual crop model constructed using an alternative set of organ and process classes. These examples show the PMF can be used to develop models of different complexities and allows flexibility in the approach for implementing crop physiology concepts into model set up. The Plant Modelling Framework source code is freely available for non commercial use and can be viewed at http://apsrunet.apsim.info/websvn/listing.php?repname=apsim&path=/trunk/then clicking on the “Model” then “Plant2” folders. Note that the PMF (called Plant2 in internal documentation) does not stand alone and users will need to download the Agricultural Production Systems Simulator (http://www.apsim.info/Products/Downloads.aspx) to build and use PMF models. 
Plant Modelling Framework: Software for building and running crop models on the APSIM platform