The fourth operator, totally random, is based on the customers’ inversion and can be
defined as: inversion(f ) = {g : g ∈ F and g may be obtained by choosing a sequence s of
customers in a route r, randomly chosen from f , and after inverting them systematically for
the generation of a new sequence s
that will replace s in r}.
In addition to the four basic operators, a fifth operator, called Heuristic Mutation (based
originally on de Oliveira et al. 2005), was also employed. This is also a mutation operator
for evolutionary algorithms that uses specific information on the problem (heuristics) to
navigate in the solution space constructed by the instantiated VRPTW. Firstly, m customers
are withdrawn from each route of solution f . The number of withdrawn customers varies
for each route r and is chosen by selecting a value from a uniform distribution that varies
from 0 to the number of customers present in r.
After selecting the customers withdrawn from f (creating an incomplete solution h),
all the selected customers are inserted back into h through the PFIH method, until a complete
solution for the VRPTW is found. This neighborhood operator never generates a new
solution f
that violates any constraints, because the PFIH algorithm does not allow such
possibility. This is explained by the fact that the insertion of each customer previously removed
always chooses the best position for insertion as long as it does not violate any of the
constraints of the VRPTW.
The f
solution generated through the f solution after the application of any neighborhood
operator is accepted only if f
satisfies every constraint of the VRPTW. In any case of
constraint violation, the solution f is kept into the SA for the next iteration of the system.
This possibility may occur with the operators swap, insert, scramble and inversion.
For each iteration of the SA, an operator is chosen by withdrawing a positive integer
number from a uniform distribution, which varies from 1 to k, being k the number of operators
of the system (in this work, k is equal to 5). The operators are stored in a vector of k
positions and the one whose index is chosen is applied.