A design pattern in XL for implementing multiscale models, demonstrated with a fruit tree simulator

W. Kurth, Y. Ong
Integration of processes and structural developments at different scales in plant models requires additional implementation effort in comparison with single-scale models. Here we propose a method to organize and reduce time taken to implement these models with the example of a simple fruit tree model with architectural and biomechanical components. The example includes scales such as axes, growth units, internodes, as well as a simplified branch bending mechanism. Our approach uses the so-called “observer pattern” in the class of formalized practices in software engineering known as design patterns. It allows automatic triggering of inter-scale processes after registering the relationships and dependencies between scales during model initialization. Our technique is implemented as an extension to the programming language XL, which is based on Java and parallel graph rewriting, and is available on the software platform GroIMP. By first establishing an overall graph structure reflecting the scales which occur in the model, functions invoked by the registered dependencies, i.e. observers, adhere strictly to model design with reduced inter-function calls. Furthermore, objects from the different scales, which can also stand for aspects of the model, can be visualized separately.
Kurth, W. and Ong, Y. (2017). A design pattern in XL for implementing multiscale models, demonstrated with a fruit tree simulator. Acta Hortic. 1160, 35-42
DOI: 10.17660/ActaHortic.2017.1160.6
functional-structural plant model, multiscale model, scale dependencies, upscaling, downscaling, programming language, design pattern, XL, GroIMP

Acta Horticulturae