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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.4.3-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.3-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.3-cp312-abi3-manylinux_2_28_aarch64.whl (7.2 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.4.3-cp312-abi3-macosx_11_0_arm64.whl (6.4 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.4.3-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.3-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: cobre_python-0.4.3-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.1 MB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cobre_python-0.4.3-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 62613b90510769cf5926d1a9c511fb454134a0817c870861ea9dec0cd0577b58
MD5 b7696d37cfbae095a47952e90ba7c1f5
BLAKE2b-256 9eaf38a37f3890ebf61085b3c2f0484845459ac3f891b87921611eb3a5f529a4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.3-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7c38c96e83d6ae945c6ad63072e319846a7c5b92fd2e4a8a84a7cc5dc354f986
MD5 847e3d2543cdc5967f8c96c1a22d1fb2
BLAKE2b-256 ecb58a660ab3abb50a5648d974d483851a24c99275a99f23c6a0e0745ee643b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.3-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f24b19652c410b02379a74e3c06f392909224b0489049d5233c16199cc3abbf2
MD5 c7c4b26e8842f34db245cae780e11d15
BLAKE2b-256 b99aee08a0701aa99cf94ef4904eeabbc491e5cd4aadb85344085b4aa0e12011

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.3-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fc22da287410641abe2a82d8ff24eaa2d73bd08dfb3596382902420ddd47b6e3
MD5 4a3ee8ef122add8f7a415e6b74072834
BLAKE2b-256 2db24c208712f5045e9b3b23584788fec00c44c7a2d561a83035b401e50d8a85

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.3-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4a0ae3e6c0f40d918c5cef244649559cca0d4effc418e11d69a624ee321cf386
MD5 77d54d9e2b19277b68982340eff0e046
BLAKE2b-256 259ffa417fe5e2b945258284dcc41ab10a1eea9cbf079770d8f6ce7faf3850fc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.3-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6aa85f78e8b7875c3d7db0e86db5d814de8d7feacf0869984e4bbbf46c9b0ff7
MD5 9c856bf6ec1c6187ca80c769ccaf9f38
BLAKE2b-256 911a26b3192999336491efe00ce804b9cc88071c57046513aeeb8b6bf2b48234

See more details on using hashes here.

Provenance

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