You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following states are expected if a MatrixBlocking Tracker is used: ((()), (0)), ((()), (1)), ((()), (2)), ((()), (3)), (((1)), (3)), (((1, 2)), (3)).
Notice that in this simple case, the NaiveBlocking and MatrixBlocking trackers correspond to the same states.
101
-
In other examples, where customers may get blocked in different orders and to different places, then the two trackers may track different system states.
51
+
Here the keys correspond to states recorded by the state tracker. Note in order for :code:`times_to_deadlock` to be meaningful, a state tracker must be used.
The system's state is the configuration of individuals around the system. It can be measured in a variety of ways - for example, a state can be the number of customers waiting at each node.
8
+
9
+
Ciw has the option to activate a state :code:`tracker` in order to track the state of the system as the simulation progresses through the simulation. This tracker has a number of uses: the system state's full history can be obtained, from which state probabilities can be found, and it has uses when investigating deadlock.
10
+
11
+
The default is the basic :code:`StateTracker` which does nothing.
12
+
A number of other state trackers can be implemented, which record the system's state in a number of ways. These objects inherit from the basic :code:`StateTracker` class, and so custom state trackers can also be implemented by doing this.
13
+
For a list and explanation of the state trackers that Ciw currently supports see :ref:`refs-statetrackers`.
14
+
15
+
16
+
Example: consider an M/M/1 queue. The :code:`SystemPopulation` tracker defines a state as the number of individuals in the system::
This shows that the system was in state :code:`0` from time 0.0 to 1.44291, was in state :code:`1` from time 1.44291 to 10.84369, went back to state :code:`0` from 10.84369 to time 15.87259, and so on.
45
+
46
+
From this we can obtain the proportion of time the system spend in each state::
So the system was in state :code:`0` (no individuals in the system) 55.4% of the time, in state :code:`1` (one individual in the system) 24.7% of the time, state :code:`2` (two individuals in the system) 13.1% of the time, and state :code:`3` (three individuals in the system) 6.8% of the time.
52
+
53
+
54
+
Note that different trackers represent different states in different ways, see :ref:`refs-statetrackers` for a list of implemented trackers.
0 commit comments