When you draw statechart elements in the graphical editor, AnyLogic analyzes the resulting structure and automatically constructs statecharts. If you make mistakes while defining statecharts, they must be corrected. For instance, the standalone incomplete fragments (just a state, just a transition, etc.) cause errors because there is no way to distinguish what particular statechart they belong to.
In the Elements view, erroneously defined statechart elements are placed into the Statecharts tree branch under
Unresolved:
Follow the rules below when drawing statecharts.
- Each statechart must have exactly one statechart entry point.
- States can contain other states, but not intersect each other. If the state you are drawing intersects an existing one, the new state will not be drawn.
- Each composite state must have exactly one initial state pointer.
- Each statechart element (state, transition, etc.) should belong to some statechart, i.e. a transition should connect some states or pseudo states of the statechart, and a state should be connected with a statechart. If one end of a transition is left hanging, not connected to a state in any way, an error is thrown.
-
How can we improve this article?
-