optimization - Efficient algorithm for creating an ideal distribution of groups into containers with potential overflow? -


I have groups of students who need to be allocated in a certain capacity (say, 100 chairs each) in classes. is.

Each group should be allocated in only one class, even if it is more than capacity (i.e. overflow, with students standing)

I have an algorithm Requirement allocation with minimum overflow and under-capacity classes.

In order to allocate, a naïve algorithm is very slow slow, when ~ 200 groups occur, half of these are distributed less than 20% of the class

Thank you.

Class = "post-text" itemprop = "text"> < P> It's the same, which is NP complete. It is difficult to find the fastest optimal algorithm but it is possible to find almost the optimum algorithm fast. You can start using a greedy approach - you can fit by placing the largest groups first and putting them in the smallest distance.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -