An effective optimization algorithm for multipass turning of flexible workpieces