if (c->TotalVioLoad == 0 && c->TotalCost < best_fsb_solution->TotalCost)
{
indi_copy(best_fsb_solution, c); // check if assign or not
}
According to the code, `lns(&tmp_indi, coef, 1, inst_tasks)` is used to apply local search on chromosome `tmp_indi`, and chromosome `c` is the origin.
But the following code tends to compare chromosome `c` and the `best` chromosome. If chromosome `c` is better than `best` chromosome, then update `best` chromosome.
So the correct code would be apply local search on chromosome `c`.
//traditional move lns(&tmp_indi, coef, 1, inst_tasks);
if (c->Fitness < tmp_indi.Fitness) imp = 1;
if (c->TotalVioLoad == 0 && c->TotalCost < best_fsb_solution->TotalCost) { indi_copy(best_fsb_solution, c); // check if assign or not }