KAUST CEMSE AMCS Ricardo Manuel Pinto de Lima Optimization applied to energy systems