Mathematical modelling of energy systems by