//Ha alguma garantia de que essas particulas aleatorias sejam circuitos hamiltonianos? public static TSPParticle RandomGenerate(TSPParticleSwarm containingSwarm, TravellingSalesmanMap Map) { TSPParticle newParticle = new TSPParticle(containingSwarm, Map); newParticle.Velocity = TSPVelocity.RandomGenerate(Map); newParticle.Position = new TSPPosition(Aleatoriety.GetRandomIntegerSequencePermutation(1, Map.CityCount).ToList()); newParticle.EvaluateSelf(); return newParticle; }
//Ha alguma garantia de que essas particulas aleatorias sejam circuitos hamiltonianos? public static TSPParticle RandomGenerate(TSPParticleSwarm containingSwarm, TravellingSalesmanMap Map) { TSPParticle newParticle = new TSPParticle(containingSwarm, Map); newParticle.Velocity = TSPVelocity.RandomGenerate(Map); newParticle.Position = new TSPPosition(Aleatoriety.GetRandomIntegerSequencePermutation(1, Map.CityCount).ToList()); newParticle.EvaluateSelf(); return(newParticle); }