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
Copy file name to clipboardExpand all lines: docs/Guides/service_disciplines.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,11 +38,11 @@ As an example, say we have a three node network, and we want to use FIFO discipl
38
38
Custom Disciplines
39
39
------------------
40
40
41
-
Other service disciplines can also be implemented by writing a custom service discipline function. These functions take in a list of individuals and returns an individual from that list that represents the next individual to be served. As this is a list of individuals, we can access the individuals' attributes when making the service discipline decision.
41
+
Other service disciplines can also be implemented by writing a custom service discipline function. These functions take in a list of individuals, and the current time, and returns an individual from that list that represents the next individual to be served. As this is a list of individuals, we can access the individuals' attributes when making the service discipline decision.
42
42
43
43
For example, say we wish to implement a service discipline that chooses the customers randomly, but with probability proportional to their arrival order, we could write:
44
44
45
-
>>> defSIRO_proportional(individuals):
45
+
>>> defSIRO_proportional(individuals, t):
46
46
... n =len(inds)
47
47
... denominator = (n * (n +1)) /2
48
48
... probs = [(n - i) / denominator for i inrange(n)]
0 commit comments