Action charts

AnyLogic has graphical constructs for defining the dynamics of active objects: events, statecharts, variables with equations, process workflow, etc. However, in any more or less serious model in addition to that you need to be able to define the logic of decisions and actions that are made and taken upon occurrence of events. In AnyLogic Java is used for that purpose: these are Java code fragments and Java expressions that you write in Action fields of events and transitions, in extension points of Process Modeling Library objects such as On enter and On exit, in dynamic properties of presentation shapes. Some modelers however may be not comfortable with writing Java code and, what is more important, code is not easy to explain to clients and colleagues.

Since AnyLogic 6.2 we started introducing Action Charts – a simple and commonly accepted language that makes your action/decision logic visual, easy to communicate to other people and easier to develop at the same time. Action Charts are composed of nested elements, each corresponding to a Java statement: decision ("if" statement), several kinds of loops, local variable declaration, code section, etc. An action chart is straightforwardly mapped to a Java method and therefore is equally efficient. You can choose colors and labels of the action chart boxes to further improve its expressiveness.