SMS dit: Optimal Control of Hybrid Systems and Renewable Energies