Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mlp-kit

como rodar ./tsp instances/instancia.tsp

ils:

Solution ILS(int maxIter, int maxIterIls) { Solution bestOfAll; bestOfAll.cost = INFINITY;

for(int i = 0; i < maxIter; i++)
{
    Solution s = Construcao();
    Solution best = s;

    int iterIls = 0;

    while(iterIls <= maxIterIls)
    {
        BuscaLocal(&s);
        
        if(s.cost < best.cost)
        {
            best = s;
            iterIls = 0;
        }

        s = Perturbacao(best);
        iterIls++;
    }

    if (best.cost < bestOfAll.cost)
        bestOfAll = best;
}

return bestOfAll;

}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages