Library of hierarchical state machine components to model discrete event and reactive systems
Examples to demonstrate the usage of the components of the StateGraph library
Connectors and partial models
Components that will be provided by other libraries in the future
User's Guide of StateGraph Library
Alternative splitting of execution path (use component between two steps)
Initial step (= step that is active when simulation starts)
Initial step (= step that is active when simulation starts). Connector 'active' is true when the step is active
Parallel splitting of execution path (use component between two transitions)
Superclass of a subgraph, i.e., a composite step that has internally a StateGraph
Root of a StateGraph (has to be present on the highest level of a StateGraph)
Ordinary step (= step that is not active when simulation starts)
Ordinary step (= step that is not active when simulation starts). Connector 'active' is true when the step is active
Transition where the fire condition is set by a modification of variable condition
Transition where the fire condition is set by a Boolean input signal
Library StateGraph is a free Modelica package providing components to model discrete event and reactive systems in a convenient way. It is based on the JGraphChart method and takes advantage of Modelica features for the "action" language. JGraphChart is a further development of Grafcet to include elements of StateCharts that are not present in Grafcet/Sequential Function Charts. Therefore, the StateGraph library has a similar modeling power as StateCharts but avoids some deficiences of StateCharts.
For an introduction, have especially a look at:
- StateGraph.UsersGuide discusses the most important aspects how to use this library.
- StateGraph.Examples contains examples that demonstrate the usage of this library.
A typical model generated with this library is shown in the next figure where on the left hand side a two-tank system with a tank controller and on the right hand side the top-level part of the tank controller as a StateGraph is shown:
The unique feature of the StateGraph library with respect to JGraphCharts, Grafcet, Sequential Function Charts, and StateCharts, is Modelica's "single assignment rule" that requires that every variable is defined by exactly one equation. This leads to a different "action" definition as in these formalisms. The advantage is that the translator can either determine a useful evaluation sequence by equation sorting or reports an error if this is not possible, e.g., because a model would lead to a non-determinism or to a dead-lock. As a side effect, this leads also to simpler and more easier to understand models and global variables are no longer needed (whereas in JGraphCharts, Grafcet, Sequential Function Charts and StateCharts global variables are nearly always needed).
The StateGraph library is currently available in a beta release. The available components will most likely not be changed for the release version. It is planned to improve the convenience of building models with the StateGraph library for the release version (this may require to introduce some additional annotations). It is planned to include the StateGraph library in the Modelica standard library. It is most useful to combine this libray with the Modelica libraries
- Modelica.Blocks.Logical that provides components available in PLCs (programmable logic controllers).
- UserInteraction that provides components to interactively communicate with models in a running simulation.
Copyright © 1998-2009, Modelica Association and DLR
This Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions and the accompanying disclaimer here.