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
cobre.run.run("path/to/case", output_dir="output/")

# Inspect convergence and simulation results
convergence = cobre.results.load_convergence("output/")
print(f"Converged after {len(convergence)} iterations")

simulation = cobre.results.load_simulation("output/")
print(f"Stages: {simulation.n_stages}, Scenarios: {simulation.n_scenarios}")

# Read the saved policy (FlatBuffers FCF checkpoint)
policy = cobre.results.load_policy("output/policy.fcf")
print(f"Policy cuts: {policy.n_cuts}")

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.1.10-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl (13.0 MB view details)

Uploaded PyPymusllinux: musl 1.2+ x86-64

cobre_python-0.1.10-cp314-cp314t-musllinux_1_2_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

cobre_python-0.1.10-cp313-cp313t-musllinux_1_2_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ x86-64

cobre_python-0.1.10-cp312-abi3-win_amd64.whl (5.1 MB view details)

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.1.10-cp312-abi3-musllinux_1_2_x86_64.whl (13.0 MB view details)

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

cobre_python-0.1.10-cp312-abi3-manylinux_2_34_x86_64.whl (6.6 MB view details)

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

cobre_python-0.1.10-cp312-abi3-manylinux_2_28_aarch64.whl (6.2 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.1.10-cp312-abi3-macosx_11_0_arm64.whl (5.4 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.1.10-cp312-abi3-macosx_10_12_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file cobre_python-0.1.10-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.1.10-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5450a458b8176705cced73a655d3fa8f88b7a732b36bfffaea267f2f7ffb8d90
MD5 1453acbbe6808396fedb5079b4da519a
BLAKE2b-256 2268dfb611d8e8b9789a81ab57799b0bec7764f065ddeed88cdbe969c681d5f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.1.10-pp311-pypy311_pp73-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.1.10-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.1.10-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d98d6f135b2b084c04e73e23dc72f3255ae4f13b4d84bc633e1194b9d2374531
MD5 f050899a71dbb1fa95bf621ab815878a
BLAKE2b-256 d82dc8d86632802514e1e906d9638235a4b2ef21de3a05cda4bbcc019dfa9cc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.1.10-cp314-cp314t-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.1.10-cp313-cp313t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.1.10-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ba4c80ade1c3de4fa3031bd3014661a316decae16bcba65052293e11533b3366
MD5 d622f5986c54cedb398a5f6fe88e9a41
BLAKE2b-256 1b36036d8753dc00bac54994ced290bedfe24c7d72042fce4ce596e783c78674

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.1.10-cp313-cp313t-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.1.10-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for cobre_python-0.1.10-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9178548e5a0f45660212c7f6e98abc1f2179bfecd969cb61c3231637829a02fd
MD5 8d53d399abcd621d5d9f4a57f7665441
BLAKE2b-256 09461d960bd210db8d43183988548a23cbfa57c7778f51d56e1cbdc3c4c42f71

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.1.10-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.1.10-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.1.10-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4d52038bf49721c58c5c28f5e95cea1f849551752704522f0eb45cc788407518
MD5 d95fc9d301d33f2abebe00efbf8f389e
BLAKE2b-256 3a43957cce227f51a3b4b817d1ba53a127b782f3ce78cad2f7600f11e7013835

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.1.10-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.1.10-cp312-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.1.10-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9ef05a4091a1dba4020a8c3e894bca8a3f6194279407255980be3741c7cbadc8
MD5 eca4f74d21a2fce28f73d43932648e2b
BLAKE2b-256 8108372d3a5db465b1d1afcf9a713d1ac990ef377bd24f66a764abad657d3fef

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.1.10-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.1.10-cp312-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cobre_python-0.1.10-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e2fde43a0874bdfbf77200684ad6b46436a48bd077d8c8218186caa6cf37763b
MD5 b05e7a7ab64ab6dbf9e54563062fc167
BLAKE2b-256 c53443a1a0f12eb667923834ff7e1a89a66f03972ece4e6236748a33cb22a88b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.1.10-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.1.10-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cobre_python-0.1.10-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4967e380408671f53c17974a1c8566a480d9be29689ef17db739d7fb1a285046
MD5 a49a2105061030699eef724533e68e4b
BLAKE2b-256 d2c4f1e6d60292478805ed68541a51b2de689f1dbc9d0c2958eddef3bd5c54f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.1.10-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.1.10-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.1.10-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 78e191cd6c62deef1c5e6a3dc46c513cabb79b4b555878f4e486460928fb89b0
MD5 e71c832bb82738776bc2632f1c932444
BLAKE2b-256 d64da1a24d5128fcb47dd9d3c402659d3ade1b7cf28fb885ccaba15be67eb18f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.1.10-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