What this is
flex-pse is a toolbox for scheduling industrial plants. You describe the equipment (pumps, tanks, membranes, batteries) and it builds a Pyomo model that decides what runs when, given that power costs more at some hours than others.
Each example asks one question about a realistic plant. You get a page to explore the answer, the model code, and a notebook that solves it.
How these pages work
The solvers don't run in a browser, so each model was solved ahead of time for a range of one input. The pages let you flip through those results. The charts and controls are live; the schedules aren't re-solved.
Examples
-
Pump scheduling
A two-pump water plant on a time-of-use tariff. Is it better to buy a bigger battery, or to let the pumps run flexibly?
-
Desalination scheduling
A seawater desalination plant has to hit a monthly water target. See how the size of that target changes when the plant runs and what each acre-foot costs.
Running them yourself
To change the problem (a different tariff, demand, or flowsheet), clone the repo and run the notebooks:
git clone https://github.com/flex-pse/flex-pse-examples.git
cd flex-pse-examples
pip install -e ".[notebooks]"
marimo run examples/pump_scheduling/notebook.py
flex-pse and this examples repository are maintained by the
Coherence Power team and the WE3 Lab at Stanford University. For bugs and
feature requests, open an issue on the flex-pse GitHub repository.
To add an example, see CONTRIBUTING.md.
For support with custom analyses, please join our Slack Workspace or email info@coherencepower.com.