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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.7.0-cp312-abi3-musllinux_1_2_x86_64.whl (14.3 MB view details)

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

cobre_python-0.7.0-cp312-abi3-manylinux_2_34_x86_64.whl (7.7 MB view details)

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

cobre_python-0.7.0-cp312-abi3-manylinux_2_28_aarch64.whl (7.5 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.7.0-cp312-abi3-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.7.0-cp312-abi3-macosx_10_12_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file cobre_python-0.7.0-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: cobre_python-0.7.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.4 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.7.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9f489405fb42137bfa6be40df5d85ad6ac53ec62c963b0e187ea69292e491a33
MD5 3302450c2460c0740060a2985f7381ee
BLAKE2b-256 0aeea3b47d915b9a4c6e876dcf2609ca96e70102a0621e408cb6d6f1c650f14e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.7.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 072bf14ecb3ce649551d4c7da988fca8e492b5d32756e7e64401efa77107a736
MD5 2454c3806ecd73296126cbf198cae687
BLAKE2b-256 ef546541f4cf852406571a47066e30ae26d3e9662dfb71590ef0f3d3bb63e807

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.7.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a2f03fba41d63919cf24529f34c57a7df2d67ed84bacea50e96deaf50c55ad8f
MD5 88931a2a660dcec0fd30cc47ee455b2e
BLAKE2b-256 ff0372c604a843b90ff2a7ae0ac6ca386e3c509206ddc210d16aff5f2a9510dd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.7.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5c2177a4fd53c62dc4b9ccac668f01052b2ab81f403eb4c3284e6e67ba9060c3
MD5 607d740a0556fb9e525c2ae98a74cdb4
BLAKE2b-256 b3cf93af2f71e5f8dffd4dc65d6723eb2b59a1bba65b45075be94d0809bdb764

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.7.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 feef3f667ef368f3b87fcbc0e8ad8aaf9aff8772c4f940d59ab361f0a71fda24
MD5 45bbee5da97460df95a7911875694df1
BLAKE2b-256 db85a68257ac30b096231947ce2f852ba78cb6cfb5558ddfc977fc980b7d0987

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.7.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2837ed0f95798e89cd7c3bc6b7e32008cec1c59d918a34ec5babf1c4e12691a4
MD5 f166e77678f2fcc9282b6e6c8a793510
BLAKE2b-256 0082056afa4ce7ba78177e7f6bfd943fcfa13485123a28955617bc9727430837

See more details on using hashes here.

Provenance

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