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

Uploaded PyPymusllinux: musl 1.2+ x86-64

cobre_python-0.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl (14.0 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

cobre_python-0.4.0-cp313-cp313t-musllinux_1_2_x86_64.whl (14.0 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ x86-64

cobre_python-0.4.0-cp312-abi3-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.4.0-cp312-abi3-musllinux_1_2_x86_64.whl (14.0 MB view details)

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

cobre_python-0.4.0-cp312-abi3-manylinux_2_34_x86_64.whl (7.4 MB view details)

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

cobre_python-0.4.0-cp312-abi3-manylinux_2_28_aarch64.whl (7.1 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.4.0-cp312-abi3-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file cobre_python-0.4.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.4.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f084cfdea93353b17e6ab42b71a24d01157f9c1c53cd44ad2e428a26d78be738
MD5 ba21b345090f4c5be60707ee19d278bf
BLAKE2b-256 6577e6ac1343cec5530212eb38f46abf3dc2f2102f2753980ecd93073e69fdc8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5197ebb67c180b8cfae928c91611584e284a6a76ac734e11bc81f5023bc498d0
MD5 c778e6bffc5d8e7e18cdc7f0aed59c11
BLAKE2b-256 d7536921f5b29bff92fe03da12e25d52bee20c2710f2539453b3f19ff8b0e205

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.0-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e58a94d60712d6844d06b384caf7fc9c779ed1e11daa168bd191c33071939757
MD5 e8564e6848f5c77d586111122df016bd
BLAKE2b-256 00a4725d781ce516d8372580a37f4452ebf2c40b4fbcd7d0f3e739dab2a5e2ab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 edfa9efd5ffd421d78354664fc2b4ace83d361c646604ccce44c3320d02b7193
MD5 fcb87a89e87d45160021673ae7aa8e89
BLAKE2b-256 c5728d8e4d68499a2e8627af434cbce1763a61dcfdca5465d99caec610bd33ae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7d642c5482c7f35389ac77573577136d5ec758620632a35c4cd2f06ccca9f8b1
MD5 f6e4514ca33eaeadd0f55260e866cc3d
BLAKE2b-256 a6991fd46215309c3c6628559c0b3900f992938b738e73b287f49b7b7844cabc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c8b9e9c0c12937263f7823b110f0188a4a06f5c5e5c29d43b3acd1174fdd2731
MD5 778167243add0fd0ecdee5b252bec9bd
BLAKE2b-256 5583459bd00c65033d077b2337597c3809d8858a11b1ceb740b535b18f901eed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 adbed9ab49cbb6f9a28fa92f4c034d97d9a3c5f9ef51cb5e5dcb844bff1750ae
MD5 9ddbf87f6e62be375069196a81e33f91
BLAKE2b-256 04d5503a7555fb12cefc8a2ff7e2d2c4afdbd1808122d547d6b2b84d5b941720

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 322416c3e281ca96aeb893f88b5ecec19d9941fd3ddaeb8216ae217537da02c0
MD5 77275ceca0588a67c7d6a6eb512b29bd
BLAKE2b-256 294c8443f5f2158d7ead69bbbbc63ff198b615228fe14af6d7f4bfa2aa0026a0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7cfe83919f5bfaae8a64fd187c10259496f41f49e015225479db2aa9625da60a
MD5 7516f1aa907d81d1f277799d83c2aefb
BLAKE2b-256 d23533a1793c5ed945532e8a81089a4afd1bba8979cc2939d92c310289c55f1e

See more details on using hashes here.

Provenance

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