Statechart Declaration Rules   

When you draw statechart elements in the graphical editor, AnyLogic analyzes the resulting structure and automatically constructs statecharts.  But you may make some mistakes while defining statecharts that must be corrected. For instance, the standalone incomplete fragments (just state, just transition, etc.) cause errors because there is no way to distinguish what particular statechart they belong to. 

In the Projects view erroneously defined statechart elements are placed into the  Unresolved subbranch of the  Statecharts tree branch:


Please follow these rules when drawing statecharts:
  1. Each statechart should have exactly one statechart entry point.
  2. Each composite state should have exactly one initial state pointer.
  3. Each statechart element (state, transition, etc.) should belong to some statechart, i.e. transition should connect some states or pseudo states of the statechart, state should be connected with a statechart. The situations when one end of the transition is “hanging” in the air or state is not connected to is an error.