Invia SMS: Mathematical modelling of energy systems