Skip to main content

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

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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.13.0-cp312-abi3-musllinux_1_2_x86_64.whl (15.3 MB view details)

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

cobre_python-0.13.0-cp312-abi3-manylinux_2_34_x86_64.whl (8.9 MB view details)

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

cobre_python-0.13.0-cp312-abi3-manylinux_2_28_aarch64.whl (8.4 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.13.0-cp312-abi3-macosx_11_0_arm64.whl (7.5 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.13.0-cp312-abi3-macosx_10_12_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for cobre_python-0.13.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 59b9b84d3a756b4394009194d7b7300b0503418aa8b9846aab33b97751497207
MD5 5f6d743d3ca9025148430c2b26cdf29f
BLAKE2b-256 c6a6e6123a7c89b019491bd6b47e0de187726da78d98baa0f0746eb1fb6cdc00

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.13.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c5377520eadb3b1f3f986c1a75eabdb42eb890b0588bc589c687130b5e187206
MD5 5139a226d57acf523b7dbd8bb935206d
BLAKE2b-256 0c01ad793c0239ba66fad112e99f7ec2ebd497836680f91c1f261f189bd6ef75

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.13.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 10a0b1905e7d29369d6672d27fad0e106cdd91b15f6874a44617b448c71aba83
MD5 fd08b534683e2aacbeb69b9e1d041374
BLAKE2b-256 8d839fba4495ef0fb05ebb1d7af8a94a3f79b9c9826e4b2ef12559f7d48b2754

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.13.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4c113f91f98d84fe900493a8d56299bf89b63bc345fddb374b1a9aedacf1f6fa
MD5 0493c746d44f6297df4892ff243e2a3f
BLAKE2b-256 daf20f807ae648e4009d2f0ecdb05e77f0c2ba593636444924eeef2960ccbbb3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.13.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e392295bd7d2055b5c67c8f8ee919fd1b8a4a9afebfd02821add77b2a6c5d5d1
MD5 31411b35818337204233e28619f3ad1c
BLAKE2b-256 60aa71f6d389ed32b6a591223c19be2988ed941fa6e778ef0fd78fddcc74762e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.13.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 085f73ed3489ca54d5d812710acd472bb35799a15736cd7e04e4949f10b45517
MD5 79016e50fd0599083b7836ab0c7cd804
BLAKE2b-256 e3032c93960acfcc3515cf7b0e736ad41437c8517e315d80f23fa8bac6545b0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.13.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 Sentry Error logging StatusPage Status page