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

Uploaded PyPymusllinux: musl 1.2+ x86-64

cobre_python-0.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl (13.1 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

cobre_python-0.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl (13.1 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ x86-64

cobre_python-0.2.0-cp312-abi3-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.2.0-cp312-abi3-musllinux_1_2_x86_64.whl (13.1 MB view details)

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

cobre_python-0.2.0-cp312-abi3-manylinux_2_34_x86_64.whl (6.7 MB view details)

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

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

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.2.0-cp312-abi3-macosx_11_0_arm64.whl (5.5 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.2.0-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.2.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.2.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0b1c5e61e4dad22e2c9fc4e847a78f7bbc3e9d370937383507131ddae28dd47d
MD5 8b9394456f7354e098c223d7d1f1dadd
BLAKE2b-256 10e3e6cced283e51bb2696be12e13451c7ef757302356b0bc7a08ad8326a8dad

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.2.0-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.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4aa360ef0478261b0365298e12252f15501dc29fdb6126115f2e87d1bf5bb696
MD5 8d9e4d5dbfba26505c0fc5427df06e0e
BLAKE2b-256 d0b61316995ad329a2b1514653ba7e0b4a339b983ac12d44b2c791ddc67d4f07

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.2.0-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.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3d665448acb79dd0d40cd01160b7c20f73ee0357b600fce0253d154113992d24
MD5 dc3bd172b3a8015d42ebab4d76416cd0
BLAKE2b-256 26e7f4451029ae0ed3d4df2dd1c145fe37e8883b412fa77b40e7fd8b355a3354

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.2.0-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.2.0-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for cobre_python-0.2.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e75b9f15bbeade46f36f737ba6a945d683d383721a6c9a56115d499d7fa56c6e
MD5 e92a1da7d29c385ceb65f3465a9852f5
BLAKE2b-256 1cc8ff45bb20b97305d52930f0e6c999fb7708e969d675571696203a5768d275

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 935d87674959cf09971aa81add0da6a64631b9305476715e9e00ef69eff531bc
MD5 ca7b36920b340393786112513ec01c32
BLAKE2b-256 1badedfd2955d38079a29657d9240dff383eb9afe0915e2332101924fc06c733

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ef5e7cf948ddd9216d9bf6d19eb5f4732a540a022c2567f21bacbd48b952dc64
MD5 0d0763cd308ebe30445b5ef8fb51134e
BLAKE2b-256 44ac7e2bf8c2f823282eabe19693431e12b4e111c17405e7a201b47cb796608b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 751265fb9bb838455c7b24c9e0d78b12a2e89dd7ed679565bb306033fecab788
MD5 a6261977247a7eaafbeed6866541bc49
BLAKE2b-256 1eb62f96c66c7ac79422be005e665448cbd0b1c34ca7b4dd70f1d3157478d5c1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e11a535687bed2eab1076036b829a8dedc2f6c570d1a840e2eceacefdd2c5c23
MD5 6cc0ed24d227a5091e6e538614336c16
BLAKE2b-256 6081a9078262806a4e4267b5388074f976017d6ccf56beae2a600c1719694cfe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8c623949675b237bb7ac5bfc7a936ae3ef4a59f9bb32344e12eb039095e6dfa3
MD5 e8e84d4cedd129745e4a31f722111c13
BLAKE2b-256 b9635d98812b22473987abf34504cb88a3627c4664674895007927f3062eb657

See more details on using hashes here.

Provenance

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