CodePudding user response:
This depends on your solving logic, common cures itself and scanning method,Genetic algorithm, the first step: the design of chromosome coding, length of m + n + 1, VRP problems can be designed to [0 i1... ie in 0 0 im...... 0], where 0 for distribution center;
The second step: scanning method is used to generate the initial population,
Step 3: fitness, general as the objective function; Step 4: select operation; Step 5: cross; Step 6: variation; Step 7: design termination conditions; Step 8: output the optimal solution