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.2.2-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl (13.1 MB view details)

Uploaded PyPymusllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.2.2-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.2.2-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.2.2-cp312-abi3-manylinux_2_28_aarch64.whl (6.3 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.2.2-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.2.2-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.2.2-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6152d48733d8ca1da9472ea719296c26a6df5619e1c590e3ee8b3ae60ffb06d1
MD5 37f5b73770b8c7a3ce8486bcffb5d005
BLAKE2b-256 195ce70a3a4ff10cc8055f733b8df92fd9dbd33498e35cb590ab229fb0b155f5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.2-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cfa64da1c52c702fbe76a8827885b46eb591b768ca3afe0d53e6f99affd5e8c0
MD5 46621ecb755ee669a648bcad0ce619d8
BLAKE2b-256 91c02b39f04bce3cdf8deae30d22ed012ccb143af08ec41e43cff465f3a050a8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.2-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7c93353015d8fbf7d0c94e22f465dd861f28d78f90b6e708be84db7febec7907
MD5 7d7909ab4689a65fb15398e69543862d
BLAKE2b-256 ccba722852a77338243ed7b30297fd0f240ad4d602fdfda4446ddbd8f7486147

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.2-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 de92ed63fd216c443f25cad444e13f7e4509eb67fbe91b82e1c482dad2a8e0cc
MD5 f562b1ba66b7fe3191052b246eaee272
BLAKE2b-256 35e7577b3c0759e899b3099fbe755143163f5557d6074de16777a513c908a44d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.2-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fb213f7cc5211d569b4ab36ecd839184bf57d7e990be4f5078f67778dcb11cd7
MD5 8950c251b76b3f1ef88770ac7e9ba045
BLAKE2b-256 afd3292834b2fefe74b680dbe1e80098307b9adbc2948351741b92adfa4de6da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.2-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 17d70ea1aad425b5e162ab26a35ab6ef877cef94d7cafb088408c4ef8712f5aa
MD5 9275c61937c5e479a1582cf05d3c7210
BLAKE2b-256 c2f17a879c2e5b683415396a5940aaf31a581b284a217139b84fe08a1d6baf01

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.2-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 182d8943920c13b53f225787b6aef5bb4e0ae0031d69a02bac3b13860eec0de0
MD5 8305fc83b239b7d570c67631924ef4e3
BLAKE2b-256 f696e19a88f4bf6cd862816a0fc0f3f024314538f8ba6227afee4551089c0319

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.2-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3cc2d7dd32843f7697a2c2f78cfba52ee443dd4057c7857bcdd5788c537294c7
MD5 b7a1a4a8725b5351d0e02981b1a7f597
BLAKE2b-256 a3eb536b246bb2613c841af0944df8f354905b393da1ea266abc0d79c0072d5a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.2-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 80397577f3a1dd6b9653a88c1cf37b36c41ff0baa84a30ff3a85c8837013731b
MD5 6cc603a570101f1037e00344168b1afe
BLAKE2b-256 e7b6553a1f8473a537fc09581e01c31764b991c0a13e0c1bfcd26c5dfaf4075f

See more details on using hashes here.

Provenance

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