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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.10.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.10.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.10.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.10.0-cp312-abi3-macosx_11_0_arm64.whl (7.4 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.10.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.10.0-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for cobre_python-0.10.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 ad5863eaf1c03dc4f4f2ce2a69e6e27fec74d8db685ae33d32f5a8699702746d
MD5 b0515d538bcce0e29287f1504197a35a
BLAKE2b-256 11c92f4e22c902e07ab4ab38048befca51367f6b64bd8a587dd4bf5334953955

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.10.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7a2fc5bebb153263d26e580b9d0245225c6714c310b7f73a93b82a96492a8aef
MD5 84f0a4f64e85f6777ce007d2173ee09f
BLAKE2b-256 61257e5ac71e0a80736a78d2be02de01491875ca28290adc7bb3f2180dc79f02

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.10.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2e07b0e21c2ab462d1d9a11ba6f99b3db45905562f16d1ee2dca64ca8ab2f558
MD5 cbf736a479710f7450e929627fa2ea13
BLAKE2b-256 45bc17e0e9f4c09b6c57d8c34559deebb6f4318f103fb5b61028e9c13871b2dd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.10.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9b34dd908646ff99325474e287685cce4cec543e88773018a539879f8e86d6e3
MD5 f23d7484896445755d1d8165c6351596
BLAKE2b-256 43e50435c4ca390f6f12e7aca07826ab7ac613bbd065ddf565ceddb8209c28d3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.10.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 be96fc1200b5cb8a206cbf6838be7f9ed3f1092e6cebfddbe84c3fa8e3772997
MD5 cc2abee7db0ac428e0609d335a1ec34a
BLAKE2b-256 912fa22fa74b52c181cdbd9d07a6e0cd13e2c437041d7dab61a7351187e16aa4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.10.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2c0bcb55672d9855266ce551671b110a2b497d6745c01048c4f2003c8e7c924c
MD5 346103b1b1c3f4c1fab12bfdb91ccafe
BLAKE2b-256 a3a84bb91cc1f83f18ae1f2b89ee071871c17debcbefc2de352e29b021a1dbf9

See more details on using hashes here.

Provenance

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