Is there any way to feed an initial solution to the algorithm?
Regista6 opened this issue · comments
Dear @Regista6,
My apologies for the delayed answer, this is a very easy functionality to add to the algorithm, at least through its C++ API. We will add this possibility ASAP. Would you be interested in feeding the solution as one of the starting individuals in the population, or as a starting point to apply a single local-search run for example?
Hi,
Thanks for the reply. I think I am interested in the latter functionality but if you can add both those features, that would be great too.
By the way, it is completely fine with me if you take your time with this. I don't have any urgent requirements!.
Commit 82644d6 permits to construct an Individual from a solution file in CVRPLib format.
This permits, for example, to add an input solution in the initial population by adding the following two lines of code before the end of the generatePopulation() function:
Individual randomIndiv(params,"<PATH_TO_INPUT_SOLUTION>");
addIndividual(randomIndiv, false);
With this additional functionality the issue should be solved now