Scheduling Problem

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Scheduling Problem

Post 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!
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Scheduling Problem

Post 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
Post Reply