Skip to main content

A simple library for Erlang calculations

Project description

erlanglib - An Erlang Library

This Erlang library provides functions to assist in teletraffic engineering, offering functions based on Erlang formulas. Erlang formulas are widely used in the telecommunications industry for calculating various metrics such as call blocking probability, probability of call queuing, service levels, and more.

Table of Contents

Installation

You can install erlanglib via pip:

pip install erlanglib

General Functions

factorial(n)
Calculates the factorial of n.

calculate_erlangs(call_duration_hours, calls_per_hour)
Given the average call duration in hours and calls initiated per hour, it returns the traffic in Erlangs.

calculate_erlangs_seconds(call_duration_seconds, calls_per_second)
Given the average call duration in seconds and calls initiated per second, it calculates the traffic in Erlangs in terms of hours.

calculate_erlangs_minutes(call_duration_minutes, calls_per_minute)
Given the average call duration in minutes and calls initiated per minute, it calculates the traffic in Erlangs in terms of hours.

calls_per_second_from_erlangs(erlangs, call_duration_seconds)
Given the traffic in Erlangs and average call duration, it calculates the calls initiated per second.

call_duration_from_erlangs(erlangs, calls_per_second)
Given the traffic in Erlangs and calls initiated per second, it calculates the average call duration in seconds.

Erlang B Functions

erlang_b(N, A)
Calculates the blocking probability using the Erlang B formula.

required_channels(A, target_blocking)
Given the traffic in Erlangs and a desired blocking probability, it calculates the required number of channels.

calculate_erlangs_from_blocking(N, target_blocking)
Given the blocking probability and available lines, it calculates the traffic in Erlangs.

Erlang C Functions

erlang_c(N, A)
Calculates the probability that a call is queued using the Erlang C formula.

service_level(N, A, Pw, target_time_seconds, AHT_seconds)
Given various parameters including the probability a call is queued, it calculates the service level.

average_speed_of_answer(N, A, Pw, average_handling_time)
Given the probability a call is queued, number of agents, traffic in Erlangs, and average handling time, it calculates the Average Speed of Answer.

immediate_answer_percentage(Pw)
Given the probability a call is queued, it calculates the percentage of calls answered immediately.

occupancy(A, N)
Given the traffic in Erlangs and the number of agents, it calculates the agent utilization in percentage.

required_agents(N_raw, shrinkage_percentage)
Given the raw number of agents and shrinkage percentage, it calculates the number of agents required.

Usage

To use this library, simply import the desired functions and utilize them as per the requirements. Each function is accompanied by its detailed documentation, ensuring ease of use.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

erlanglib-1.2.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

erlanglib-1.2.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file erlanglib-1.2.0.tar.gz.

File metadata

  • Download URL: erlanglib-1.2.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for erlanglib-1.2.0.tar.gz
Algorithm Hash digest
SHA256 22d90c109165507efc2feba42cf73d4ac66c47b991e050cce770e42474f41241
MD5 7acc6b3e6c79581352d787858b93eb62
BLAKE2b-256 067c322b3f2f8d81be186b9e4477e44ae2f3fb7fef9b9a69241331b5e84027e3

See more details on using hashes here.

File details

Details for the file erlanglib-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: erlanglib-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for erlanglib-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0dcf0af799657aa9d881386e1390da8379292e19752a61758c463a76d95de286
MD5 0beafaa5bf7d934a5265281d0ada8fe9
BLAKE2b-256 910025446be0f2c738c574e16fa7fbabe57b640cca3e01c3737b759b5f2b9454

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page