On Jul 14, 2012, at 4:53 PM, php-general-digest-h...@lists.php.net wrote:

> From: Tedd Sperling <t...@sperling.com>
> Subject: Seeking a scheduling algorithm
> Date: July 14, 2012 4:53:15 PM EDT
> To: php-general@lists.php.net
> Hi gang:
> Does anyone have a resource, or better yet code, to solve the scheduling 
> problem described below?
> Let's say you have a week calendar that has openings between 8:00am to 5:00pm 
> for Monday through Friday (40 hours).
> Then you have an assortment of appointments that must be scheduled into the 
> week calendar. Some of the appointments are simply a one hour per week, while 
> others may be two, three, four, or five times per week and each appointment 
> for an hour or more (up to eight hours).
> The problem is, knowing what appointments (i.e., twice a week for 2 hours, 
> three times a week for one hour, etc.) must be scheduled for the week, what 
> is the most efficient way to schedule these appointments into that week?
> The most efficient way is defined as scheduling appointments with little, or 
> no, gaps in between appointments. For example, four one-hour appointments on 
> Monday between 8:00am to 12:00pm is better than four one-hour appointments 
> spread out between 8:00am to 5:00pm.
> Anyone have any solutions, ideas, resources, code?
> Thanks,
> tedd
> _____________________
> t...@sperling.com
> http://sperling.com


There is an old general rule that the most time efficient way to schedule is to 
put the "big" time requests on the schedule first. In this case, that would 
mean schedule all five times a week requests first, then the four times a week, 
then the three times a week. The two hour requests should be scheduled next: 
three times a week and twice a week can be scheduled at the same time. Then 
fill in the rest with the one hour requests.

Hope that makes sense.

     -----===== Bill =====-----

A closed mouth gathers no feet.

Reply via email to