Tekstiviesti: Forecast-Based Energy Management for Optimal Energy Dispatch in a Microgrid