Research Article

Machine Learning-Based Parameter Tuned Genetic Algorithm for Energy Minimizing Vehicle Routing Problem

Algorithm 1

Overview of basic genetic algorithm developed for the EMVRP.
Input
Read list of cities to be served with demands from CVRP Lib file
Read vehicle capacity from text file
Population size ()
Number of generations ()
//Initialization
Create a tour with a random order of cities
Do this for times to create a population
Get the best tour from the population
Save as the elite
initial energy = energy consumption of the fittest tour in first population
//Genetic algorithm
//Run for    times
Loop1
//Run for times
Loop2
        //Tournament selection
        Select a random set of tours from the population
        Get the fittest and return
        //Crossover
        Parent1 = tournament selection ()
        Parent2 = tournament selection ()
        child = Crossover (Parent1, Parent2)
        //Mutation
        Swap random two cities in the child
     endLoop2
    //New population is created
    Get the fittest
    Replace previous elite if fittest is better than elite
endLoop1
Get the elite
Final energy = energy consumption of elite
Reduction of energy = (initial energy − final energy)/initial energy 100%
Print “Reduction of energy”