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

Uploaded PyPymusllinux: musl 1.2+ x86-64

cobre_python-0.1.11-cp314-cp314t-musllinux_1_2_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

cobre_python-0.1.11-cp313-cp313t-musllinux_1_2_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ x86-64

cobre_python-0.1.11-cp312-abi3-win_amd64.whl (5.2 MB view details)

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.1.11-cp312-abi3-musllinux_1_2_x86_64.whl (13.0 MB view details)

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

cobre_python-0.1.11-cp312-abi3-manylinux_2_34_x86_64.whl (6.6 MB view details)

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

cobre_python-0.1.11-cp312-abi3-manylinux_2_28_aarch64.whl (6.2 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.1.11-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.1.11-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.1.11-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c1d71b06bc10cf1a83967df448dd627a6de1438aaf59f3087caad34691eef32e
MD5 9c6c2328b279c835f63c4028dfeb7a40
BLAKE2b-256 eec4522fcf6f110499e0803d1b25e81b6d8eda1d6905a147b802d21de0a9d927

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.1.11-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 99705b5ba249a302828e2abf29cd0a3bd4a52262a705f8134ef5172a2c247a34
MD5 35957604e9ae7499a423f8dfcacc94dd
BLAKE2b-256 393dcb471ca1165cd04e36695942ae8097425a1462606ca55db15be5e38af3d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.1.11-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1d77babf39ab6af75843e797ed2c374ca66a8f0ab81d7d74564b2a52321e20af
MD5 76b963466a0a6c36ec8b943127bc422e
BLAKE2b-256 eda4f8e3a0f2ab12ca1d96c3713d05f199589dd970a55e763050114f438c49de

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.1.11-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 759cf9d4b50260a1e281c885f8786f35cd0c7ee2b54b35e74feadf173f5eb572
MD5 235d6c6ef0926aa85e3f3ad6a6134c18
BLAKE2b-256 2851198bbe6750cd67b155a13359e65b609682e95d90932d3022094521380362

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.1.11-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2fdcc6353d860c70fbab8a1499451214c60e86bbb31e20ece93d3ca3725d4582
MD5 6696dff240a4cd6d553ff192b11d06eb
BLAKE2b-256 881c12e4d0290a0a7b29acacf5a8ad463bd0d71e22d7825b55e81eafc4abebc0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.1.11-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9152e84859379de9039c2869c414f996372ad58b730c962704848752abbb6461
MD5 c382fc769dbb044a417b168fb3f5f654
BLAKE2b-256 bd222a689d70e2ab8b5d69cf7c352fcf6ece8e342f40950817583bc5eb5ac31d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.1.11-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0fc3110fc09f1f3d1e28515268a44c3486d46a8a037388b1ed842c2292137760
MD5 b6bdc3b39b020b3b556e24e7c6ed7f40
BLAKE2b-256 bcd731fa83009df88763d4860e0e8f8b5c334bf9d0816738ffa4b67fad32a6a8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.1.11-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 93881aa3c09adfe65fdea3fc24b2654ee36195a4ec00fa286c8c5021583a6b8c
MD5 988efdf934cba460650a36daf7946bd3
BLAKE2b-256 fc21744d4fd046ffe7710adead650075729ab16f4e424caa130f22797f03068c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.1.11-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b3447a3c69fa4ef1260f26967588d6de9150fb1aeb526b2ade88f7fa8cb8cbbe
MD5 bfb1633b377c7217b9c6a06b86743d42
BLAKE2b-256 c9e0d92b8fb2ad140a298d77d5ba3a7814e30a48a6f25b2382bb5be9c8d2275c

See more details on using hashes here.

Provenance

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