Queueing
queue mmcqueue mmckqueue erlang_bqueue trunksqueue erlang_cqueue erlang_cqueue staffingqueue staffingqueue erlang_aqueue erlang_aqueue mg1queue ggcqueue replay

queue mmc <arrival_rate> <service_rate> <servers>


Description

    M/M/c queue (Poisson arrivals, exponential services, c servers): utilization, probability to wait (Erlang C), mean queue Lq, mean wait Wq, L, W

Parameters

    arrival_rate:   The arrival rate - Number - required
    service_rate:   The service rate of one server - Number - required
    servers:   The number of servers - Number - required
admin
queue mmc 10 4 3
mentdb
{"servers": 3, "traffic_erlangs": 2.5, "utilization": 0.8333333333333334, "p0": 0.04494382022471909, "probability_wait": 0.702247191011236, "lq": 3.511235955056181, "wq": 0.3511235955056181, "l": 6.011235955056181, "w": 0.6011235955056181}

queue mmck <arrival_rate> <service_rate> <servers> <capacity>


Description

    M/M/c/K queue with a limited capacity K (in service + waiting): blocking probability, effective arrival rate, L, Lq, W, Wq

Parameters

    arrival_rate:   The arrival rate - Number - required
    service_rate:   The service rate - Number - required
    servers:   The servers - Number - required
    capacity:   The capacity K - Number - required
admin
queue mmck 2 3 1 3
mentdb
{"servers": 1, "capacity": 3, "traffic_erlangs": 0.6666666666666666, "blocking_probability": 0.12307692307692307, "effective_arrival_rate": 1.7538461538461538, "utilization": 0.5846153846153846, "p0": 0.41538461538461546, "lq": 0.4307692307692308, "wq": 0.2456140350877193, "l": 1.0153846153846153, "w": 0.5789473684210527}

queue erlang_b <traffic> <servers>


Description

    Erlang B: blocking probability of a loss system (no waiting: phone lines, beds, parking places) for a traffic in erlangs

Parameters

    traffic:   The traffic in erlangs (arrival rate x mean duration) - Number - required
    servers:   The servers - Number - required
admin
queue erlang_b 10 15
mentdb
{"traffic_erlangs": 10, "servers": 15, "blocking_probability": 0.0364969454723708, "carried_traffic": 9.635030545276292, "lost_traffic": 0.364969454723708}

queue trunks <traffic> <blocking>


Description

    Number of servers (lines, beds, licenses) for a blocking target (Erlang B)

Parameters

    traffic:   The traffic in erlangs - Number - required
    blocking:   The target blocking probability - Number - required
admin
queue trunks 10 0.01
mentdb
{"traffic_erlangs": 10, "blocking_target": 0.01, "servers": 18, "blocking_probability": 0.007142438157899779}
Used in use cases (1 recipe)

    Telecom & radar engineer › Call center: agents for 80/20, abandonment and trunk lines
Often used with

    queue erlang_a  ·  queue staffing

queue erlang_c <calls> <aht> <agents>


Description

    Call center (Erlang C) for one interval of 30 minutes: traffic, probability to wait, service level (answered within 20 s), average speed of answer, occupancy

Parameters

    calls:   The calls in the interval - Number - required
    aht:   The average handling time in seconds - Number - required
    agents:   The agents - Number - required
admin
queue erlang_c 360 240 55
mentdb
{"traffic_erlangs": 48, "agents": 55, "occupancy": 0.8727272727272727, "probability_wait": 0.2387009363780092, "service_level": 0.8667964881728509, "target_seconds": 20, "asa_seconds": 8.184032104388887, "calls_waiting_longer_than_target": 47.95326425777367}

queue erlang_c <calls> <aht> <agents> <json_params>


Description

    Erlang C with parameters: interval (seconds, 1800), target_seconds (20)

Parameters

    calls:   The calls - Number - required
    aht:   The handling time (s) - Number - required
    agents:   The agents - Number - required
    json_params:   The parameters - String - required
admin
queue erlang_c 120 300 12 "{\"interval\": 3600, \"target_seconds\": 30}"
mentdb
{"traffic_erlangs": 10, "agents": 12, "occupancy": 0.8333333333333334, "probability_wait": 0.4493882242982711, "service_level": 0.6320720406958995, "target_seconds": 30, "asa_seconds": 67.40823364474066, "calls_waiting_longer_than_target": 44.151355116492056}

queue staffing <calls> <aht> <target_sl> <target_seconds>


Description

    Agents needed for a service level target (ex: 80 % of the calls answered within 20 s), with the service level and the waiting time around the solution

Parameters

    calls:   The calls in the interval - Number - required
    aht:   The handling time (s) - Number - required
    target_sl:   The service level target - Number - required
    target_seconds:   The answer time target (s) - Number - required
admin
queue staffing 360 240 0.8 20
mentdb
{"traffic_erlangs": 48, "agents": 54, "scheduled_agents": 54, "service_level": 0.8172475210146837, "asa_seconds": 12.052315975050773, "occupancy": 0.8888888888888888, "around": [{"agents": 52, "service_level": 0.6660745200246492, "asa_seconds": 27.96183293438614, "occupancy": 0.9230769230769231}, {"agents": 53, "service_level": 0.7517682451743329, "asa_seconds": 18.074013775530183, "occupancy": 0.9056603773584906}, {"agents": 54, "service_level": 0.8172475210146837, "asa_seconds": 12.052315975050773, "occupancy": 0.8888888888888888}, {"agents": 55, "service_level": 0.8667964881728509, "asa_seconds": 8.184032104388887, "occupancy": 0.8727272727272727}, {"agents": 56, "service_level": 0.9039118142502861, "asa_seconds": 5.61462690983708, "occupancy": 0.8571428571428571}]}
Complete: the forecast of each half hour -> the agents of each half hour
admin
-> "[calls]" "[120, 260, 410, 380, 300, 180]"; json load "tuto_c" [calls]; -> "[res]" ""; for (-> "[i]" 0) (< [i] (json count "tuto_c" "/")) (++ "[i]") { json load "tuto_s" (queue staffing (json select "tuto_c" (concat "/[" [i] "]")) 240 0.8 20); -> "[res]" (concat [res] (json select "tuto_c" (concat "/[" [i] "]")) " calls: " (json select "tuto_s" "/agents") " agents | "); json unload "tuto_s"; }; json unload "tuto_c"; [res]
mentdb
120 calls: 20 agents | 260 calls: 40 agents | 410 calls: 61 agents | 380 calls: 57 agents | 300 calls: 46 agents | 180 calls: 29 agents |

queue staffing <calls> <aht> <target_sl> <target_seconds> <json_params>


Description

    Staffing with parameters: interval (1800 s), shrinkage (breaks, training: gives the scheduled agents), max_occupancy

Parameters

    calls:   The calls - Number - required
    aht:   The handling time - Number - required
    target_sl:   The target - Number - required
    target_seconds:   The answer time - Number - required
    json_params:   The parameters - String - required
admin
queue staffing 360 240 0.8 20 "{\"shrinkage\": 0.3, \"max_occupancy\": 0.85}"
mentdb
{"traffic_erlangs": 48, "agents": 57, "scheduled_agents": 82, "service_level": 0.9314211416826415, "asa_seconds": 3.8715051785900383, "occupancy": 0.8421052631578947, "around": [{"agents": 55, "service_level": 0.8667964881728509, "asa_seconds": 8.184032104388887, "occupancy": 0.8727272727272727}, {"agents": 56, "service_level": 0.9039118142502861, "asa_seconds": 5.61462690983708, "occupancy": 0.8571428571428571}, {"agents": 57, "service_level": 0.9314211416826415, "asa_seconds": 3.8715051785900383, "occupancy": 0.8421052631578947}, {"agents": 58, "service_level": 0.9515883082668873, "asa_seconds": 2.6734592523654657, "occupancy": 0.8275862068965517}, {"agents": 59, "service_level": 0.9662063842181299, "asa_seconds": 1.8439812199680683, "occupancy": 0.8135593220338984}]}
Used in use cases (1 recipe)

    Telecom & radar engineer › Call center: agents for 80/20, abandonment and trunk lines
Often used with

    queue erlang_a  ·  queue trunks

queue erlang_a <calls> <aht> <patience> <agents>


Description

    Erlang A (call center with abandonment, patience exponential): probability to wait and to abandon, service level, mean queue and wait, occupancy, answered and abandoned calls

Parameters

    calls:   The calls in the interval - Number - required
    aht:   The handling time (s) - Number - required
    patience:   The mean patience (s) - Number - required
    agents:   The agents - Number - required
admin
queue erlang_a 360 240 120 50
mentdb
{"traffic_erlangs": 48, "agents": 50, "probability_wait": 0.34230880342267683, "probability_abandon": 0.048021774232970584, "service_level": 0.850595148296864, "target_seconds": 20, "mean_queue": 1.152522581591294, "mean_wait_seconds": 5.76261290795647, "occupancy": 0.9138990967363483, "answered_calls": 342.7121612761306, "abandoned_calls": 17.28783872386941}

queue erlang_a <calls> <aht> <patience> <agents> <json_params>


Description

    Erlang A with parameters: interval (1800 s), target_seconds (20)

Parameters

    calls:   The calls - Number - required
    aht:   The handling time - Number - required
    patience:   The patience - Number - required
    agents:   The agents - Number - required
    json_params:   The parameters - String - required
admin
queue erlang_a 360 240 120 50 "{\"target_seconds\": 60}"
mentdb
{"traffic_erlangs": 48, "agents": 50, "probability_wait": 0.34230880342267683, "probability_abandon": 0.048021774232970584, "service_level": 0.9485561759261617, "target_seconds": 60, "mean_queue": 1.152522581591294, "mean_wait_seconds": 5.76261290795647, "occupancy": 0.9138990967363483, "answered_calls": 342.7121612761306, "abandoned_calls": 17.28783872386941}
Used in use cases (1 recipe)

    Telecom & radar engineer › Call center: agents for 80/20, abandonment and trunk lines
Often used with

    queue staffing  ·  queue trunks

queue mg1 <arrival_rate> <mean_service> <sd_service>


Description

    M/G/1 queue (Pollaczek-Khinchine): one server, Poisson arrivals, any service time distribution given by its mean and sd

Parameters

    arrival_rate:   The arrival rate - Number - required
    mean_service:   The mean service time - Number - required
    sd_service:   The sd of the service time - Number - required
admin
queue mg1 0.5 1 0
mentdb
{"utilization": 0.5, "cv_service": 0, "lq": 0.25, "wq": 0.5, "l": 0.75, "w": 1.5}

queue ggc <arrival_rate> <mean_service> <servers> <cv_arrival> <cv_service>


Description

    G/G/c queue (Allen-Cunneen approximation): the M/M/c wait corrected by the variability of the arrivals and of the services (coefficients of variation)

Parameters

    arrival_rate:   The arrival rate - Number - required
    mean_service:   The mean service time - Number - required
    servers:   The servers - Number - required
    cv_arrival:   The cv of the interarrival times - Number - required
    cv_service:   The cv of the service times - Number - required
admin
queue ggc 10 0.25 3 0.8 0.5
mentdb
{"servers": 3, "utilization": 0.8333333333333334, "probability_wait_mmc": 0.702247191011236, "wq_mmc": 0.351123595505618, "wq": 0.15625000000000003, "lq": 1.5625000000000002, "w": 0.40625, "l": 4.0625, "method": "Allen-Cunneen approximation"}

queue replay <json_arrivals> <json_services> <servers>


Description

    Replay of a real queue (first come first served) from the arrival times and the service times: waits of each customer, mean, median, p90, max, share who waited, max queue, utilization

Parameters

    json_arrivals:   The arrival times (sorted) - String - required
    json_services:   The service times - String - required
    servers:   The servers - Number - required
admin
queue replay "[0, 1, 2, 3, 10, 11, 11.5]" "[3, 3, 3, 1, 1, 2, 1]" 2
mentdb
{"customers": 7, "servers": 2, "mean_wait": 0.2857142857142857, "median_wait": 0, "p90_wait": 1, "max_wait": 1, "share_waited": 0.2857142857142857, "max_queue": 1, "utilization": 0.5384615384615384, "waits": [0, 0, 1, 1, 0, 0, 0]}