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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.5.0-cp312-abi3-musllinux_1_2_x86_64.whl (14.1 MB view details)

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

cobre_python-0.5.0-cp312-abi3-manylinux_2_34_x86_64.whl (7.5 MB view details)

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

cobre_python-0.5.0-cp312-abi3-manylinux_2_28_aarch64.whl (7.3 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.5.0-cp312-abi3-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.5.0-cp312-abi3-macosx_10_12_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: cobre_python-0.5.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.2 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.5.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c0e97fa881d426c9265642b67bb29d047cff8249736c1c43b6b46aaae6612b83
MD5 dcf3b7f93ec650adcb1808978432c1ce
BLAKE2b-256 59e2f8d7ebc7e95be80415976e462159c05f59cd84147df51714dc220a3c125c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.5.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5f5827ec424ff16f2024e06b98573a546ae1793cdc5f8b9244c630e0c413582b
MD5 d51d797a4b9d64506259842cb026f9a1
BLAKE2b-256 3c58aa3cf217c498d6d8541fcf8d4592d496b689ec9393c93a9a8467628003be

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.5.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7554e4024c48e1759c1a561486ce8ae176b86384ef82e59068fd4957555e2bb3
MD5 bd32897d3fd194042da66680d895e028
BLAKE2b-256 0b0d7d2e2862493bfb93a96c0571c1cc25ef597a736f9136a2d60af4681a8ef7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.5.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6e01f943fed5366d2f47908fd9fcee29e1ebd20e0654b73e885ae3cdedf7269e
MD5 2e5db1ff4b25baf25b3dda74b89d475e
BLAKE2b-256 d696e6f9bb868e1e342e6c38b3c6267524f68a8792bcb72c56261852f1f87cca

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.5.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b85c5cc4483096f16d612e853d3f76644a28a2999e866cbf19425436e457697a
MD5 53823953560475b34206f3d4dc86b972
BLAKE2b-256 18a4091b0bca8dca03822889de37cf3b105be5543f2ac0b8927d8615d2e20bb8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.5.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0665782c13e36ccd2d1b98b28d2af9770dd3a66390d0dd705719a95da3fac28e
MD5 58e5d29abd865d883fd000fd992ed947
BLAKE2b-256 d40b57219c1a7fbd7bb57b3a24d9ab3d1cb08b08a6a3065c5c5c3c7714ca8e64

See more details on using hashes here.

Provenance

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