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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.12.0-cp312-abi3-musllinux_1_2_x86_64.whl (15.2 MB view details)

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

cobre_python-0.12.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.12.0-cp312-abi3-manylinux_2_28_aarch64.whl (8.3 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.12.0-cp312-abi3-macosx_10_12_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for cobre_python-0.12.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9e6c42a50aeefa30e455d6f17b862ba81c572defdd3ec56c09b8785c468197da
MD5 e8809416f879b5263baf26ef531e0411
BLAKE2b-256 4b5a31da9ab8c9b45c158b21fcf595a0000227de80ab434c79b90dd029b5b040

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.12.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 560fb9dba7741e60ba7c7ea8b552bf97759469b2ed988243f6c372e2c80efe94
MD5 74c2a8a3c46621123a0b5659f57f039b
BLAKE2b-256 0413fe218d043f4934fde41266d7d3976a07ccb61fadba9ee79b7bcab0d1c101

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.12.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d46b88c33a109e3e0ee4641af2286d827cc3befd6d45d6b994f2787e96a5c81a
MD5 72c4c669df528fe457466dd04318e620
BLAKE2b-256 09b84fcffda8c8bfcaaacec33201cbee12d5b6ebe008b6696a6bc3ad15b435a5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.12.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ab5d36a7d28c4d366377b32945a46304ffb62373b3ed64ada41c21831dfe24d0
MD5 417e341e036ce094ea261337d33cbd1e
BLAKE2b-256 ea50480d62252556cbfad1f4f8c1d036761aa613e99fdd0edd4179e1c97bc573

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.12.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ea0fefca36f3d66f15a745625234f6cf94d6808ebb7ea4d11c0ed85fd48c310f
MD5 02cbeba6f7bda7466a9b2a01e9f7d797
BLAKE2b-256 9e5a4c61a4f9f6c2f46851dfd96abe4cb0ec20da358c1fcf929ff1cbe152fe0a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.12.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b6bd17a6fa91966a411ee6756747a3b78eeb9f5dc0c124bd8ef84762b0fd7b21
MD5 6ea361635b5cd17e2711a4dfdd1d8ecf
BLAKE2b-256 3360065d05174b66c73622e379af137742fe1a5b528637171c5321b320f2ed5f

See more details on using hashes here.

Provenance

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