Modelling and optimization of industrial energy systems