Factory optimisation through simulation