Skip to main content

Prolothar Queue Mining

Algorithms for queue mining (discovering discrete event simulations based on waiting queue models) from event logs

Based on the publication

Boris Wiegand, Dietrich Klakow, and Jilles Vreeken. Why Are We Waiting? Discovering Interpretable Models for Predicting Sojourn and Waiting Times. In: Proceedings of the SIAM International Conference on Data Mining (SDM), Minneapolis, MN. 2023, pp. 352–360.

Prerequisites

Python 3.11+

Usage

If you want to run the algorithms on your own data, follow the steps below.

Installing

pip install prolothar-queue-mining

Creating a dataset

from prolothar_queue_mining.model.job import Job
from prolothar_queue_mining.inference.queue import CueMin

# our input data are jobs with an ID and their corresponding arrival resp. departure time
observed_arrivals = [
    (Job('A'), 3),
    (Job('B'), 4),
    (Job('C'), 5),
    (Job('D'), 6),
    (Job('E'), 7),
    (Job('F'), 8),
]
observed_departues = [
    (Job('A'), 4),
    (Job('B'), 7),
    (Job('C'), 11),
    (Job('D'), 12),
    (Job('E'), 13),
    (Job('F'), 14),
]

#you can add additional features to a job, example:
Job('4711', {'color': 'blue', 'size': 12})

cuemin = CueMin(verbose=True)

#if your jobs have features, which can have an influence on the service order or service time:
cuemin = CueMin(verbose=True, categorical_attribute_names = ['color'], numerical_attribute_names = ['size'])

#find and a print a waiting queue model
queue = cuemin.infer_queue(observed_arrivals, observed_departues)
print(queue)

#if you want to use domain knowledge to restrict the number of servers, e.g. min 2 and max 4:
cuemin = CueMin(search_strategy_name='linear-2-4')
queue = cuemin.infer_queue(observed_arrivals, observed_departues)

Development

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Additional Prerequisites

  • make (optional)

Compile Cython code

make cython

Running the tests

make test

Deployment

Optional requirement: Create a .pypirc file in the project root directory with your pypi authentication token:

[pypi]
username = __token__
password = pypi-AgEIcH...
  1. Change the version in version.txt
  2. Build the package
make clean_package
make package
  1. Deploy the version to Pypi:
 make publish

or

twine upload --skip-existing --verbose --config .pypirc dist/*
  1. Create and push a tag for this version by
git tag -a $(cat version.txt) -m "describe this version"
git push --all && git push --tags

Devcontainer

There is a decontainer definition in this project, which helps you to set up your environment. At Stahl-Holding-Saar, we are behind a corporate proxy and cannot install dependencies from PyPi directly. I yet have not found a stable solution to set the PIP_INDEX_URL and PIP_TRUSTED_HOST variables dynamically. In the current Dockerfile, I hardcoded the values, so you have to adapt them. If you know a solution to this problem, please contact me.

Versioning

We use SemVer for versioning.

Authors

If you have any questions, feel free to ask one of our authors:

Metadata

Release files for prolothar-queue-mining 3.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prolothar-queue-mining 3.2.0
File Size Uploaded Provenance Actions
prolothar_queue_mining-3.2.0.tar.gz 998.4 kB Without provenance Details for prolothar_queue_mining-3.2.0.tar.gz

Release files / prolothar_queue_mining-3.2.0.tar.gz

Download URL prolothar_queue_mining-3.2.0.tar.gz
Size 998.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dbc5c0f9a0c2a654748a751b1be804d76d7cfa4693f349051630dbead3e41deb
BLAKE2b-256 checksum
How to use checksums
8e86bbc185e7d61d53af79ca02c77bd58fd4d031ddbd11d86f05a6a465e98c18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Security for prolothar-queue-mining 3.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page