Fast Legendre-transform convex optimisation for energy-storage operation and spatial economic dispatch
Project description
FLToptim — Fast Legendre Transform Optim
Fast convex optimisation for energy-storage operation and spatial economic dispatch, built around the Legendre-transform dynamic program for convex piecewise-linear (and quadratic) value functions.
What's inside
cplfunction/cpqfunction— the convex piecewise-linear/quadratic value-function DP (OptimMargInt). Each function is stored as amap<position, slope-increment>, so the inf-convolutions of the Legendre / dynamic-programming recursion stay near-linear. This is the original dynprogstorage core (Girard, Barbesant, Foucault, Kariniotakis, 2013).param_simplex— a bespoke parametric right-hand-side dual simplex that traces the exact injection-cost curve φ_n(y) of a small dense network LP in a single pass (one dual pivot per breakpoint), carrying its basis across hours.elec/mr_decompose— the spatial-LP ↔ storage-DP decomposition for perfect-foresight annual dispatch: alternate a per-hour spatial network LP with the per-node storage DP, passing each node's convex injection-cost curve (not a scalar price) so the scheme is curvature-damped and converges to the monolithic optimum. Handles reservoirs, batteries (efficiency kink) and coupled multi-energy (electricity + hydrogen) networks, with optional parallelism (hour-chunk curve build; Jacobi across storages).
Install / build
pip install fltoptim # from PyPI (builds from source on platforms without a wheel)
# or, from a checkout:
pip install -e . # builds the Cython DP extension + the parametric-simplex shared library
# or
python setup.py build_ext --inplace
Building from source needs a C++17 compiler (Linux/macOS); numpy and highspy are the runtime
dependencies. The reference frontal solves in the decomposition use Gurobi when available (optional).
The test suite ships with the package:
pip install "fltoptim[test]"
python -m pytest --pyargs FLToptim.tests -m "not slow" -q
Reference
R. Girard, V. Barbesant, F. Foucault, G. Kariniotakis, Fast dynamic programming with application to
storage planning, 2013. Please cite it if you use this software (see CITATION.cff).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fltoptim-0.3.0.tar.gz.
File metadata
- Download URL: fltoptim-0.3.0.tar.gz
- Upload date:
- Size: 309.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7015920680af6ef21179922f442255b843032017aceb8a52791615d3a8a87e7c
|
|
| MD5 |
a428ca4b2c272d30380f3d7f33169972
|
|
| BLAKE2b-256 |
0516ebe0e25cb90eefa6ddc0d87e141ee050914e3bc93a1245f55df88e35016a
|
File details
Details for the file fltoptim-0.3.0-cp313-cp313-macosx_12_0_arm64.whl.
File metadata
- Download URL: fltoptim-0.3.0-cp313-cp313-macosx_12_0_arm64.whl
- Upload date:
- Size: 524.1 kB
- Tags: CPython 3.13, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3e16989de7e269ef0e87389dcc01728cf8cd79e04abe5d0717f7edb456386ee
|
|
| MD5 |
820d908a5a03e2033f9f858d4ad50a7d
|
|
| BLAKE2b-256 |
bfb6c4c77f43907f18f17ee0ab48fa9b1519155c7a1c05637fbeb57a1e4276f0
|