YouTube: https://youtu.be/w-nvon5ZRMc
GovHack: https://hackerspace.govhack.org/projects/distributed_renewable_energy_integration
DISCLAIMER: For the YouTube video, I wish I had more video time to be able to input the real optimisation work that I had done in this work. I used a quadratic optimisation method as a simple optimisation. Please look at the figures I have been able to generate, which are some pretty funky looking curves, but they highlight that there IS the ability to be able to build local/regional microgrids.