Our search method is entirely greedy. Random numbers are not used, and the results are fully reproducible. The search begins by assuming that all customer visits will be made by the vehicle, and then by using the improvement heuristics presented to try to improve the cost of the solution. When we are satisfied that no legal action can reduce the cost, we stop the search. In addition, we restrict the use of heuristics in association with the vehicle to only the relocation of a visit from the vehicle.
In the beginning, the distances between stations are considered as well as the capacity of the vehicles. Depending on the demand and capacity of the vehicles, each vehicle is assigned to a set of stations. In the first step, permutations and combinations are used to create possible routes for each vehicle. The best routes are formed based on the shortest routes, i.e., based on the distance. This method is suitable for at least a few (n* 5) stations, though for more stations, it will be hard and complex both in terms of calculations as well as final solutions. In this particular case, the greedy search algorithm is used to find a feasible route plan by determining first the total distance that each truck has to travel to reach the customer. With this information, a greedy search algorithm is used to create an optimized route plan for each set of vehicles. This will help to reach the customers in both an effective and efficient manner.
Greedy Search Alogorithm
The “greedy algorithm,” based on the list of nodes assigned to a vehicle, begins the sequence by selecting the station closest to the terminal station from the list. Following this, the next station in the sequence is determined by choosing the station that is closest to the preceding station. The process is repeated until all the stations have been visited to complete the sequence starting and ending at the terminal station. During each phase, the best outcome is considered without considering future consequences. It is observed that by choosing a local optimum at each step, a global optimum is eventually reached. If other exhaustive methods are used, the computing time and complexity tend to increase exponentially. As an alternative for larger problems, greedy search can be used.
Reason for choosing greedy algorithm
Other exhaustive methods tend to increase computing time exponentially, which increases computational complexity. For large problems, we use greedy search as an alternative. First, the sequence starts by selecting the station that is closest to the terminal station from the list of nodes that a truck is assigned to service. Next, the station closest to the preceding station is selected from the list of remaining stations. Until all the stations have been exhausted, the sequence starts and ends at the terminal station.