Page 77 - ExtendSim User Guide
P. 77

State/Action models
With state/action modeling a system is modeled as a collection of discrete states. Sometimes known as a state chart, a state/action model represents a system that responds to an event by transitioning to another state. The model is composed of a series of states where each state depends on a previous state. A state has an associated action and an event that will cause that state to change to another. The transition from one state to the next is not sequential; each state can lead to any other state.
There are rules that govern the communication and transition between the states:
• All states accept events.
• Oneormorestatesmaycreateaneventasaresultofatransitionbyanotherstateorgroupof states.
• Agroupofstatescanbesettotransitionconditionally,forinstancetoonlychangeifanother state or group of states achieve a specific stage. These are known as guard conditions.
State/action models are independent of any of the three modeling methodologies (continuous, discrete event, or discrete rate.) They are useful for specification and verification in many areas, from computer programs to business processes.
In ExtendSim, the most common ways of creating state/action models are:
• Define one or more discrete event items as objects with behavior that is determined by their states. The information about each state and its next state is stored in a Lookup Table block (Value library) or an ExtendSim database table. This uses ExtendSim’s internal event queue and scheduling capabilities to signal and manage events for the item/objects within the sys- tem. This method can only be used with discrete event models and is illustrated in the State Action model, described later in this section.
• Store each state, action, event, and next state for the system in rows in an ExtendSim data- base table. This maps the states for the entire model into one block and works with any type of model. This method can be used with continuous, discrete event, and discrete rate models and is shown in the Markov Chain Weather model, described later in this section.
• Createnewblocksthatstoretheircurrentstateinastaticvariableandsendmessagestoother blocks at appropriate state change events. To do this, use ExtendSim functions and its simu- lation modeling environment to create a custom block. For more information about creating new blocks, see the Developer Reference.
State Action model
In the State Action model, items are created with attributes that determine the item’s state. The items are then routed to one of three operations depending on their state. After processing, the item’s state is changed based on entries in a Lookup Table block (Value library). The item con-
Simulation Concepts 51
Other modeling approaches

   75   76   77   78   79