Genetic algorithms solution

The genetic algorithm solution we created for VRP resides in the Python program 04-solve-vrp.py, located at the following link:

https://github.com/PacktPublishing/Hands-On-Genetic-Algorithms-with-Python/blob/master/Chapter04/04-solve-vrp.py

Since we were able to build on top of TSP and used a similar representation for the solution—an array of indices—we could use the same genetic approach as we used in the previous section. We could also take advantage of elitism by reusing the elitist version that we created for the genetic flow. This makes our genetic algorithm solution very similar to the one used for TSP.

The following steps detail the main parts of our solution:

  1. The program starts by creating an instance ...

Get Hands-On Genetic Algorithms with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.