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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.3.1-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.1-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.1-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.1-cp312-abi3-macosx_11_0_arm64.whl (5.5 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.3.1-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.1-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.3.1-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f011eae890ef5da6791e598524bcf740ab3b885223ea6a7ffd254f01124a179a
MD5 8adaa6a7ed2f8e8b02dfee56b1d15d92
BLAKE2b-256 4531d79205daa1bde3a1f9d2173aa2e08e07b8ee58e3ac7808640c1348ea5f21

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.1-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4ab190249ec77820a2dcf23e206100fc36f86c1708266eb0f838e6a0551c6587
MD5 fae2eb492e3780e0d84e94b7b6511388
BLAKE2b-256 dadac2ba0c11571ac930f8f1b68fffcf8ff3bf7cc5cd58fc0e2e1acd06be9b67

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.1-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 045eab3ed4ca41131cca58304ea6809c7a20cbf9c50dccbe29b1b157cb197488
MD5 a1924796b4f399d4d7a0e55125736f80
BLAKE2b-256 834544119435d4cfb44643ad7f0781d99634ae29f744d610bc636c8212fb4454

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 56106102e55bc90f46efd8a6031c5eb18cdf784c0d848c0636b84c542e74865d
MD5 7fe01c7704572543c63ec2418798de1f
BLAKE2b-256 433119dec7f23e4200b03a00cd87b5294ac377ea50395f759878dcf831c537b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.1-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f90798ee7089d93640cd56222ae6231e6c03b0f652cb51b05889ed286ecdac7b
MD5 5895d9b69605df8a5d6189c59ae2aba8
BLAKE2b-256 ae081ba9976b13274741912ca3169e7ed5293b69ebac08334e97f888ab7ae6af

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.1-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 93ba224b3c0f268825cadca3aaa995731f7cf643ca5a8dbef388832361a3d9fc
MD5 be5e63f7ec3109272f4ac5fd2acd03c4
BLAKE2b-256 9da226b2f00c7409dd77df79d8e70c91ca1ee2f6f3c4308c84cd2b85218e08c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.1-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e4728ea689ac8b21fb04b3313d4bfb429974f0afd33e62bc8ccaa959378c69b6
MD5 4e94b734657ab2b429598e6ab1303caa
BLAKE2b-256 4e5f629f7ae71750c028d50b580d47a3d070f12e779d83bbcd6a5e505fee6753

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c95dd44640cbb89d68c85167d35fc831a66b1f622f9b27317976bceb47240e82
MD5 a60be711e1b07578f69491f2fa59d403
BLAKE2b-256 320ddc8a35e81378566ab973e11d101471a4cb41155d810ccb5e61e516f88411

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.3.1-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e5a2ac47844ab6ac72db4ff7a341c4e3e51eb61722743af13f5130e93430a9e6
MD5 56d862f486917ef850ac01fa6dfd147f
BLAKE2b-256 1b98b7177aff5b5feeef8540f03b758014dffdc326ebc9e53546fc0e6ff85576

See more details on using hashes here.

Provenance

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