Page 1 of 1

Scheduling Problem

Posted: Mon Dec 07, 2009 4:14 pm
by tecktalkcm0391
I'm not sure how to setup a program to schedule an appointment. Pretty much I have a database that has start and end dates (and times) of when employees are unavailable, but now I want to figure out how to schedule appointments in an organized way to each employee. This is the way it would need to work:

A person would enter when they want to meet (the date and either: morning, afternoon, or evening), and then the person they would like to meet with, and the PHP script would figure out a time that the employee is available.

In the long run, the appointments are reoccurring 3 times a day, so you would enter say 12/12 Morning - 12/20 Afternoon, and it would schedule the employee for all three times starting at 12/12 in the morning, and ending on 12/20 in the afternoon.


Any ideas on how to get started with this?

Thanks!

Re: Scheduling Problem

Posted: Thu Dec 24, 2009 10:42 pm
by josh
Sounds like the traveling salesman problem. A fundamental concept in AI for which there are a lot of great solutions, each with advantages and disadvantages. http://en.wikipedia.org/wiki/Travelling ... an_problem

The short answer in laymens terms is you brute force it. Then when your software makes some money you pay someone who knows what they're doing to optimize it :D

Another useful link: http://en.wikipedia.org/wiki/Knapsack_problem