Optimising a factory using discrete event simulation