Now the detected sets are kept consistent to previous sets. New algorithm developed. This is important to keep assigned tasks consistent with the detected sets.