I am working on a solution to the travelling salesman problem with parallelization
I'm using next_permutation to get the permutation for the cities travelling and I'm trying to use OMP to parallelize the code , the question is I found out that OMP only deal with FOR loop while to use next_permutation I could only use while loop , anyone has any suggestion ?
Thanks
I have
1 2 3 4
do{
//calculate distance stuff here //
}
while (_Next_permutation(route.begin() + 2, route.end() - 1)