Need to sort list into time slots

I have a list of items which need to be sorted into time slots but that have limitations on the slots they can be in.  For example I have slots available all day monday but item 1 - cant be scheduled from 8:00am to 12:00pm so it needs to be sorted after 1:00.  I have spent the day trying to figure out where to start with this.  There will always be enough slots for the items, I just need an algorithm to sort them.  Any advice on where to start would be appreciated.

Thank you.
Who is Participating?
A Bin Packing problem with constraints can often be represented as a Vector Packing problem
What language or application are you using?  Are you doing this by hand?
What formats are required for your input and output data?

What are the criteria for an acceptable or optimal solution?  Spread things out as evenly as possible?  Or get things done as soon as possible?

Probably the easiest thing to do, is handle the items with the most constraints first.
clintnashAuthor Commented:
The current project is in VB.NET in a WPF application, but c# is fine as well. Currently its done by hand, trying to automate this.  Closest analogy is a calendar with 1 hour appointments (open calendar and a list of appointments to drop in).   Some (not all) appointments have constraints such as cant be during a particular time block.  My initial approach was to weight the items  and then sort them in "highest weight in first" but it doesn't seem to give me the optimum solution...leaves a lot that can't be scheduled.  So I changed directions and the current iteration is to flag each row with timeslots it could be in but this is worse than the first try....
clintnashAuthor Commented:
Thank you...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.