View source: R/studentAssignFunc.R
assignStudents | R Documentation |
assignStudents
assigns students to schools to minimize total walking distance subject to constraints on class sizes and
the number of sections per school. The user specifies the minimum and maximum number of students that can be assigned to each school.
If penalty
is not zero, the function that is minimized is the sum of all walking distances plus penalty
times the sum of all walking distances squared
assignStudents(kg, minA = 20, minB = 10, minC = 20, minH = 5, maxA = 40, maxB = 40, maxC = 60, maxH = 1000, penalty = 0)
kg |
a data frame containing the nx4 distance matrix |
minA |
minimum number of kindergarten students to assign to Ames |
minB |
minimum number of kindergarten students to assign to Blythe |
minC |
minimum number of kindergarten students to assign to Central |
minH |
minimum number of kindergarten students to assign to Hollywood |
maxA |
maximum number of kindergarten students to assign to Ames |
maxB |
maximum number of kindergarten students to assign to Blythe |
maxC |
maximum number of kindergarten students to assign to Central |
maxH |
maximum number of kindergarten students to assign to Hollywood |
penalty |
adds a term that is quadtaric in distance squared to the walking distance matrix. makes solution more compact |
assignment of students to schools which minimizes total walking distance subject to space constraints.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.