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.3.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.3.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.3.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.3.0-cp312-abi3-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.3.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.3.0-cp312-abi3-manylinux_2_34_x86_64.whl (6.5 MB view details)

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

cobre_python-0.3.0-cp312-abi3-manylinux_2_28_aarch64.whl (6.3 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.3.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.3.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.3.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e127923ec096255cd9f480f76eed397e29e336887f4741eb1b903b873489b6bf
MD5 0a4b961c5cc087aca11fce090fb0e3c8
BLAKE2b-256 c58ee2ae65a2be30d86328fa2830f00dd8874f99fc511bda0497154bda74e813

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d81b66d9dff89825896a3165be1e26f8aabc4c42361472a94d321afca9371ea6
MD5 2def5544b700fe69eff0f655f7f44c82
BLAKE2b-256 ce64a4370ab0d3160ebcd7d10be6c7128ec54d8f842ddcf829c22b8b2b3ff5f9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.0-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2e61ed0cfe1f8ee44eccd9b502756e5f26912af12377b61492a76f44b1117044
MD5 8671c9f24fb040edcc0b5d342f5629ab
BLAKE2b-256 1d81fdf45dec3e617392b26fd1b55354ebeb5af785be878500e4f850a578a5e4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f1ff9c4e012a83e040a740ea54a5a0f44c5461d42fb6c7408912d76c9575e2a8
MD5 79926cffd5149a4ee18bcb1ab99e516c
BLAKE2b-256 d6ed9c0bd3cd099ef6f9af77a4b10c94e78dd756105e42bf7f063c6d681e81cc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a93f1f89a9ca5f8f41cc5a593e33c38ad377bced0cfe301554482d02ef737220
MD5 bd43670a07ff44456743add671088671
BLAKE2b-256 a6df7c0bb94ae0705b597c7c48f01ca89590b914e0744f5a13c8af4f43c3c1dd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ba9e4021ab80c33c40cbc565eba615e688d1d814b59a4c64d3bc38178abbf6f7
MD5 384ff563a39a3c3792d681bcd802b9e9
BLAKE2b-256 7ec2c062648bf53345bf0f1de8093d53bc5cab68c20e877e0d99ccbdcd7e8ec9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2a34a17621a98d68cd77107fc69a6c55db5e99448a2393a40d49193510eeb671
MD5 04b142b895a04595df18ed3f9224309e
BLAKE2b-256 58e1f898387d82118e786c6a871de27e32eeca2bf4b026ebd08828a50af379b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9aff493db04eb28d6e1fd053c981525260d7b1b6f275cc774cbce05b641f4239
MD5 59f80e7cb23a8108440b68cb18501393
BLAKE2b-256 5c1ae4a71b578ccac5747de8cd03bd40c316703b52816cda00d51deb9f22ecd1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 52b673c1db0bfda495fde0aa5a63f59990ed58d40095eaab93a1e5bf6483ec94
MD5 d59baa92a5cf57924956cd8837c2e1ae
BLAKE2b-256 040f58e3fe824eb103956fba01b790374c0a0fbc9c1870ec0f653adc64cee7cf

See more details on using hashes here.

Provenance

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