Skip to content

Commit

Permalink
update service discipline docs
Browse files Browse the repository at this point in the history
  • Loading branch information
geraintpalmer committed Apr 4, 2024
1 parent f95ab8f commit db6e7f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/Guides/service_disciplines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ As an example, say we have a three node network, and we want to use FIFO discipl
Custom Disciplines
------------------

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

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:

>>> def SIRO_proportional(individuals):
>>> def SIRO_proportional(individuals, t):
... n = len(inds)
... denominator = (n * (n + 1)) / 2
... probs = [(n - i) / denominator for i in range(n)]
Expand Down

0 comments on commit db6e7f6

Please sign in to comment.