Text this: Optimal Control of Hybrid Systems and Renewable Energies