EGU24-19631, updated on 11 Mar 2024
EGU General Assembly 2024
© Author(s) 2024. This work is distributed under
the Creative Commons Attribution 4.0 License.

Latest advances and reflections on 10 years of open-source development and applications

James Tomlinson and Julien Harou
James Tomlinson and Julien Harou
  • University of Manchester, Manchester, United Kingdom (

Pywr is an open-source water resource system simulation model. It was created almost 10 years ago. Since that time it has been widely adopted in the UK water resources planning community and also used by several researchers around the world. The original design goals were to create a fast, free and extendable library that could handle running large datasets on complex real-world problems. Pywr’s speed has made it popular with researchers and practitioners simulating large water systems under uncertainty (where many future scenarios must be considered).

Here we present an extension, a new simulation approach that exploits modern CPU hardware and instructions. The new method simulates multiple scenarios in parallel using “single instruction, multiple data” (SIMD) techniques. We apply SIMD to a simple interior point method that is capable of solving multiple similar linear programs in parallel. We compare our method against a conventional non-SIMD linear program solver (CLP) and demonstrate that it can provide significant speed-ups for some water resource simulations. We benchmark this method using a GPU using 100s of thousands of scenarios. Our results demonstrate that by exploiting modern CPU features it is possible to achieve further speed-ups for water resource simulations. More efficient (faster) simulation allow practitioners to explore more scenarios, find more robust solutions and/or use more complex models. Some existing and on-going applications will be briefly introduced.

Finally, we reflect on the adoption and evolution of Pywr over the last 10 years, and look at its current usage in UK water resources planning. We explain how the advances above will help planners and developers alike, hopefully setting the foundation of Pywr for the next 10 years.


How to cite: Tomlinson, J. and Harou, J.: Latest advances and reflections on 10 years of open-source development and applications, EGU General Assembly 2024, Vienna, Austria, 14–19 Apr 2024, EGU24-19631,, 2024.