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

Uploaded CPython 3.12+Windows x86-64

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

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.2.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.2.1-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.2.1-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fca0390b4c316dc0a03627d3c2a38b822107635d7e3e0d5ed2d6a248aad50e24
MD5 8531e3bb84edac715013d460c501188f
BLAKE2b-256 fe4abe43ed38c7700868468424b2271183285c0de28e38129a936795778ee9a8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.1-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 05b469db804a345f05ab8b1338b973927ecbdff452f4734df5089bf1c1faa0f0
MD5 7d0862e8d65608ae18836e81078368cf
BLAKE2b-256 cd60903daf643adf8f0d0376e1a313016b47bc1f2e4118331b9389efeb1a41d2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.1-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bff84865fdc66d1c94c39aac690a502a3b690d9dde1b58177acd4fa5f2c34501
MD5 dc74450f132535c955caffee313c479c
BLAKE2b-256 f76fb500fca126f5b218fd84506c3c5a676ea1cbf7bdc8c02fa47a47d4a76647

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 7c42bd0d50b967da6a8715dbe73ec4c313db0359fa609f9f5d04c9d2c4289672
MD5 d2fe1c4084ef13227ceaeeb3bb856d71
BLAKE2b-256 16bd59e56ab359ce64fd35e86bf712799f1294094e9ff166f45ab9b856c22ae4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.1-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a0db2c9ae5979e9db3a8a5c96361ca2abbf991e350a93c0977e7ddcb33a3b54b
MD5 d70c652fc1daf18231d9a75b30f660f0
BLAKE2b-256 1fd343b7ec6bf344b96ae2e6d3f6ba1e28a1d8afa0b92f77411bef744ae0cfc1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.1-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b18051861687ab81d48e3cc9cd7faa2951929fad79f8bf92e43923e5c9fed114
MD5 4b8a4a0ca257c6c95cf31c19435f3eb3
BLAKE2b-256 f5fa0363f769e573cbac0a5d06d6318489b25268b6b9dcb23ccdc7e2362a8c2a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.1-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 22a026a58ea588703e96094373c9bf903bfd8ffa2fd3ae0a08cce3246dc9bf88
MD5 79e1f6434f132dee4f5d73e38bcd8a51
BLAKE2b-256 2634affddfaf8d7ed1fd500b2750d73d317e9f0ce530d304d35b8cd3f1170b3d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9b0d71115d313bdc614df430a456d6d6a2324905e100c90fff5239269ad3e27b
MD5 22cbb1b0ae223151be65af5fc514b8d3
BLAKE2b-256 6fe4270cdfdda1a5c00f59f2e4347172bb1775c46bb7330f39bbd85beeb759f5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.2.1-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7cd7cb431a72966fc286eff314ecf68b5d8ee792f02e2ecb193f2722876b23fe
MD5 ab9092d2650fd36dc3b7557875511a29
BLAKE2b-256 144bfcecdbbef5011fb0c6d07a8698b3283a1df31882a9b6a05549c03759e69a

See more details on using hashes here.

Provenance

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