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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.11.0-cp312-abi3-musllinux_1_2_x86_64.whl (15.1 MB view details)

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

cobre_python-0.11.0-cp312-abi3-manylinux_2_34_x86_64.whl (8.7 MB view details)

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

cobre_python-0.11.0-cp312-abi3-manylinux_2_28_aarch64.whl (8.2 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.11.0-cp312-abi3-macosx_11_0_arm64.whl (7.4 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.11.0-cp312-abi3-macosx_10_12_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for cobre_python-0.11.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c43bf2c91fff379fc3cc4eb9e0a34defc43c6d062412a161b7bbeeb1588961ff
MD5 409ad143daa0c6868dcd36a9d5c5485a
BLAKE2b-256 c028549bb792d16e0478c5770a4c2118cc42e34d4677fda0b311d0a2ac90be94

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.11.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b5c2d28c9e1b5db3b5e5bf602c914c15497bf31bda5b72f97f7aecace7000524
MD5 6483fce392d6f631e82d672f2d943564
BLAKE2b-256 1a6e2fbdbc04746064b26a546d3fb0aa9c8cd39686266257fec77859d6f6733f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.11.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 77d4243bacec8b1d5cb27122743761c33bf915e705cb9c4b1f7f2ac9d678c890
MD5 1e28245aa07260582949f73eab433f37
BLAKE2b-256 8a40e3de9b65a838f545a442f0e0f49db179dcdc9b41e5c088b2229147e61ea4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.11.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9f78a5b74d46d37d1d765da11e547ac0cfc26a6958804069c7ab89857a7280f6
MD5 a6a4c1c48a982a8afda47760e157e7f6
BLAKE2b-256 06cb13899b5db139c0447e82af9468e753c78cbc59cdadec61c768be0817eb18

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.11.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 972464bca29ec42f409b07490077b7ece35076d5a045d6eb93630ce31cf418a6
MD5 644d8877d58218ec621987787503d915
BLAKE2b-256 84db3352dbab3e8c7779e026361b918449a30c9d5ef01bed9db6fef4217c06a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.11.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 38dfb22bcd6ad186043ccc9555a032159256150a7d8b85abfb2fd074de97be67
MD5 294d15e9b89c23c517294bdcade29579
BLAKE2b-256 dca89c4a79c47ab622b78784033125f09c1bed853b8a2e44d54aa1528b2d04d6

See more details on using hashes here.

Provenance

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