Investment Planning And Institution Design For Community Microgrids As A Socio-Technical Energy System