Automation / optimisation of machine setup