Skip to content

Commit 37159a8

Browse files
committed
Docs on overtime
1 parent 17aad86 commit 37159a8

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

docs/Guides/server_schedule.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,25 @@ Ciw defaults to non-pre-emptive schedules, and so the following code implies a n
6868

6969
Number_of_servers=[[[2, 10], [0, 30], [1, 100]]] # non-preemptive
7070

71+
72+
73+
Overtime
74+
--------
75+
76+
Non-preemptive schedules allow for the possibility of overtime, that is servers working after their shift has ended in order to complete a customer's service.
77+
The amount of overtime each server works is recorded in the Node object's :code:`overtime` attribute.
78+
Consider the following example::
79+
80+
>>> import ciw
81+
>>> N = ciw.create_network(
82+
... Arrival_distributions=[['Deterministic', 3.0]],
83+
... Service_distributions=[['Deterministic', 5.0]],
84+
... Number_of_servers=[[[1, 4.0], [2, 10.0], [0, 100.0]]]
85+
... )
86+
>>> Q = ciw.Simulation(N)
87+
>>> Q.simulate_until_max_time(20.0)
88+
89+
>>> Q.transitive_nodes[0].overtime
90+
[4.0, 1.0, 4.0]
91+
92+
Here we see that the first server that went off duty worked 4.0 time units of overtime, the second worked 1.0 time unit of overtime, and the third worked 4.0 time units of overtime.

0 commit comments

Comments
 (0)