Optimisation of energy consumption in conveyor lines