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.
References
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.