Loading…
Designing an object-oriented structure for crop models
Object-oriented design (OOD) and programming (OOP) offer many advantages for developing modular crop models. The model structure is well-defined, reuse of code is facilitated through inheritance, and data can be hidden (encapsulated) inside objects that correspond to physical components of the real...
Saved in:
Published in: | Ecological modelling 1997, Vol.94 (1), p.33-44 |
---|---|
Main Authors: | , |
Format: | Article |
Language: | English |
Subjects: | |
Citations: | Items that this one cites Items that cite this one |
Online Access: | Get full text |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Summary: | Object-oriented design (OOD) and programming (OOP) offer many advantages for developing modular crop models. The model structure is well-defined, reuse of code is facilitated through inheritance, and data can be hidden (encapsulated) inside objects that correspond to physical components of the real system, e.g. roots, stems, leaves, or soil layers. However, OOD is best suited to describing the relationship between freely interacting objects, and it has so far been used almost exclusively for modeling simple, discrete and sequential actions. Plant models are not like the automatic teller machine software that is often used in examples of OOD. Plant organs, i.e. objects on the plant, do not wait passively for input from other organs, but they all grow in response to their environment and interact with each other simultaneously and continuously. Also, our ignorance of the processes controlling plant growth forces us to use devices like the limiting factor model to handle these interactions. Many plant models therefore calculate potential growth, limitations imposed by various factors, and then actual growth. In short, there are procedural elements in plant models that do not easily fit an OOD. However, some OOP languages like C + + allow mixed designs to be implemented, so we have developed a mixed, but mostly object-oriented structure that (1) contains the components familiar in extant procedural designs; (2) can be used for modeling at several levels of complexity; and (3) can be used to model any plant. The mixed procedural/object-oriented design has been implemented in C + + as a shell using dummy algorithms, and its operation verified. The problems and advantages are discussed. |
---|---|
ISSN: | 0304-3800 1872-7026 |
DOI: | 10.1016/S0304-3800(96)01926-6 |