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.3.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.3.0
File Size Uploaded Provenance Actions
pirilib-0.3.0.tar.gz 322.1 kB With provenance Details for pirilib-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 504.7 kB

Release files / pirilib-0.3.0.tar.gz

Download URL pirilib-0.3.0.tar.gz
Size 322.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4500f4c32b3444c611cc1a72c7c40e5ba040e9614a3f8a4c616c0afa5ea1fb9c
BLAKE2b-256 checksum
How to use checksums
1b6eb8d930a54ad186f966d6f0576a190f564666be35d8501ffdeae1bd7c1483
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 23, 2026.

Transparency log

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

Download URL pirilib-0.3.0-py3-none-any.whl
Size 182.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae2a34b7d7bd7c1c23692041b3a837ff50b64cafb827f4891fb731501dba8ce5
BLAKE2b-256 checksum
How to use checksums
d5200d9ea503c53dec9b2de69010c1ca55bc73de8fd7edec320c8bc76794e8a8
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 23, 2026.

Transparency log

Security for pirilib 0.3.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.3.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 23, 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