Email zadetek: Optimal Energy Management for Renewable Energy Microgrids