Page 78 - ExtendSim User Guide
P. 78

52
Simulation Concepts
Other modeling approaches
tinues to be routed to various processes until it reaches state 4, at which point it leaves the sim- ulation.
State Action model
Initially, each item has a CurrentState attribute with a value of 1. The Lookup Table block causes each item with CurrentState 1 to be changed to CurrentState 3 after processing, then to CurrentState 2, and finally to CurrentState 4. The operations are represented by Workstation blocks, which can hold and process the items. After each operation, the item is examined and its state is transitioned accordingly.
Running the simulation with animation on shows the items changing from state 1 (green), to state 3 (red), then state 2 (yellow), and finally state 4 (blue).
☞ The State Action model is located in the folder \Examples\Discrete Event\Routing, It is not available with ExtendSim CP.
Markov Chain Weather model
A Markov chain represents a transition from one state to another as defined by a table of prob- abilities. The Markov Chain Weather model simulates the weather based on a Markov chain. The states are the weather – sunny, cloudy, rainy, and so forth; they are stored in an ExtendSim database named “Weather”. The model runs for 365 days. Each day there is a probability of transitioning from one weather state to the next. For example, if today is sunny, the next day could be sunny (50%), partly cloudy (30%), cloudy (10%), light rain (5%), or rainy (5%). As the model runs, the states move through a probability table, changing the weather for each day.
Most of the calculation in this model is done by a single Equation block (Value library) inside the hierarchical “Weather Forecast” block. In the equation, a random input and the previous state (the output of the equation) are used to lookup a probability for the next day’s weather in the Weather database. The number and percent of days at each weather state is also calculated and recorded in the database. Additionally, if the model is run with animation on, the current
Tutorial


































































































   76   77   78   79   80