pirilib
Fleet optimization with an ant colony solver, a bee colony tuner and your own objective.
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.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pirilib-0.2.0.tar.gz | 287.8 kB | With provenance | Details for pirilib-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pirilib-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pirilib-0.2.0-py3-none-any.whl |
Total release size: 460.1 kB
Release files / pirilib-0.2.0.tar.gz
| Download URL | pirilib-0.2.0.tar.gz |
|---|---|
| Size | 287.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3f833dc6b8e12295f9f4e2a4e8095acb5d96fb12658ac5ad6ab7d353ff30327
|
|
BLAKE2b-256 checksum How to use checksums |
1859535ba6214e7879e64c9c42294d915ab67904d19e22fd5d08da0e7545a1c2
|
| 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 21, 2026.
Transparency logRelease files / pirilib-0.2.0-py3-none-any.whl
| Download URL | pirilib-0.2.0-py3-none-any.whl |
|---|---|
| Size | 172.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f66209914a6dc61b023066a43a65764f3932a7cae52266c7e6d901b370e6346
|
|
BLAKE2b-256 checksum How to use checksums |
f75bb08f3b338ebf89cc44a51e755b5a2b434894da3f6a4a3fcff588e2970b2f
|
| 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 21, 2026.
Transparency logSecurity for pirilib 0.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pirilib-0.2.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 21, 2026.
Transparency logA 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.