I want to develop an algorithm which taken in location and appointment times of different places a person needs to visit starting from his/her office. After completing all the appointment visits, this person must come back to the office. I want to plan a route for him/her that covers all the appointments in such a way that:
- He/Her travels the minimum distance
- The route construction taken into the account the appointment time. That is, appointment time should take priority over the distance between two locations when deciding which location should be visited next.
My question is open-ended. I know that if I just want to take the distance into account for constructing a route, this fits directly into the Traveling Salesman Problem. But, I also want to take the appointment time into account. I am new to graphs and I was wondering if this problem fits better into some other algorithm that I am not aware of. If not, I am looking for suggestions for modifying the TSP algorithm to consider these two parameters.
While thinking about this problem, I thought about how I would implement Dijkstra for finding a route. I am aware that this is a completely different problem than TSP. But, how do you think I can combine two parameters(distance and appointment time) to compare two nodes in my priority queue ADT for Dijkstra.
Probably, these two problems require different questions but I feel that this is a common problem. I am looking for suggestions about approaching these graph problems where there are two factors that need to be considered. How can I take two parameters and combine them into one, so that I can compare two nodes?