flexibility 0.4.0

Grid flexibility as exact, replayable arithmetic: limits, baselines, UFTP-exact settlement, and UFTP, EEBUS, S2, OpenADR, CSIP-AUS, IEC 104, CLS.EEDI converters.
Documentation
[package]
name         = "flexibility"
description  = "Grid flexibility as exact, replayable arithmetic: limits, baselines, UFTP-exact settlement, and UFTP, EEBUS, S2, OpenADR, CSIP-AUS, IEC 104, CLS.EEDI converters."
version      = "0.4.0"
authors      = ["hupe1980"]
edition      = "2024"
license      = "MIT OR Apache-2.0"
repository   = "https://github.com/hupe1980/flexibility"
homepage     = "https://hupe1980.github.io/flexibility/"
documentation = "https://docs.rs/flexibility"
rust-version = "1.88"
readme       = "README.md"
keywords     = ["energy", "flexibility", "baseline", "smart-grid", "uftp"]
categories   = ["science", "algorithms"]
include      = ["/src/**", "/tests/**", "/examples/**", "/scripts/digest.sh", "/README.md", "/CHANGELOG.md", "/LICENSE-*"]

[dependencies]
# Time zones from the bundled database only: no system tzdb read, no clock.
jiff = { version = "1", default-features = false, features = ["std", "tzdb-bundle-always"] }
# SHA-256 over the canonical text, so both parties compare one digest (RustCrypto, no defaults).
sha2 = { version = "0.11", default-features = false }
# The UFTP converter (`--features uftp`): requests, offers, orders and settlements.
uftp = { version = "0.3", default-features = false, optional = true }
# The EEBUS converter (`--features eebus`): LPC and LPP limits, active and failsafe.
eebus = { version = "0.16", default-features = false, optional = true }
# The metering converter (`--features metering`): the § 14a minimum and Lastgang energy.
metering = { version = "0.29", default-features = false, optional = true }
# The S2 converter (`--features s2`): PEBC power envelopes and PPBC power sequences.
s2-kit = { version = "0.8", default-features = false, features = ["jiff"], optional = true }
# The IEC 104 converter (`--features iec104`): active-power set points (types 48–50).
iec60870 = { version = "0.3", default-features = false, optional = true }
# The CLS.EEDI converter (`--features cls`): FNN control-box limits and failsafes (§ 14a EnWG).
cls-eedi = { version = "0.3", default-features = false, optional = true }
# The CSIP-AUS converter (`--features csip`): IEEE 2030.5 site import and export limits.
ieee2030-5 = { version = "0.2", default-features = false, features = ["csip-aus"], optional = true }
# The OpenADR 3 converter (`--features openadr`): capacity limits and usage reports.
openadr = { version = "0.11", default-features = false, features = ["std", "jiff"], optional = true }

[features]
# Map UFTP 3.1 requests, offers, orders and settlements, and check received ones.
uftp = ["dep:uftp"]
# Map EEBUS LPC and LPP limits to and from limits.
eebus = ["dep:eebus"]
# The § 14a minimum as a guarantee, and quarter-hour Lastgang energy as average power.
metering = ["dep:metering"]
# Map S2 PEBC power envelopes to and from limits, and PPBC power sequences to schedules.
s2 = ["dep:s2-kit"]
# Map IEC 60870-5-104 active-power set points to and from limits, as the point list says.
iec104 = ["dep:iec60870"]
# Map CLS.EEDI control-box limits and failsafes to and from limits.
cls = ["dep:cls-eedi"]
# Map CSIP-AUS (IEEE 2030.5) connection-point import and export limits to an envelope.
csip = ["dep:ieee2030-5"]
# Map OpenADR 3 import and export capacity limits to and from limits, and usage reports to power.
openadr = ["dep:openadr"]

[[example]]
name              = "check_a_settlement"
required-features = ["uftp"]

[[example]]
name              = "curtail_pv"
required-features = ["openadr", "s2"]

[[example]]
name              = "control_box"
required-features = ["eebus", "metering"]

[package.metadata.docs.rs]
all-features = true

[dev-dependencies]
proptest = "1.6"
# OpenADR events and reports in the tests are written as the JSON a VTN sends.
serde_json = "1"

[lints.rust]
unsafe_code  = "forbid"
missing_docs = "warn"

[lints.clippy]
pedantic         = { level = "warn", priority = -1 }
float_arithmetic = "deny"