Skip to main content

High-performance SDDP solver for hydrothermal dispatch — Python bindings for the Cobre ecosystem

Project description

cobre

Python bindings for the Cobre power systems solver.

Cobre is a high-performance SDDP (Stochastic Dual Dynamic Programming) solver for hydrothermal dispatch, written in Rust. This package provides Python access to case loading, validation, training, simulation, and result inspection.

Installation

pip install cobre-python

Pre-built wheels are available for:

  • Linux x86_64 and aarch64 (manylinux_2_34), musl x86_64
  • macOS Apple Silicon (aarch64) and Intel (x86_64)
  • Windows x86_64
  • Python 3.12+

Quick Start

import cobre

# Load and validate a case
system = cobre.io.load_case("path/to/case")
print(f"System: {system.n_buses} buses, {system.n_hydros} hydros, {system.n_thermals} thermals")

# Run training + simulation
result = cobre.run.run("path/to/case", output_dir="output/")
print(f"Converged: {result['converged']}, LB: {result['lower_bound']:.2f}")

convergence = cobre.results.load_convergence("output/")
print(f"Iterations: {len(convergence)}")

simulation = cobre.results.load_simulation("output/")
print(f"Cost records: {len(simulation['costs'])}")

policy = cobre.results.load_policy("output/")
print(f"Iterations completed: {policy['metadata']['completed_iterations']}")

Modules

  • cobre.io — Load and validate case directories
  • cobre.model — Data model classes (System, Bus, Line, Thermal, Hydro, etc.)
  • cobre.run — Execute SDDP training and simulation
  • cobre.results — Load and inspect output artifacts, including convergence history, Parquet simulation outputs, and FlatBuffers policy (FCF) checkpoints

Requirements

  • Python >= 3.12
  • No runtime dependencies (the Rust solver is statically linked)

License

Apache-2.0 — see LICENSE.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cobre_python-0.8.1-cp312-abi3-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.8.1-cp312-abi3-musllinux_1_2_x86_64.whl (14.7 MB view details)

Uploaded CPython 3.12+musllinux: musl 1.2+ x86-64

cobre_python-0.8.1-cp312-abi3-manylinux_2_34_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.34+ x86-64

cobre_python-0.8.1-cp312-abi3-manylinux_2_28_aarch64.whl (7.8 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.8.1-cp312-abi3-macosx_11_0_arm64.whl (7.0 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.8.1-cp312-abi3-macosx_10_12_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file cobre_python-0.8.1-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: cobre_python-0.8.1-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.8 MB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cobre_python-0.8.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b8c6f55fc87dabfa0c38f3837028a1a82790c5f1dfcf8700fd3dbff84550b980
MD5 af125e286483c2f925ccee697a0dd1b7
BLAKE2b-256 48a52c39e51d4500e016f74959283b30601f1a338b34735ec334161f49529c11

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.8.1-cp312-abi3-win_amd64.whl:

Publisher: release-python.yml on cobre-rs/cobre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cobre_python-0.8.1-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.8.1-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4789b131b028c308eb9d69f35ee21c6a01084f09ba1c7a9e674505406496ef17
MD5 8d139b16d55de7d539e9670166852611
BLAKE2b-256 978cc61348abecc06b148529f1c1f37a11c3b129bb1d6653da8c5ced041a1042

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.8.1-cp312-abi3-musllinux_1_2_x86_64.whl:

Publisher: release-python.yml on cobre-rs/cobre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cobre_python-0.8.1-cp312-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.8.1-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 132a543cb2c6be5837ec44d027228425623928cbd1424bb4a200e8f1b416fb97
MD5 822afb1daada4e9f7afbba9713601876
BLAKE2b-256 c968fe1dc15d0e94560be38a1ef2b7ba7f8a608b44c0489b6d60e5955a069e7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.8.1-cp312-abi3-manylinux_2_34_x86_64.whl:

Publisher: release-python.yml on cobre-rs/cobre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cobre_python-0.8.1-cp312-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cobre_python-0.8.1-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 834e7483e5bddd05dffbc9b0307f4d207852aa5a461ce1c1dfae6285d2425f08
MD5 bfac39893850f99e445d084fc1b4bf71
BLAKE2b-256 5b046df73caf424961182c07f98ac11bdb0e3d1d803e95b2dfd7f1e7b59d1a92

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.8.1-cp312-abi3-manylinux_2_28_aarch64.whl:

Publisher: release-python.yml on cobre-rs/cobre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cobre_python-0.8.1-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cobre_python-0.8.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 99da81c462c7985c321bcfb2736401ee3614d6319a0463a5b026e16717e4677d
MD5 de2bfc6c43ee30e2ba02726599388a0f
BLAKE2b-256 43e9d2c0474d6999d3511fdf4dca0a2fbf9ff00c2812b1c9f503dbed91e36f91

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.8.1-cp312-abi3-macosx_11_0_arm64.whl:

Publisher: release-python.yml on cobre-rs/cobre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cobre_python-0.8.1-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.8.1-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a2ed4685bf1a6f88f18a497a1149e6bd33f636a8e8118c6a614b4c1268dbd873
MD5 df51c8856ac9ca95407a631b245f4bb7
BLAKE2b-256 232665eea55a8b6f68e6b12341b436688973c7854e9a89624609b6bc5d79a716

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.8.1-cp312-abi3-macosx_10_12_x86_64.whl:

Publisher: release-python.yml on cobre-rs/cobre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page