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=156388.28, dispatches=16, total_km=2756.9, 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.4.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.4.0
File Size Uploaded Provenance Actions
pirilib-0.4.0.tar.gz 338.7 kB With provenance Details for pirilib-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 530.3 kB

Release files / pirilib-0.4.0.tar.gz

Download URL pirilib-0.4.0.tar.gz
Size 338.7 kB
Tags Source
SHA-256 checksum
How to use checksums
28578e5cdc79f475ebe057de3291f9f77632392a1c77d162a7e5a626861c9a21
BLAKE2b-256 checksum
How to use checksums
d0bdd243119172b18eeb3c7d8b05f2921707e98a3c7c7fad90c597bb22a3b71c
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 25, 2026.

Transparency log

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

Download URL pirilib-0.4.0-py3-none-any.whl
Size 191.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a58a5fc4f454a65a63f3062f5a9300b559476acbabaff1e85f2dbe84622725b6
BLAKE2b-256 checksum
How to use checksums
7e70e61bd078a0961e830d61ae82662c809c9d55143dd2c07072806908be19b2
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 25, 2026.

Transparency log

Security for pirilib 0.4.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.4.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 25, 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