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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.6.1-cp312-abi3-musllinux_1_2_x86_64.whl (14.3 MB view details)

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

cobre_python-0.6.1-cp312-abi3-manylinux_2_34_x86_64.whl (7.7 MB view details)

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

cobre_python-0.6.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.6.1-cp312-abi3-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.6.1-cp312-abi3-macosx_10_12_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: cobre_python-0.6.1-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.4 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.6.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2604caf58aaaf76c97596338a2bad023e84d9e5677e3f250a1ed9c7d1451cecc
MD5 00e0a95919bbeaf81487b9295335b8c3
BLAKE2b-256 7776d92f46c6bf874f25b6e9ce16af5bc1117e34cf11cf4e3390803f665408f3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.1-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d462d9343d55445ddeb3388454bece5e7b8e74df5964b586b3ac1cb9da56c5bd
MD5 bef4d11cc77117c5fc9c8882ffc404be
BLAKE2b-256 d48a7344fffd2909f46b80b301c88314c966477d9fcd7e1cc048a5d2a081cf47

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.1-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f08dac386dd76220152935ab29b36f4e3473e63fe453493e938c1deeceb1eddc
MD5 0fde19d4e77123c50b9e4d32a1b606e2
BLAKE2b-256 592f761c68d9b5d1fce035be0d28b7f6ceff521694a36fcd452c4829ea8fdd4c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.1-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b60003ae52ef2b2a6ce0ee7a681b7c79e76bc896d517ca6877cb819e6f065120
MD5 470da7f7a0d259f42a497e3a5292c6c0
BLAKE2b-256 01bb87de60c25237fb75b866eb4ed7105d74aa014cc33354f5edd989ac8c249b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef00a3f8e74b92b499be2e067f388b286c0baff2f2a5759c0a96ea3b137b427b
MD5 6a28ca67ab387170cc9339b9f314c8d4
BLAKE2b-256 8307c8fb7b3319d962a1e14148de5b5e5817d6fa449b7ae62398a62b5a61c649

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.1-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7bd37bf39d9edb0f22181409117f2a3813f2c7410b3ec4ba33236f0de88c0343
MD5 5ae465fc0e45675444c7425ce5fa2d1d
BLAKE2b-256 a339a9eba6b5ad6cb900fa07db0121c62a64a4f28009a1a8a2a349ea8a7bfb3f

See more details on using hashes here.

Provenance

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