Vehicle Routing Problem Using Simulated Annealing Suppose I have some locations where goods are to be delivered in multiple time slots(like 7-10 am , 10 am-1 pm, time slots are continuous). All the locations are connected with each other(completely connected graph).

1.) Firstly orders of first slot are to be delivered and then only orders of other slots can be delivered.So, the last point of most optimal first slot sub-tour might not be the most optimal for the overall distance minimization. We might need to go from that last point to some other point of first slot and then from there on go to locations of slot2.

2.) Minimize distance 

3.) Trip starts from a depot and ends at the depot( So sequence is something like depot -> Slot 1 orders -> Slot 2 orders -> .......... -> depot , where slot1 is 7-10 am , slot2 is 10 am - 1 pm, slot3 is 1 pm - 4 pm......).

My question is how can this problem be tackled with simulated annealing. like how to fix the starting and end points(as depot) and how to set annealing schedule for such problem.
To solve a combinatorial optimisation problem such as this by a method such as Simulated Annealing, you need 3 basic ingredients:


A representation for a 'Candidate Solution'. For vehicle routing, this is typically a permutation of the depots, i.e. a list of depots in the order to be visited.
A measure of the quality of a candidate solution. Various methods exist for penalising solutions with deliveries outside their time windows or fail to meet other constraints.
One or more 'perturbation operators' for transforming a candidate solution into another (hopefully better) one. For example, swapping two randomly-chosen depots in the permutation is one of the simplest approaches, but of course more informed operators as possible.


Given these three, it's then possible to plug your problem into a range of metaheuristics, such as iterated local search, Tabu search, various Evolutionary Algorithms or Tabu search.

As regards annealing schedule, there's a range of literate on choosing parameters, but one simple option is to obtain initial and final temperatures from the statistics of a sequence of random perturbations, then experiment with the choice of cooling rate in a geometric annealing schedule.

The excellent (and freely-available) book "Essentials of Metaheuristics" offers a more detailed background on the above and some guidelines for what techniques to apply in what circumstances.