The size
parameter in the nearest addition and savings heuristics limits the number of possible next visits to the n-closest one, according to cost. This parameter can lower memory consumption and also speed up search. The parameter size
should be fixed and not proportional to the size of the problem. A good number to try is something between 50 and 100 visits. As always, testing to find the best fit for your problem and environment works best.
The parameter mode
indicates the behavioral mode of the nearest addition heuristic during execution. The mode IloNearestAdditionForward
extends the route forward from the first visit. The mode IloNearestAdditionBackward
extends the route backward from the last visit. The mode IloNearestAdditionBoth
extends the route simultaneously in both directions. In general, it is best to use the backwards mode with outbound problems (few pickups, many delivery locations). The forwards mode works best with inbound problems (few deliveries, many pickup locations).