tandemdrive / ocpi-tariffs

OCPI tariff calculations
Apache License 2.0
38 stars 9 forks source link
e-mobility ocpi tariffs

OCPI tariffs

crates-io docs-rs unsafe-forbidden github-actions github-activity

This project provides software for doing calculations with OCPI tariffs. Specifically for the OCPI 2.2.1 and OCPI 2.1.1 version.

You can test the tariff tool online.

OCPI is a protocol owned and maintained by the EV Roaming foundation.

Goals

Non-goals

Tariff structure overview

classDiagram
    class Tariff {
        TariffElement elements
    }
    class TariffElement {
        PriceComponent price_components
        TariffRestriction restrictions
    }
    class PriceComponent {
        TarifDimensionType type
        Number price
        Number vat
        int step_size
    }
    class TariffRestriction {
        DayOfWeek day_of_week
        ...
    }
    Tariff "1" --o "1.." TariffElement
    TariffElement "1" --o "1.." PriceComponent
    TariffElement "1" --o "0..1" TariffRestriction

Interpretation

This implementation aims to follow the OCPI specification as closely as possible. However, as with any specification, details might be left open to interpretation. The following is a list of assumptions that have been made in this implementation:

Contributing

We welcome community contributions to this project.

Please read our Contributor Terms before you make any contributions.

Any contribution intentionally submitted for inclusion, shall comply with the Rust standard licensing model (MIT OR Apache 2.0) and therefore be dual licensed as described below, without any additional terms or conditions:

License

This contribution is dual licensed under EITHER OF

at your option.

For clarity, "your" refers to TandemDrive or any other licensee/user of the contribution.