Statechart diagrams are one of the five kinds of diagrams UML uses to model dynamic aspects of systems. They are used to model different states of an object during its lifetime; from the time it is created until it is destroyed. A statechart diagram shows the flow of control from one state to another. Figure 6-12 shows an example of a statechart diagram.
A statechart diagram starts with an initial state represented by a filled bullet and it ends with an end state as shown in Figure 6-12. The statechart diagram represents the different phenological phases (or states) of object Plant during the simulation process, described in detail by [PBJ99],
The plant's phenological phase is important as it determines the calculation of plant parameters such as deltaLeafNumber calculated by Equation 1.
temperatureStress x maxRateOfLeafAppearence when phenologicalPhase = "vegetative" and 0
when phenologicalPhase = "reproductive"
The diagram shows that at beginning of the simulation (provided that the current simulation date is greater than planting date), the plant is in the phenological phase of vegetation. During that phase, it will receive messages calculateRate and integrate and will remain in the same phase (or state) as long as the event number of leaves > maximum number of leaves does not occur. A state is a condition or situation in the life of an object during which it satisfies some condition, performs some activity, or waits for some event [BRJ99].
When the event number of leaves > maximum number of leaves occurs, then object Plant will change phenological phase to reproductive. It is important to note that message integrate affects parameters such as number of leaves that is used to trigger the event that will send the object plant to the phenological phase of reproductive. An event can trigger a state transition. A transition is a relationship between two states indicating that an object in the first state will perform certain actions and enter the second state when a specified event occurs and specified conditions are satisfied [BRJ99].
During the phenological phase of reproductive, the object plant will receive messages calculateRate and integrate, and will remain in this phase as long as the event cumulative thermal time > reproductive thermal time does not occur. When this event occurs, plant will move to the phase of maturity and this signals the end of the simulation.
Was this article helpful?