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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.14.0-cp312-abi3-musllinux_1_2_x86_64.whl (15.7 MB view details)

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

cobre_python-0.14.0-cp312-abi3-manylinux_2_34_x86_64.whl (9.3 MB view details)

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

cobre_python-0.14.0-cp312-abi3-manylinux_2_28_aarch64.whl (8.8 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.14.0-cp312-abi3-macosx_11_0_arm64.whl (7.9 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.14.0-cp312-abi3-macosx_10_12_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for cobre_python-0.14.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6b779632185a9e4c8912d234306a975b2df5ae1abcf3ee52a2c98b23a72fae26
MD5 43db43bf6b84e86ace7811d01e3fc13e
BLAKE2b-256 b6f9b78351c591ae1cf3ac46562ebdae4a616f13dbf752423f85df0fb0f8dd75

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.14.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 513cac4207f0052c226e948f6b91d542aa29bff4ae5cf37e9550715cbba98a2b
MD5 357fa63cbff0ffba049ed92e77254f35
BLAKE2b-256 d4d6e9e05a10db705c8be89f0f3dfae4a95aa7c537b942a2b710501212beedd8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.14.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 26d1f3a9c8201dd485af013ac5b1d8b55032b49f08d2ea012e0fd6950b3ca226
MD5 2fd19ef045ffbf0236f2fbe67108aac9
BLAKE2b-256 7d6cfbe81c654f874b4b85fbad0aac29225f84c79322ef0479c1e895a81e571a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.14.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e6788e172c954477483ec350005b214174142d539ab7129e1badd170c7ecb7a8
MD5 d979f4a53af3bb9d087fe2d54935203f
BLAKE2b-256 bb794eec49991934cf700db55593d1116cb7d4a5882065c0ba488edac98f5151

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.14.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6d2351798ed9c12fd22058e876ed0cc6d2506ecc80adf2479cd10fd1a6526d65
MD5 d8ebee0494871d90431a1106bb006e0f
BLAKE2b-256 f534ecea8ae170bdfd0204027068f36b5d28bee0f46c3fdc9904129ee0153247

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.14.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1f7f90bb98d869b22e2cd8d6765a7c01059dc625e318f2f68e84986805b3b1e8
MD5 c63fdd2d5c683ea9e47b8f2ccb815cea
BLAKE2b-256 da49fe07db9289e81066619316ced74393c30c3ef2a8c7eac21a6afc674ae6c5

See more details on using hashes here.

Provenance

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