[package]
name = "cobre-sddp"
description = "Stochastic Dual Dynamic Programming (SDDP) for hydrothermal dispatch and energy planning"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
authors.workspace = true
readme = "README.md"
keywords = ["sddp", "hydrothermal", "dispatch", "optimization", "energy"]
categories = ["science", "simulation", "mathematics"]

[features]
## Enable DHAT heap profiling instrumentation.
##
## When enabled, the global allocator is replaced with `dhat::Alloc` and the
## `dhat_baseline` example writes a `dhat-heap.json` profile on exit.
##
## **Never enable by default** — replaces the global allocator and slows
## every allocation.  Only activate when running the `dhat_baseline` example.
dhat-heap = ["dep:dhat"]

## Opt-in to the slow test suite.
##
## Tests gated by this feature (D-case sweep, FPHA plane-selection unit tests,
## and forward-sampler convergence integration tests) are ignored by default so
## that `cargo test --workspace` completes quickly.  Pass `--features slow-tests`
## to include them.
slow-tests = []

[dependencies]
cobre-core = { version = "0.6.0", path = "../cobre-core" }
cobre-solver = { version = "0.6.0", path = "../cobre-solver" }
cobre-comm = { version = "0.6.0", path = "../cobre-comm" }
cobre-stochastic = { version = "0.6.0", path = "../cobre-stochastic" }
cobre-io = { version = "0.6.0", path = "../cobre-io" }
chrono = { version = "0.4", default-features = false, features = ["std"] }
dhat = { version = "0.3", optional = true }
postcard = { version = "1", features = ["alloc"] }
rayon = "1"
serde = { version = "1", features = ["derive"] }
thiserror = "2"
tracing = "0.1"

[dev-dependencies]
arrow = { version = "58", default-features = false, features = ["prettyprint"] }
chrono = { version = "0.4", default-features = false, features = ["std"] }
criterion = { version = "0.5", default-features = false }
parquet = { version = "58", default-features = false, features = ["arrow", "zstd"] }
rand = "0.10"
rand_distr = "0.6"
serde_json = "1"
sha2 = "0.10"
tempfile = "3"
tracing-subscriber = "0.3"

[[bench]]
name = "backward_stats_gather"
harness = false

[lints]
workspace = true
