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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.11.1-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.1-cp312-abi3-manylinux_2_34_x86_64.whl (8.8 MB view details)

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

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

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.11.1-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.1-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for cobre_python-0.11.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f18452aaeb57d6f3f8a5b5afc3fac03d1722f199c2939fd796811ac743e168de
MD5 ba1f4308d8fd933b9ad9c4b29160f4d4
BLAKE2b-256 963b25b59ca714528111b5c83bcffcc0db8982978046d9a49891cd69ac625475

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.11.1-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 01d4e3c491bfe34701d06fab2197560c940b97074814542e556d04a6c8dfc8c5
MD5 0745e6ee03e8945d497fcd82918fb56e
BLAKE2b-256 67e5dd4f170886d1e7b320b73c98143d39c40ed737ca9b8a9c70f79762716e6f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.11.1-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6636060be3ff8adf30a8137fe569665b7a8e50dcbda7a03581cb60ed6a69a003
MD5 b111f809c70b3136c5aea23c28797a8f
BLAKE2b-256 807075eedf1abf2dd125e903a2e27b467691e755f77c10d2a84d9aa087f3de5e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.11.1-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 176ee0b14e9194d0ce074012c3a9f275e31e6603966bec0f8efff24f66f950da
MD5 137d61f49816c4795ac9139c2cffa3a8
BLAKE2b-256 9cd62d9b23cf85d413b34ccb2076ae799dbdd3bc42dfe08e7559f76a397525c3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.11.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd7811a1679351fdbee307ec49913efe1342b081240035066600b0366b1a95a0
MD5 9828447d5bbc7f7e12737762120ee373
BLAKE2b-256 24ed9752d17e72532bb0652450bb9f2bdbd8a83026f9a9f5daa57d2938ee2f77

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.11.1-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a4326c413591d4a0baa8f8461bcd94fedac06cf8e4c0216d6c9d7924a5fde734
MD5 1bf38acfe8426a9da473051751a4665c
BLAKE2b-256 8c94e97375ea36d2af850152b3d589772632c9a0b3b8ac91663b53be97b2d9be

See more details on using hashes here.

Provenance

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