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.4.4-cp312-abi3-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.4.4-cp312-abi3-musllinux_1_2_x86_64.whl (14.0 MB view details)

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

cobre_python-0.4.4-cp312-abi3-manylinux_2_34_x86_64.whl (7.4 MB view details)

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

cobre_python-0.4.4-cp312-abi3-manylinux_2_28_aarch64.whl (7.2 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.4.4-cp312-abi3-macosx_11_0_arm64.whl (6.4 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.4.4-cp312-abi3-macosx_10_12_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: cobre_python-0.4.4-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.1 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.4.4-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2065e192211dd4db4b20bad4556489b6756ec94628e8822270acac13b6cbfc74
MD5 328cc5e96e25eb010a72b0d95560524a
BLAKE2b-256 6d1288a3d1a25db04b1a833831abd17ce6e3dc18dc4a704e3eda062c58de3ad6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.4-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7eddd5c27f0b147010f7c19a22223ae26a7cdda8bae6e29f280a06991b2baf52
MD5 be5701ab1ff007dee02c9973345345a7
BLAKE2b-256 7ba990a906904eca2a668e30d41b43e10354cf57497b2c9a117ff52f5029bdfb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.4-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 310c8d254b2f9faa813e2447bff37c6dd1b8ab76b99d6b7da12ffb0fc92fa384
MD5 2db5f35bdd21109c955cad7b29045a57
BLAKE2b-256 f33a424ed7d9493c5ac06791b1d8a8c1df5a306571cbfcafd918ba5b5dea4b01

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.4-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5e1f9206e0b75983fc7d74f94e90d7217ddde0cb1b00bbcc75d9738405c48cc1
MD5 2456669adbfed44c1cf023ff7971e048
BLAKE2b-256 ddeea952d860fa4224caf4e991b14f764f892f4c7fdf09c786d188ae9c7df947

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.4-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9bb6dd54155896de1b705cfe2f8940fb278a7377ce6142e78751ea786cab0595
MD5 8f0e32d356150f2488ccad7b601d4500
BLAKE2b-256 c504dc91586475666337a032d7c70a3d6f1dcad4942bfb4db0716eecaa30b90f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.4-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 17767611f6904d084af4d7195da731a5376b0449a4f00614f345bdd3edcc44d1
MD5 8dceb8bd8227535b63e03e2847d9a985
BLAKE2b-256 1348a40fd7b4a52ea575107ca8b5b264ea17b3b14c43ca0dc5ad055e52ccd6ce

See more details on using hashes here.

Provenance

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