Background 

Dr Adam Hawkes and Dr Sara Giarola of the Sustainable Gas Institute at Imperial College London are building MUSE: a novel technology-rich, whole-systems model of the energy sector. The model is capable of differentiating between regions, between technologies (from the gas boilers consuming energy to nuclear plants producing energy) and between investors with different behaviours and preferences. The RSE team in Imperial’s Research Computing Service became involved when the complexity of the model's implementation grew large enough to hamper further development of MUSE. 

The model tackles a large track of the world economy in a detailed fashion. It combines vastly different concepts, e.g. the preference of green-minded investors and development minded investors versus the characteristics of a nuclear plant and that of a kettle. It combines data across multiple dimensions, e.g. a regional axis with a year axis, or a seasonal axis with a commodity axis. It aims to be modular, so that users drive their own research by tailoring, modifying, or even overriding any part of the model. Managing this modelling complexity so that it does not overwhelm users and developers requires modern and professional approaches to software design and development. 

Our contribution 

Initial assistance from the RSE team involved the introduction of tools and methodologies that make complex projects sustainable. The code was outfitted with regression tests and a unit testing framework, enabling automated cross-platform quality assurance. The MUSE development team was encouraged to make full use of the GitHub platform to host, communicate and plan development. In later stages implementation complexity was managed by using self-describing structures fully reflecting the heterogeneity and complexity of the data, and by consolidating much of MUSE into smaller, self-contained, modular blocks of legible code – supported by the new testing framework. 

Outcomes 

The code behind MUSE will be open-sourced, including a simplified set of the data that makes it a complete economic model for energy usage across the world. It will be packaged as a native application for Windows and macOS, so that users with no programming experience can use it directly. For more experienced users, HPC users, and developers it is available as a standard Python library that can be installed using the pip package manager. User and developer guides are also tested and compiled automatically, providing a comprehensive documentation suite that further encourages re-use and ultimately citation of the software. 

Ultimately this collaboration between the MUSE and RSE teams resulted in a reliable, performant modelling framework capable of being maintained by a research team with enhanced software development capacity. Its accessibility now lends itself to a much stronger community of users and developers, and materially increased impact for the underlying research. 

Testimonials 

Dr Adam Hawkes, Reader in Energy Systems and MUSE PI: 

"The RCS has helped manage the complexity inherent in MUSE while greatly increasing its modularity and simplifying the process of adding new features. The RSE team took a proof-of-concept model and helped us shape it into a reliable, legible code we are confident to release to the community and use as a foundation for further development. Their support has been invaluable to our research."