Skip to main content

High-performance SDDP solver for hydrothermal dispatch — Python bindings for the Cobre ecosystem

Project description

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

Project details


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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.5.1-cp312-abi3-musllinux_1_2_x86_64.whl (14.2 MB view details)

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

cobre_python-0.5.1-cp312-abi3-manylinux_2_34_x86_64.whl (7.6 MB view details)

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

cobre_python-0.5.1-cp312-abi3-manylinux_2_28_aarch64.whl (7.4 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.5.1-cp312-abi3-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.5.1-cp312-abi3-macosx_10_12_x86_64.whl (7.1 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: cobre_python-0.5.1-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.3 MB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cobre_python-0.5.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2387a4e5c6e65b053e49a0234f913c63e519a50f6ca05f819b1a7572e24aa4c6
MD5 6b9dc278e30add98d428fc41698123e3
BLAKE2b-256 280f3f2fde40b013ccbda427814ca8d8359d1ed7749ba0fb7a113ad1e1ec9ef9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.5.1-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cd63ffb1607a77b0526a62d1e534c9b2dd7746dbdb412dd5e6230a46874f7ccb
MD5 1ad4c47bf85246e21e4696f61b344e9b
BLAKE2b-256 c1c903a9d4210e71a59312838b6d0adc45d27ca7a65eb8eb06eefbe87ec2b984

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.5.1-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9b617055c3b9899793a1eae656f40406a7a8a7dbbe9ac12f6682ea1c12d0da12
MD5 4ee7fd51e46b77a46582d6570be43f7a
BLAKE2b-256 17294ee675dc11fcbb2c14ae0ac68a015b2d0aea48ce002646af2a1dd52a7621

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.5.1-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0f0da967e0af63e508f39a5939d37bccf5a196b7f444d25d787c56b3a76aeb54
MD5 79d4b10aee232ff0515f1933d9008f25
BLAKE2b-256 0b6c0894c4d25eb1df36daf4dbba67075ebc940e235d17a4f1e027fde35ef984

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.5.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c0057ad183a3f84ba018a6661273876ff2b7c20850fdf74eddc217fff6795ad6
MD5 266557192a83463f31916f32e3f00848
BLAKE2b-256 8faafa94b9e4af305f8331694b35e91e1becd2efdd2d2bd66f1cd81835068364

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.5.1-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 43ee2dcceb04615a940c1f09c9a53713bbe2d3d0a8fb2527aa41d159815f845c
MD5 2aa5c436a29653c1432a389e4822b819
BLAKE2b-256 aeda9ce4aec3f59d095687ef6c202333fa76b268354e19a7de3d0990c1576e7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.5.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 Pingdom Monitoring Sentry Error logging StatusPage Status page