CertiFlow
Certified accuracy for user-equilibrium traffic assignment and scheme appraisal.
A traffic assignment stopped at a small convergence gap gives a total travel cost, and a scheme benefit, of unknown accuracy. CertiFlow returns intervals that are guaranteed to contain the equilibrium values: the total travel cost of a network, the benefit of a scheme and the difference between the benefits of two schemes. It runs each assignment only until the benefit meets the accuracy you ask for.
Installation
pip install certiflow-ue
CertiFlow needs Python 3.10 or later and installs NumPy and SciPy with it. The user guide covers conda, GitHub and fixed versions.
Quick start
certiflow demo
or, in Python,
import certiflow_ue as cf
cf.demo()
Both run Example 1 of the paper and print:
CertiFlow demo: Example 1 of Li, Chen and Jin (2026)
One OD pair with demand 1 has two routes. Route 1 costs 1 + x at flow x and route 2 costs 2. Both costs are 1 higher
than in the paper's Figure 1, because a BPR cost cannot be x, and the shift leaves the gap, the error and its bound
unchanged. At equilibrium every trip uses route 1, so the equilibrium total cost is 2. Each row moves z trips to
route 2, certifies the total cost at that flow and compares the error of the usual estimate (the shortest-path travel
time) with its certified bound.
z gap actual error certified bound
0.5 0.25 0.5 0.500001
0.1 0.01 0.1 0.100001
0.01 0.0001 0.01 0.0100001
0.001 1e-6 0.001 0.00100001
The bound equals the error in exact arithmetic. The computed bound is rounded upwards at every step, so that it stays
guaranteed, and this raises only its last digit shown. The error is the square root of the gap, so a small gap does
not mean a small error.
Appraise your own schemes
Give your network and its trips as TNTP files, and list the schemes in a CSV file, each row multiplying the capacity of one link:
scheme,init_node,term_node,capacity_multiplier
wider,1,3,2
wider,3,2,2
narrower,1,2,0.5
Then run
import certiflow_ue as cf
base = cf.read_tntp("net.tntp", "trips.tntp")
schemes = cf.read_schemes("schemes.csv", base)
result = cf.appraise(base, schemes)
print(result)
result.to_csv("results.csv")
or certiflow appraise net.tntp trips.tntp schemes.csv -o results.csv. Each row of the result is one scheme: the
estimate of its benefit (the fall in total travel cost), an interval guaranteed to contain the equilibrium benefit,
and whether the estimate is certified to be within the tolerance.
Next steps
- Set the tolerance or build schemes in Python
- Compare schemes and find the best one
- Certify the total cost of one network
- Certify route flows from another solver
- Build a network in Python
- Understand a result or a status
- Prepare input files
- Look up a function
Citation
Li, Y., Chen, S. and Jin, Y. (2026). Certified benefit intervals for network changes under user equilibrium. arXiv preprint.
License
MIT.
Metadata
Release files for certiflow-ue 0.1.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 |
|---|---|---|---|---|
| certiflow_ue-0.1.0.tar.gz | 35.9 kB | With provenance | Details for certiflow_ue-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| certiflow_ue-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for certiflow_ue-0.1.0-py3-none-any.whl |
Total release size: 60.7 kB
Release files / certiflow_ue-0.1.0.tar.gz
| Download URL | certiflow_ue-0.1.0.tar.gz |
|---|---|
| Size | 35.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e5dc680c5ec93e4ccf00b96a61bffcf2f8be1bf2f98fc08aab0c5d9f55f0c71
|
|
BLAKE2b-256 checksum How to use checksums |
a20a85940b267daab7ee73b10ff3e76a8e6d59bcf0753c626012bd5dc46c2a40
|
| 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 26, 2026.
Transparency logRelease files / certiflow_ue-0.1.0-py3-none-any.whl
| Download URL | certiflow_ue-0.1.0-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f9395935f4a3c7d5c615f32170da189b96543ecca7b49c955f6e8dab1245c7f
|
|
BLAKE2b-256 checksum How to use checksums |
01ffc4a20e4bc629449b6da15b7fcfd3c9220d6ad621cf4a468c437b4fd2141b
|
| 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 26, 2026.
Transparency logSecurity for certiflow-ue 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.
Attestation for certiflow_ue-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 26, 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.