Skip to content

Commit 923399e

Browse files
committed
update state tracking documentation
1 parent c3d376e commit 923399e

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

docs/Guides/state_trackers.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,9 @@ From this we can obtain the proportion of time the system spend in each state::
5050

5151
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.
5252

53+
If a warm up and cool down time is required when calculating the state probabilities, we can put in an observation period. For example, if we with to find the proportion of time the system spend in each state, between dates :code:`50` and :code:`200`, then we can use the following::
54+
55+
>>> Q.statetracker.state_probabilities(observation_period=(50, 200)) # doctest:+SKIP
56+
57+
Note that different trackers represent different states in different ways, see :ref:`refs-statetrackers` for a list of implemented trackers.
5358

54-
Note that different trackers represent different states in different ways, see :ref:`refs-statetrackers` for a list of implemented trackers.

docs/Reference/state_trackers.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Currently Ciw has the following state trackers:
88

99
- :ref:`population`
1010
- :ref:`nodepop`
11+
- :ref:`nodepopsubset`
1112
- :ref:`nodeclssmatrix`
1213
- :ref:`naiveblock`
1314
- :ref:`matrixblock`
@@ -49,6 +50,24 @@ The Simulation object takes in the optional argument :code:`tracker` used as fol
4950
>>> Q = ciw.Simulation(N, tracker=ciw.trackers.NodePopulation()) # doctest:+SKIP
5051

5152

53+
.. _nodepopsubset:
54+
55+
--------------------------------
56+
The NodePopulationSubset Tracker
57+
--------------------------------
58+
59+
The NodePopulationSubset Tracker, similar to the NodePopulation Tracker, records the number of customers at each node. However this allows users to only track a subset of the nodes in the system.
60+
States take the form of list of numbers. An example of tracking a three node queueing network is shown below::
61+
62+
(2, 0, 5)
63+
64+
This denotes that there are two customers at the first observed node, no customers at the second observed node, and five customers at the third observed node.
65+
66+
The Simulation object takes in the optional argument :code:`tracker`, which takes an argument :code:`observed_nodes` a list of node numbers to observe, used as follows (observing the first, second, and fifth nodes)::
67+
68+
>>> Q = ciw.Simulation(N, tracker=ciw.trackers.NodePopulationSubset([0, 1, 4])) # doctest:+SKIP
69+
70+
5271
.. _nodeclssmatrix:
5372

5473
---------------------------

0 commit comments

Comments
 (0)