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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.6.2-cp312-abi3-musllinux_1_2_x86_64.whl (14.3 MB view details)

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

cobre_python-0.6.2-cp312-abi3-manylinux_2_34_x86_64.whl (7.7 MB view details)

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

cobre_python-0.6.2-cp312-abi3-manylinux_2_28_aarch64.whl (7.4 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.6.2-cp312-abi3-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.6.2-cp312-abi3-macosx_10_12_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: cobre_python-0.6.2-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.4 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.6.2-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4ae69272178a03df71f582e1492906076e2c96d68ef423e71bd1e903ad059c56
MD5 501ed9b5bb97b9af9f6bfe47fc99641f
BLAKE2b-256 d82580c6e1b63721df15102d17fa7d83e05b984f5628094378efddd91571ebe9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.2-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fdf1fe5549f7181978829b74dc9af6ba5bb954a29ec565c7d506de3feb8d26d0
MD5 ce71491025a175ece6497044af83622f
BLAKE2b-256 cb887ac6a3c90070a6e9be4ffadd8bf9c7e37daf2bb110d8635920e73d3aa61f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.2-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 86ff29b80dfb8c9c74dbeb69175666e7c45a42db611402b7c2557a8812ee1478
MD5 7d6733e45b5b03e63262f5d65ee9a1c4
BLAKE2b-256 faa8288c39dcb946c073cf3dc39da6da7867fb14a8042bda48da32d987c853e1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.2-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ccdbe4fc203116cf4f74883ebc32c6b46ed6eff05196d87b447a4ab149aaaa68
MD5 aed573446e80805bfab4600270509778
BLAKE2b-256 0f9b16e24b834ed92f96c48e33ee1b3d27c98796b42092ee0865ff667eaa323e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.2-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7f94468ad0da31ec3ceb7958358193e38d6bfeb0aac39b2440d15412bfa237d0
MD5 ebbe2c480046bf8e66bb53784f6db950
BLAKE2b-256 212668ee8eaeae340349dfb07ef799c4552f2b872ce8fa6e90b744c78cf5f58b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.2-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1aba8c55ccb4429504302b1ce4dea1bc1b5c0b5121ac4823256610ed8977454c
MD5 8b95b707da34871db2cca3a1f7b0b0f6
BLAKE2b-256 c17e9679eb61cd6b6512f4c4db4b391fe686735a564478cc5e88cb9bfa527cc5

See more details on using hashes here.

Provenance

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