Recently, I have had a problem that I have been considering and still cannot solve; I was wondering if anyone here could point me in the right direction by giving me the psuedo code (or at least the rough pseudo-code scheme) for this problem. PS I will build on PHP, if that matters ...
the functions
There are ~ 50 people (for this example, I will just call them a, b, c ...), and the user is going to group them into groups of three (people in groups may intersect), and at the end there will be 50-100 groups (t .e. {a, b, c}; {d, e, f}; {a, d, f}; {b, c, l} ...). *
It’s still easy, it’s a matter of building an html form and processing it in a multidimensional array
There are ~ 15 time intervals during the day (for example, 9:00 AM, 9:20 AM, 9:40 AM ...). Each of these groups should occur once during the day. And during one time interval, a person cannot be booked twice (ie, “a” cannot be in 2 different groups at 9:40 in the morning).
It is difficult, but not impossible, my best guess on how to do this would be brute force (choose groups of groups that do not have matches (for example, {a, b, c}; {l, f, g}; { q, n, d} ...), and then just put each in a time interval
Finally, the schedule that I output should be “optimized,” by which I mean that “a” should have a minimum time between meetings (so if his first meeting is at 9:20, his second meeting shouldn’t be at 2:00 pm).
Here, where I am lost, the only thing I think is to build many, many schedules, and then rank them based on the average waiting time that a person has from one meeting to the next
However, my "decisions" (I do not want to call them) require too much brute force and will create for too long. Are there simpler, more elegant solutions?