language agnostic - Algorithm to fit as many events into a schedule as possible -


i'm trying find algorithm can arrange many of these non-overlapping events schedule possible (where of these events can added or removed schedule needed). none of these events can overlap, want fit many of them daily schedule possible:

12:00 pm - 12:45 pm: lunch  1:00 - 3:00 am: math class 1  3:30 pm - 5:00 pm: math class 2  7:00 pm - 10:00 pm: history class 1  9:00 pm - 11:00 pm: history class 2  time of day: grocery shopping, 40 minutes  time of day: study math 30 minutes  time of day between 11:00 , 4:00 pm: basketball practice 2 hours 

i've been thinking problem while, , still have no idea how should solve it. type of calendar-scheduling algorithm effective in case?

you bin packing periods single day length. want find possible solutions problem , grade them according number of periods manage pack it.

  1. split day in 15 mins intervals, 1 10 pm have 21 * 4 frames.
  2. generate every permutation possible constraints (no overlap of frames).
  3. for each valid permutation, count number of periods managed fit in.
  4. print [x] permutations scored highest

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -