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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.8.0-cp312-abi3-musllinux_1_2_x86_64.whl (14.8 MB view details)

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

cobre_python-0.8.0-cp312-abi3-manylinux_2_34_x86_64.whl (8.3 MB view details)

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

cobre_python-0.8.0-cp312-abi3-manylinux_2_28_aarch64.whl (7.9 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.8.0-cp312-abi3-macosx_11_0_arm64.whl (7.1 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.8.0-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.0-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for cobre_python-0.8.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9e71c202a3b94fc0040b25634c040aa7d355b6afd21531dfe57719b171d32ae3
MD5 6a1a3ed69404dc869ba2bead898757a2
BLAKE2b-256 5dddcfee06eafac7010e849f1c157f31885b8418301db68db5c84e868628656d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.8.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 87f6ebcd9dd36a5e0c2825fbcd88b380cbafd2c91509d758e0e221e21c371097
MD5 ea0c3dd203cb95ae0b5294be6479e351
BLAKE2b-256 c6d903315f702fac2d540d0c9bd0f9fb2e54ab3b73b1ab6fd5ace0573e3354c6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.8.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3fb8373b8edde95777eb2094c5a4261b744dd70b28ccca4170b1dd56a0dc0fa1
MD5 d0450226c86f78e851839e280c3f1a93
BLAKE2b-256 a676afb028d6b5a87802c676cc74a781a7e1d0129bc4ef0e2fae14e62b9a2079

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.8.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 27efbfd5dc9e053368f7dfb60c6526959a191ceacc6c0afaf879a00692daf184
MD5 b85738fc5a85431ba29723e30fca9bb4
BLAKE2b-256 cab99b9ef557243f97ec0331759a99e9eaed7f4ab5eadd8c3e88c0fed77bda84

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.8.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 22a61e4ae77d82351a8c97f7bb00483b0517b10365831bdcb385160a13f96209
MD5 59f8817b5282a95573b9aed3aceec437
BLAKE2b-256 3db6aeb54979812cd99f1dfac4926fbefdfa7b70409b78fa9865b1e62eb04943

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.8.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9d3a87a6125299e173139c9ca45abd902bed056e9553df86d98285e89133eb4e
MD5 e808aa3d883c6ae6a37cccea13c15d9a
BLAKE2b-256 19e645302284c395424bb53576d1cd6997d22bb7f0ed33cb9900a55a02760009

See more details on using hashes here.

Provenance

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