Algorithms for optimal student seating arrangements

吃可爱长大的小学妹 提交于 2020-01-15 06:28:08

问题


Say I need to place n=30 students into groups of between 2 and 6, and I collect the following preference data from each student:

Student Name: Tom

Likes to sit with: Jimi, Eric

Doesn't like to sit with: John, Paul, Ringo, George

It's implied that they're neutral about any other student in the overall class that they haven't mentioned.

How might I best run a large number of simulations of many different/random grouping arrangements, to be able to determine a score for each arrangement, through which I could then pick the "most optimal" score/arrangement?

Alternatively, are there any other methods by which I might be able to calculate a solution that satisfies all of the supplied constraints?

I'd like a generic method that can be reused on different class sizes each year, but within each simulation run, the following constants and variables apply:

Constants: Total number of students, Student preferences

Variables: Group sizes, Student Groupings, Number of different group arrangements/iterations to test

Thanks in advance for any help/advice/pointers provided.


回答1:


I believe you can state this as an explicit mathematical optimization problem.

Define the binary decision variables:

x(p,g) = 1 if person p is assigned to group g
         0 otherwise

I used:

I used your data set with 28 persons, and your preference matrix (with -1,+1,0 elements). For groups, I used 4 groups of 6 and 1 group of 4. A solution can look like:

----     80 PARAMETER solution  using MIQP model

               group1      group2      group3      group4      group5

aimee               1
amber-la                                                1
amber-le                                                            1
andrina             1
catelyn-t                                   1
charlie                                                 1
charlotte                                   1
cory                            1
daniel                          1
ellie               1
ellis               1
eve                                         1
grace-c                                                 1
grace-g                                                 1
holly                                                   1
jack                            1
jade                                                                1
james                           1
kadie                                       1
kieran                                                              1
kristiana                                   1
lily                                                                1
luke                            1
naz                 1
nibah                                       1
niko                            1
wiki                1
zeina                                                   1
COUNT               6           6           6           6           4

Notes:

  • This model can be linearized, so it can be fed into a standard MIP solver
  • I solved this directly as a MIQP model (actually the solver reformulated the model into a MIP). The model solved in a few seconds.
  • Probably we need to add extra logic to make sure one person is not getting a really bad assignment. We optimize here only the total sum. This overall sum may allow an individual to get a bad deal. It is an interesting exercise to take this into account in the model. There are some interesting trade-offs.



回答2:


1st approach should be, create matrix n x n where n is total number of students, indexes for row and columns are ordinals for every student, and each column representing preferences for sitting with the others students. Fills the cells with values 1=Like to sit, -1 = the Opposite, 0 = neutral. Zeroes to be filled too on main diagonal (i,i)

------Mark Maria John Peter

Mark 0 1 -1 1

Maria 0 0 -1 1

John -1 1 0 1

Peter 0

Score calculations are based on sums of these values. So ie: John likes to sit with Maria, = 1, but Maria doesn't like to sit with John -1, result is 0. Best result is when both score (sum) 2.

So on, based on Group Sizes, calculate Score of each posible combination. Bigger the score, better the arrangement. Combinations discriminate values on main diagonal. ie: John grouped with the same John is not a valid combination/group.

In a group size of 2, best score is 2

In a group size of 3, best score is 6,

In a group size of 4, best score is 12

In a group size of n, best score would be (n-1)*n

Now in ordered list of combinations / groups, you should take first the best tuples with highest scores, but avoiding duplicates of students between tuples.




回答3:


In a recent research, a PSO was implemented to classify students under unknown number of groups of 4 to 6. PSO showed improved capabilities compared to GA. I think that all you need is the specific research.

The paper is: Forming automatic groups of learners using particle swarm optimization for applications of differentiated instruction

You can find the paper here: https://doi.org/10.1002/cae.22191

Perhaps the researchers could guide you through researchgate: https://www.researchgate.net/publication/338078753

Regarding the optimal sitting you need to specify an objective function with the specific data



来源:https://stackoverflow.com/questions/59599718/algorithms-for-optimal-student-seating-arrangements

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!