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.4.1-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl (14.0 MB view details)

Uploaded PyPymusllinux: musl 1.2+ x86-64

cobre_python-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

cobre_python-0.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ x86-64

cobre_python-0.4.1-cp312-abi3-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.4.1-cp312-abi3-musllinux_1_2_x86_64.whl (13.9 MB view details)

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

cobre_python-0.4.1-cp312-abi3-manylinux_2_34_x86_64.whl (7.4 MB view details)

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

cobre_python-0.4.1-cp312-abi3-manylinux_2_28_aarch64.whl (7.1 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.4.1-cp312-abi3-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.4.1-cp312-abi3-macosx_10_12_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file cobre_python-0.4.1-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.4.1-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4a87c9977d86a2d1842959b2f8a92a9b84d0ff71984a3689ca218d20d38c334c
MD5 cca79bc0d09ed41a7c4be5e5095ec889
BLAKE2b-256 bf90f9ce4f3937dcf067d72ef52243e5c597b5daef7a76cdd0d9da814bf8551d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.4.1-pp311-pypy311_pp73-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.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0844dbe5726b43c291c6807e6bef3fd07293a4aedb34569d2ac244c8b82fb089
MD5 8db3f84795097183f3ecc33f3c9cec37
BLAKE2b-256 e2d181297fae41d7806f6359b92806642492d6d9b5712c1307d6e8e7f519669c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.4.1-cp314-cp314t-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.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b056b8046fe42b2bc4e2a6e27eeb96d2af6f00e972f05fb48450a1a13b1485c6
MD5 73f28b50d7ffd8a827707e583ceb89b7
BLAKE2b-256 1f976cb3b3abecae9674cf00fb75ce2d222a138c383e3866c6450ec0f66af539

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.4.1-cp313-cp313t-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.4.1-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for cobre_python-0.4.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 1ab0c1b3e7bee2e49dfb504fb7f80b4dd78c0ecc047b6bbf09e9f4d305e4abb0
MD5 ae1c2bca0bb0051e0e062ebfd2e360d3
BLAKE2b-256 7c4f1c4aa9476200f406eb2a412e72d2045c81e372b080b89d53eb3525635d99

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.1-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 741712c4898d64a9656d6bc969d6ad4d83406a7e4c0c3f65389e0521027a0743
MD5 776d45e569834dba8547d1decd27c2a2
BLAKE2b-256 48c1175aedc17c8b6db19b4766a881a42866736a575708debd3c977b5c79e531

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.1-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 aeea3918f30b901b30d97d405f0e385f0c33b666db7ab8680f577a2724e9e9f6
MD5 aad90bc685c2aced8e275708da94f5b3
BLAKE2b-256 600bbdd71ef666885a94dbfbe4d95bee3ae8652aa728f33db74001fe9e272d5e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.1-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 266fa8fa8f575cd6a590fd8ee3ad4bc8e82b359668fd4bb96fd1b5db3e3fa71b
MD5 73105f83b48adfde8f311a0e2b5cd18d
BLAKE2b-256 5d2992135ab7b7e75fa8af3b4ac751cae6e7229d7e0f9c56a5a67b0e74d0d0f2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f1399484bda612f41064f5ef99bedc9a719280b08be678608f1fb85296273ed8
MD5 7447fa7816c424570b753948380fa92f
BLAKE2b-256 aea2385ce36df678d2720f95e50b121b4797a15c2a8a33c69222d01713904724

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.4.1-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 103a218b46420f6901bfce24b882e5cc494a65c52a16afa6d18bd1fa1cbb15eb
MD5 779aea31b3b0fd577ec5d383e7f1476d
BLAKE2b-256 5dbb4a3b471e293cabf0c79f69ecf733d3d22ba9ce8b5f67552c0f53a3e933d5

See more details on using hashes here.

Provenance

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