Agent-based homeostatic control for green energy in the smart grid | Synapse