Optimizing ore distance and clearing