Minimizing electricity costs by sharing energy in sustainable microgrids | Synapse