MultiErlangC

MultiErlangC(param_grid[, n_jobs, pre_dispatch])

This class uses the erlangc.rst class using joblib's Parallel, allowing to run multiple scenarios at once.

MultiErlangC.waiting_probability(arguments_grid)

Returns the probability of waiting in the queue Returns a list with the solution to all the possible combinations from the arguments_grid and the erlangc.rst param_grid

MultiErlangC.service_level(arguments_grid)

Returns the expected service level given a number of positions Returns a list with the solution to all the possible combinations from the arguments_grid and the erlangc.rst param_grid

MultiErlangC.achieved_occupancy(arguments_grid)

Returns the expected occupancy of positions Returns a list with the solution to all the possible combinations from the arguments_grid and the erlangc.rst param_grid

MultiErlangC.required_positions(arguments_grid)

Computes the requirements using MultiErlangC Returns a list with the solution to all the possible combinations from the arguments_grid and the erlangc.rst param_grid

class pyworkforce.queuing.MultiErlangC(param_grid: dict, n_jobs: int = 2, pre_dispatch: str = '2 * n_jobs')[source]

This class uses the erlangc.rst class using joblib’s Parallel, allowing to run multiple scenarios at once. It finds solutions iterating over all possible combinations provided by the users, inspired how Sklearn’s Grid Search works

Parameters:
param_grid: dict,

Dictionary with the erlangc.rst.__init__ parameters, each key of the dictionary must be the expected parameter and the value must be a list with the different options to iterate example: {“transactions”: [100, 200], “aht”: [3], “interval”: [30], “asa”: [20 / 60], “shrinkage”: [0.3]}

n_jobs: int, default=2

The maximum number of concurrently running jobs. If -1 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. For n_jobs below -1, (n_cpus + 1 + n_jobs) are used. Thus for n_jobs = -2, all CPUs but one are used. None is a marker for ‘unset’ that will be interpreted as n_jobs=1 (sequential execution) unless the call is performed under a parallel_backend() context manager that sets another value for n_jobs.

pre_dispatch: {“all”, int, or expression}, default=’2 * n_jobs’

The number of batches (of tasks) to be pre-dispatched. Default is ‘2*n_jobs’. See joblib’s documentation for more details: https://joblib.readthedocs.io/en/latest/generated/joblib.Parallel.html

Attributes:
waiting_probability_params: list[tuple],

Each tuple of the list represents the used parameters in param_grid for ErlangC and arguments_grid for waiting_probability method,corresponding to the same order returned by the MultiErlangC.waiting_probability method.

service_level_params: list[tuple],

Each tuple of the list represents the used parameters in param_grid for ErlangC and arguments_grid for service_level method,corresponding to the same order returned by the MultiErlangC.service_level method.

achieved_occupancy_params: list[tuple],

Each tuple of the list represents the used parameters in param_grid for ErlangC and arguments_grid for achieved_occupancy method,corresponding to the same order returned by the MultiErlangC.achieved_occupancy method.

required_positions_params: list[tuple],

Each tuple of the list represents the used parameters in param_grid for ErlangC and arguments_grid for required_positions method,corresponding to the same order returned by the MultiErlangC.required_positions method.

achieved_occupancy(arguments_grid)[source]

Returns the expected occupancy of positions Returns a list with the solution to all the possible combinations from the arguments_grid and the erlangc.rst param_grid

Parameters:
arguments_grid: dict,

Dictionary with the erlangc.rst.achieved_occupancy parameters, each key of the dictionary must be the expected parameter and the value must be a list with the different options to iterate example: {“positions”: [10, 20, 30], “scale_positions”: [True, False]}

required_positions(arguments_grid)[source]

Computes the requirements using MultiErlangC Returns a list with the solution to all the possible combinations from the arguments_grid and the erlangc.rst param_grid

Parameters:
arguments_grid: dict,

Dictionary with the erlangc.rst.achieved_occupancy parameters, each key of the dictionary must be the expected parameter and the value must be a list with the different options to iterate example: {“service_level”: [0.85, 0.9], “max_occupancy”: [0.8, 0.95]}

service_level(arguments_grid)[source]

Returns the expected service level given a number of positions Returns a list with the solution to all the possible combinations from the arguments_grid and the erlangc.rst param_grid

Parameters:
arguments_grid: dict,

Dictionary with the erlangc.rst.service_level parameters, each key of the dictionary must be the expected parameter and the value must be a list with the different options to iterate example: {“positions”: [10, 20, 30], “scale_positions”: [True, False]}

waiting_probability(arguments_grid)[source]

Returns the probability of waiting in the queue Returns a list with the solution to all the possible combinations from the arguments_grid and the erlangc.rst param_grid

Parameters:
arguments_grid: dict,

Dictionary with the erlangc.rst.waiting_probability parameters, each key of the dictionary must be the expected parameter and the value must be a list with the different options to iterate example: {“positions”: [10, 20, 30], “scale_positions”: [True, False]}