Yes, I understand, thank you very much for your help and support.
My state of the requirement is really bad for your understanding. I just want to do students course planning by collecting the students who choose the same subjects into the same activities. For example, both students S1 and S2 choose subjects A, B, C, D, and each subject has several activities, say A-T1, A-T2, ..., B-T1, ... , D-Tn. I hope S1 and S2 should join the same four activities, say A-Ti, B-Tj, C-Tk, D-Tm, rather than S1 joins four activities and S2 joins another four activities.
In my last post, I use the vector to cluster the students. So I can get which group of students should join the same activities, but I don't know which constraints for FET to assign one student to specific activities.