[Paradiseo-help] [paradiseo-Bugs][5425] Permutation-based crossover "order_xover.cpp" fails with permutations starting with an indice > 0

paradiseo-bugs at gforge.inria.fr paradiseo-bugs at gforge.inria.fr
Ven 11 Avr 11:54:01 CEST 2008


Bugs item #5425, was opened at 11/04/2008 09:54
You can respond by visiting: 
http://gforge.inria.fr/tracker/?func=detail&atid=663&aid=5425&group_id=145

Status: Open
Priority: 3
Submitted By: Jérémie Humeau (jhumeau)
Assigned to: Jérémie Humeau (jhumeau)
Summary: Permutation-based crossover "order_xover.cpp" fails with permutations starting with an indice > 0 
Resolution: Accepted
Group: 1.1-patch1 and previous
Category: None


Initial Comment:
Permutation-based crossover "order_xover.cpp" fails with permutations starting with an indice > 0:



Location:

${PARADISEO_DIR}/paradiseo-peo/tutorial/examples/tsp/order_xover.cpp



Context:

This bug doesn't appear on the tsp example (the permutation starts with index 0)



Problems:

Bad index used on the vector named "v" if the permutation used starts with an index > 0



Correction to supply:



00054   for (unsigned i = cut1 ; i < cut2 ; i ++)

00055     {

00056       __child [l ++] = __par1 [i] ;

00057       v [__par1 [i]%numNodes] = true ;

                         ---------

..



00075       if (! v [__par2 [bidule]%numNodes])

                                    ---------

00076         {

00077           __child [l ++] = __par2 [bidule] ;

00078           v [__par2 [bidule]%numNodes] = true ;

                                  ---------







----------------------------------------------------------------------

You can respond by visiting: 
http://gforge.inria.fr/tracker/?func=detail&atid=663&aid=5425&group_id=145





Plus d'informations sur la liste de diffusion Paradiseo-help