Skip to main content

pirilib

Fleet optimization with an ant colony solver, a bee colony tuner and your own objective.

CI PyPI Python License

Describe the fleet, the demand and the rules in YAML, write what a good plan means, and pirilib searches for the plan that serves the demand at the lowest cost. One evaluator scores every plan the same way, whichever solver made it.

Alpha. pirilib 0.1 is the first alpha; the API may change before 1.0. See Public API and stability.

Installation

pip install pirilib

pirilib needs Python 3.12+. Optional extras: exact (scipy), excel (openpyxl), forecast (LightGBM, scikit-learn), pyvrp and ortools, for example pip install "pirilib[exact,excel]".

Quick start

>>> import pirilib
>>> spec = pirilib.load_spec("examples/linehaul_mini/problem.yaml")
>>> result = pirilib.solve(spec.compile(), spec.build_objective(), seed=1)
>>> result.evaluation
Evaluation(total_cost=178394.63, dispatches=18, total_km=2891.0, feasible)

Or from the command line:

pirilib generate sample --centers 20 --days 3
pirilib solve sample/problem.yaml -o plan.csv
pirilib check sample/problem.yaml plan.csv

Features

  • Line-haul planning with owned and spot vehicles, multi-stop routes, split loads, times and deferral, handling capacity and vehicle limits.
  • Ant colony solver in numpy with local search, and an exact solver for small problems.
  • Your objective: cost, distance and a penalty for every rule, in YAML or Python, with an independent plan checker.
  • Bee colony tuner for the solver settings, validated on held-out problems.
  • Demand forecasting per line, with backtests and a bridge from the forecast to a planning problem.
  • Clear errors: every problem in a document is reported at once, with file and line for table rows.

Documentation

Contributing

See CONTRIBUTING.md.

License

Apache-2.0. Example data is synthetic; no third-party or competition data is distributed.

Türkçe

pirilib, filo optimizasyonu kütüphanesidir: problemi YAML ile tanımlarsınız, ACO çözücü amaç fonksiyonunuza göre en iyi planı arar, ABC ayarlayıcı çözücü ayarlarını bulur. CSV tabloları Türkçe biçimde (;, ondalık virgül, gg.aa.yyyy) okunur ve yazılır, planlar Excel'e de yazılıp okunur.

Metadata

Release files for pirilib 0.1.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 pirilib 0.1.0
File Size Uploaded Provenance Actions
pirilib-0.1.0.tar.gz 271.8 kB With provenance Details for pirilib-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pirilib 0.1.0
File Interpreter ABI Platform Actions
pirilib-0.1.0-py3-none-any.whl Python 3 none any Details for pirilib-0.1.0-py3-none-any.whl

Total release size: 436.5 kB

Release files / pirilib-0.1.0.tar.gz

Download URL pirilib-0.1.0.tar.gz
Size 271.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f4e9f5268a8bbb09dc6bb8e21bbcc035fb8f98c035fadf3912df6c7f7b341e9f
BLAKE2b-256 checksum
How to use checksums
1589eb882ebac0d31ab905a24deb8a6bd08acfaac27b4aa6d311673abe9e2c8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / pirilib-0.1.0-py3-none-any.whl

Download URL pirilib-0.1.0-py3-none-any.whl
Size 164.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f73c58fed5e8d82a6599186b37bf7a3ad7670297c91eac031998c308aabe3a9
BLAKE2b-256 checksum
How to use checksums
46a437c15e817eb106e4eefbb63d6496562b494ca7fa007167e4bfb8c47eca80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for pirilib 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pirilib-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

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