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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.4.2-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.2-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.2-cp312-abi3-manylinux_2_28_aarch64.whl (7.1 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.4.2-cp312-abi3-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.4.2-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.2-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: cobre_python-0.4.2-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.2-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 150fd41b37004602a3ea81b2d56da2e428a2befbf63d63a182a0e83a8a7605e3
MD5 ec11129f59c4aa1e81146a79959dc441
BLAKE2b-256 1f6cf03f0c8e5c4a6107632613ac0fa76ba623f9cb1eaf2a2d6278e50bc06f22

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.2-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fc86e3e467d94190a62cc03ef8f3afdfe9caa367d2da1b8ef0cd2635ff080fe3
MD5 a6b6baefa9699e7a1dc5ab2a90ed09ac
BLAKE2b-256 3902ea29df0c9035b89bc1754da8a97df956e85f20b816e719918193a910f9ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.2-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5c44a86dd196a29819a0dd09c44865649da21566f31d9eb346cb8727e83e6c5c
MD5 c4ae311d9563e50cf8718e0f29fbf783
BLAKE2b-256 2f181111101365f016b9a1cf65b2fd1490aae45527ea0e6f10987e26b3986696

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.2-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c7d9dc2e061c625e5017e53f76fde6df75d09897014ae79d95fcd326a9bd1ede
MD5 f1b209e5d22be885ee4d9201483e7e0a
BLAKE2b-256 99f5c6dbdca1f61ecb89cedfcee1b2f3d9165e1e9e78251b2fdb7ecd471db334

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.2-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92e639d8b9cef673529a224fddef0e1c7053fedfd80c14cced34c11fc1ee73ab
MD5 de9e46a713147eec09b6549e52834169
BLAKE2b-256 371dab8941e21b987c73e20b5ffc958af0024adf125f81d3557f9fdcd18197df

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.2-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ee92e1bbf92394d937aa3e28ad9e6fd4203f59b6fdbb1b1554116b3173351caa
MD5 d63eaf4022a18f7ad2745b1e6c0c6765
BLAKE2b-256 7b62421076e37a04624118b605ea6fdb120e165951ec9c9301493bceb52ff86d

See more details on using hashes here.

Provenance

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