A centralized optimal energy management system for microgrids | Synapse