Energy systems modelling and planning