Skip to main content

Scentree logo

About

scentree is a Python framework for generating scenario trees for multistage stochastic programming. It provides methods for generating a scenario fan using statistical models based on multivariate time series and machine learning techniques. The resulting scenario tree is then constructed using scenario reduction algorithms.

If the optimization problem to be solved is related to an energy community participating in electricity markets, the open-source secoem package can be used after generating the scenario tree with the scentree package.

Installation

The package is currently available only on PyPI and can be installed with:

pip install scentree

The package will be available on conda-forge soon.

How to use it

Visit the official documentation page for more details on how to use it.

Examples

A complete illustrative example is provided in the Flowergirl notebook, which demonstrates the generation of a scenario fan, scenario tree reduction, and the formulation and solution of a multistage stochastic programming problem using Pyomo.

To run the notebook, install the optional dependencies with:

pip install scentree[examples]

Citation

@misc{scentree2026,
  author = {Cristian Pachón-García and Albert Solà Vilalta and F.-Javier Heredia},
  title = {{scentree}},
  subtitle = {a framework for generating scenario trees for multistage stochastic programming},
  url = {https://github.com/mmobec/scentree},
  year = {2026}
}

Acknowledgements

This work has been supported with grants PID2022-139219OB-I00 and Cetp-FP-2023-00185 from the Spanish Ministerio de Ciencia, Innovación y Universidades. This research has been funded by CETPartnership, the Clean Energy Transition Partnership under the 2023 joint call for research proposals, co-funded by the European Commission (GA N°101069750) and with the funding organisations FFG (Austria), AEI (Spain) and MUR (Italy).

Metadata

Release files for scentree 0.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scentree 0.0.12
File Size Uploaded Provenance Actions
scentree-0.0.12.tar.gz 55.5 kB With provenance Details for scentree-0.0.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scentree 0.0.12
File Interpreter ABI Platform Actions
scentree-0.0.12-py3-none-any.whl Python 3 none any Details for scentree-0.0.12-py3-none-any.whl

Total release size: 113.5 kB

Release files / scentree-0.0.12.tar.gz

Download URL scentree-0.0.12.tar.gz
Size 55.5 kB
Tags Source
SHA-256 checksum
How to use checksums
364204049f2274fb722f3aa88a09be070410b3f0a32dfa0a9d66003cedfafab0
BLAKE2b-256 checksum
How to use checksums
d47ab3eb113cafe9023446484d76e610012231ac6473e874c20f3f825c34dcfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / scentree-0.0.12-py3-none-any.whl

Download URL scentree-0.0.12-py3-none-any.whl
Size 58.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62cd0b2bbe6b7623949802e59ee85c88bdeaa1397ffa2232a873be80012612b8
BLAKE2b-256 checksum
How to use checksums
8b41ff4b189808490c011d12a9ecc4f8e0caf43b0985d3f10a4b77662d33e346
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for scentree 0.0.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for scentree-0.0.12.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page