Modelling for local energy communities at city, town, or neighbourhood level

Most of the discussion on this forum seems to be relating to regional transmission and distribution models.

I wonder whether there are interested individuals to collaborate on the development of more local energy systems with the stated goal of achieving 100% renewable energy capacity wthin these microgrids. I am interested in models that are suited to systems with capacity of between 5MW and 50MW.

How are you optimizing for economic, resiliency and sustainability goals?

What are the most popular tools used to create techno financial models for such systems? I am familiar with HOMEREnergy, DER-CAM, EPRI DER-VET, RETSCREEN.

What is missing in these systems that the open source users would want to see?



1 Like

Hi @danielschwab,

there is a collaborative open-source model developed at RLI at the moment.
There is a model factsheet and a GitHub repo:

Feel free to contact the developers and join the effort!

1 Like

Hi @danielschwab I was earlier involved in modeling municipal systems. The software used, now long defunct, was called deeco and resides on GitHub for historical reasons. You will be pleased to hear that there was a single electricity bus and no power flow model. But the reason I mention the project is that thermal systems were captured with quite some technical integrity yet could also be subject to convex optimization. See in particular, Morrison (2000) on thermal sub‑networks, §8.6 (p146–150) and figure 8.1 (p121) in this regard.

The reason I added quite a number of references below is that “heat” supply has dropped off the modelling radar lately to some extent. Back then though, batteries were expensive and limited and seasonal storage using hot water was quite in vogue.

In addition, Bruckner et al (1997) was the first paper (to my knowledge) that introduced the idea of having to navigate the various counteractions and synergies in these kind of systems. Prior to that, the various sub‑systems were assumed to operate without spill‑over effects like these.

Finally, deeco is licensed GPL‑2.0 but you are unlikely to get the code to build and run. If you need more technical background, I have some unpublished manuals. HTH.

Source: Lindenberger et al (2000). CC‑BY‑4.0 license (here).


Bruckner, Thomas, Helmuth-M Groscurth, and Reiner Kümmel (1997). “Competition and synergy between energy technologies in municipal energy systems”. Energy. 22 (10): 1005–1014. ISSN 0360-5442. doi:10.1016/S0360-5442(97)00037-6.

Bruckner, Thomas, Robbie Morrison, and Tobias Wittmann (2005). “Public policy modeling of distributed energy technologies: strategies, attributes, and challenges”. Ecological Economics. 54 (2–3): 328–245. ISSN 0921-8009. doi:10.1016/j.ecolecon.2004.12.032.

Bruckner, Thomas, Robbie Morrison, Chris Handley, and Murray Patterson (2003). “High-resolution modeling of energy-services supply systems using ‘‘deeco’’: overview and application to policy development”. Annals of Operations Research. 121 (1–4): 151–180. doi:10.1023/A:1023359303704.

Lindenberger, Dietmar, Thomas Bruckner, Helmuth-M Groscurth, and Reiner Kümmel (2000). “Optimization of solar district heating systems: seasonal storage, heat pumps, and cogeneration”. Energy. 25 (7): 591–608. doi:10.1016/S0360-5442(99)00082-1.

Lindenberger, Dietmar, Thomas Bruckner, Robbie Morrison, Helmuth-M Groscurth, and Reiner Kümmel (2004). “Modernization of local energy systems”. Energy. 29 (2): 245–256. ISSN 0360-5442. doi:10.1016/S0360-5442(03)00063-X.

Morrison, Robbie (2000). Optimizing exergy-services supply networks for sustainability — MSc thesis. Dunedin, New Zealand: Physics Department, Otago University.

1 Like

A lot of work on sub-distribution grid scale has used the Energy Hub model.
E.g. this gives a methodological overview, and this gives an application.
We reviewed a lot of approaches here.
Some of my past students have extended this to include linearized power flow.

Briefly, the energy hub is a MILP optimization model such as would be used for capacity expansion or production cost modelling, but with more energy streams for e.g. heat. This allows conversion between streams so heat load can be met with a heat pump thus incurring an electrical load, and storage of the heat stream in a hot water tank, etc. Unlike the models you mention which assume a fixed merit order for deploying technologies, the optimization accounts for the state of the system every timestep to decide what do. It can optimize for cost or carbon emissions, or both together as a multi-objective problem. It can also size technologies by including capacities as variables and including annualized costs in the objective function.

There’s no user-friendly version that I’m aware of (it’s on my to-do list!), but we have a Python version here that’s not too bad. You can run it for free online via our BESOS platform.

1 Like

Just noting two recent reviews of the area and repeating the reference to Morvaj et al (2016) in full that @ralphevins gave earlier. And for the record, deeco (above) employed recursive‑dynamic optimization (as opposed to rule‑based dispatch) and supported linearly‑weighted goal functions summed from the operational cost, greenhouse gas emissions, and depletable primary energy usage.


Allegrini, Jonas, Kristina Orehounig, Georgios Mavromatidis, Florian Ruesch, Viktor Dorer, and Ralph Evins (1 December 2015). “A review of modelling approaches and tools for the simulation of district-scale energy systems”. Renewable and Sustainable Energy Reviews. 52: 1391–1404. ISSN 1364-0321. doi:10.1016/j.rser.2015.07.123.

Morvaj, Boran, Ralph Evins, and Jan Carmeliet (1 June 2016). “Optimization framework for distributed energy systems with integrated electrical grid constraints”. Applied Energy. 171: 296–313. ISSN 0306-2619. doi:10.1016/j.apenergy.2016.03.090.

Sola, Alaia, Cristina Corchero, Jaume Salom, and Manel Sanmarti (2018). “Simulation tools to build urban-scale energy models: a review”. Energies. 11 (12): 3269. ISSN 1996-1073. doi:10.3390/en11123269. CC‑BY‑4.0 license.

1 Like

Hey @danielschwab me @plubello and @zarch are currently working on the development of an energy system simulator (not an optimization tool) that aims at analyzing energy systems at district level. In few weeks we should be able to publish the first version!

Please write me in case you are interested :slight_smile:

Also, if you check Calliope (Pfenninger et al., (2018)) also allows to model energy system at district level.

Pfenninger et al., (2018) . Calliope: a multi-scale energy systems modelling framework. Journal of Open Source Software, 3(29), 825,

1 Like

Hi Daniel,

I’ve started my energy modelling journey by working on small-scale systems and micro-grids, and indeed using tools like HOMER-Energy. Eventually, I ended up with using Calliope (already mentioned and referenced in previous comments) for both small-scale systems and large-scale one, due to its flexibility. The framework has been in fact conceived precisely for a multi-scale applicability; but of course there are many other open modelling frameworks in this community that are equally fit for the purpose.

As far as Calliope, which is the tool I use and contribtue to develop, you could find examples of district-scale models here: ; and tutorials about how to install and use the framework for distric analyses here: . In addition to the models in the gallery I linked above, there are more published exampels of Calliope use for district-scale analyses, including one to which I collaborated, here: .

If you want to understand better what are the pros and cons of each tool, from commercial ones like HOMER to open-source ones like Calliope and the others cited in this thread, you could have a look at this MSc thesis that I co-supervised and which is openly accessible: . The thesis does a review of all modelling tools which are either specifically designed for or flexibly adaptable to small-scale energy systems, comparing the pros and cons of each. As you’ll see, the focus of the thesis was more on ‘remote villages’ and micro-grids, but the vast majority of the tools and of their features are also valid for urban, or district-scale systems in Europe or elsewhere.

As a final remark, let me say that what you can get from open-source tools / frameworks that you cannot have with HOMER & co is the total freedom / flexibility to add features that you, and only you, need for your very specific case study and research questions. For instance, HOMER is an amazing software, with many great features in terms of results presentation and navigation of the decision space, or technical detail in the representation of technologies; but, on the other hand, it is heavily constrained in terms of technology choice and does not allow multi-node representations (unless they’ve done developments in this direction very recently), so it just won’t work for many of the research questions that you will want to investigate. Conversely, some of the nice features of HOMER that you might miss in an open modelling framework, can be easily enough implemented at need by yourself or by the developers. For instance, I’ve re-implemented myself in Calliope a method (called ‘SPORES’: to generate multiple feasible solutions, rather than just one, which was inspired precisely by how HOMER presents its results / decision space.

Hope this helps! (:


1 Like

Thanks Robbie, will take a look

Hi Gigibotte, yes I’m definitely interested to learn more about your new energy system simulator. LTMK when you want to talk. Best regards, Daniel

Thanks for the detailed response Francesco. I reviewed the thesis you linked to but found it quite high level. I’m interested to understand more about the algorithmic analytical capabilities of the systems i.e. more of a scientific deep dive into these platforms. Any ideas where I might find something like this?

Thanks Ralph, I wonder whether you have any ideas of how I can contribute to the industry as an entrepreneur? How can we make energy modelling accessible to an expontentially larger number of professionals around the world? Any thoughts would be welcome. Thanks, Daniel

Hi Daniel,

I would say there are no ‘major’ differences in the algorithmic approach of most of these tools, as you can see from p.50 of the thesis discussing the ‘Mathematical approach’ of the most relevant tools. Most of them, especially open-source ones, are Linear Programmng (LP) models, in some cases allowing also Mixed-Integer (MILP) formulations that are often useful for smaller-scale problems. Commercial or closed-source academic software, instead, tend to adopt more frequently heuristic methods. HOMER, for instance, uses some sort of ‘brute-force’ enumerative optimisation; a few of those reviewed in the thesis adopt genetic algorithms or similar techniques. This is mostly (I think) because heuristics allow to cope with non-linear formulations, which are sometimes ‘nice’ to have to increase the realism of technology performance. In HOMER, for instance, there are many non-linear representation of, e.g., battery degradation and similar things. But oftentimes MILP approximations do the work as well (e.g. see comparison of metaheuristics and LP)

On the other hand, it is true that several open frameworks (limiting the discussion to those I think are e
applicable to smaller-scale systems) have been recently providing a range of innovative add-ons to their basic LP/MILP optimisation approach - at least as a research development, not sure how many of these are already fully implemented in stable releases. For instance, I have already mentioned SPORES in Calliope (, fully implemented & documented in the latest stable Calliope release) but other approaches to generate multiple near-optimal solutions have been also recently proposed for PyPSA (see & In addition, some heuristics have been attempted in PyPSA again ( and in oemof (

Of course this is only what I’m aware of at the moment, and I might be completely missing other very recent and interesting algorithmic developments in the community, so please take this is a starting point and please everyone else add anything I might have missed (: Btw, another nice reference might be this



Thanks Francesco, have you come across any research discussing the potential use of AI or Machine Learning technology and methodologies that might offer a potential for signifiicant improvements in terms of cost, time and accuracy in the ability to perform simulation and optimization models for such Local Energy Communities? Who is thinking about this issue in the academic or commercial spheres? Thanks, Daniel

Try the recently launched Energy and AI journal:

  • Jin, Donghan, Raffaella Ocone, Kui Jiao, and Jin Xuan (1 August 2020). “Energy and AI”. Energy and AI. 1: 100002. ISSN 2666-5468. doi:10.1016/j.egyai.2020.100002. First issue statement.
1 Like

@danielschwab: it is definitely not uncommon to find papers of people proposing AI algorithms for simulation/optimisation of small-scale energy systems; if that’s your main interest, in addition to exploring articles from the Journal proposed by Robbie, a good option might be trying with a specific keyword search on scientific search engines such as Google Scholar.

What I can add is that I’ve been myself involved with several co-authors in the use of Machine Learning techniques with application to off-grid village-scale energy systems. Yet, the main purpose for ML was not really improving the optimisation of an individual system, but rather to have a computationally efficient way of scaling-up the optimisation of individual village-scale systems to a much larger area comprisiming multiple villages - or, in other words, to bring the detail of village-scale optimisation into a country-scale energy planning model. So perhaps completely different from what you’re looking for, but just in case, you might have a look at this: and this:

1 Like

Once again super helpful feedback. I have plenty of reading to do over the coming weeks.

Looking forward to keep the dialogue going as this area is of great interest to me and I believe should be an area that needs more attention by the various stakeholders.

1 Like

Hi Daniel,

in the open_plan Project, RLI, PIK and DGS are developing an open-source tool for planning and optimizing of so-called “energy cells” (e.g. neigbourhoods, industry parks, microgrids) in close collaboration with practitioners and other stakeholders to foster a bottom-up, cellular energy system as described here VDE-Zellulares Energiesystem. Find here, a list of tools as part of the results of our first stakeholder workshop:

Project website:

The tool uses the Open Energy Modellig Framework (oemof) as its core:

Hope this might be useful!

Text and images licensed under CC BY 4.0Data licensed under CC0 1.0Code licensed under MITSite terms of serviceOpenmod mailing list.