Computer applications for optimization of energy systems