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.1

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.1
File Size Uploaded Provenance Actions
pirilib-0.1.1.tar.gz 274.7 kB With provenance Details for pirilib-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 440.5 kB

Release files / pirilib-0.1.1.tar.gz

Download URL pirilib-0.1.1.tar.gz
Size 274.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a52259c973c7f60281c9e69ffed887f0d51eba9b4cca1db867eb3eef7e1b1207
BLAKE2b-256 checksum
How to use checksums
ef2819c55bdc2e2d1ddc9d5236e42af3ac3d495cced8623bfa450d6dca2f09ab
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 19, 2026.

Transparency log

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

Download URL pirilib-0.1.1-py3-none-any.whl
Size 165.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
291aa9060d074a87fb2d5ddba4436f85eb5b5a19049f0826ecde53382e61bde3
BLAKE2b-256 checksum
How to use checksums
9922e216f5732f51424cf4c6a8a0ba670a4e5a9b77ce99e8586218137f93dd77
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 19, 2026.

Transparency log

Security for pirilib 0.1.1

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.1.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 19, 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