mardi 26 janvier 2016

matlab genetic algorithm mobil robot path planning creating random numbers related to links

I want to create a genetic algorithm for mobil robot path planning.there are obstacles and there are only 15 nodes at all. Each node linked to 2,three or four other nodes. For creating 64 bit random numbers how can I create related to this links? number of nested if else statements is very high when I tried to start.

firstlink=[1,3,4]; 
link2=[0,2];
link3=[1,5,11];
link4=[0,6,8];
link5=[0,5,6];
link6=[2 4 10];
link7=[3,4,7];
link8=[6,9,13];
link9=[3,13];
link10=[7,10,15];
link11=[5,9,11];
link12=[2,10,12];
link13=[11,15];
link14=[7,8,14,15];
link15=[13,15];
link16=[9,12,13,14];

after that, I select randomly each of this link but number of conditions are very high. Is there an easy way to do it? thanks,




Aucun commentaire:

Enregistrer un commentaire