Design and control optimization of energy systems of smart buildings today and in the near future