Adam Kow
unread,Aug 10, 2018, 10:06:24 AM8/10/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Inspyred
Hi,
I would like to use PSO to solve TSP.
I tried to covert ant colony example for tsp to use PSO:
I changed the part of the code:
problem = inspyred.benchmarks.TSP(weights)
ea = inspyred.swarm.PSO(prng)
ea.terminator = inspyred.ec.terminators.generation_termination
ea.topology = inspyred.swarm.topologies.ring_topology
final_pop = ea.evolve(generator=problem.generator,
evaluator=problem.evaluator,
pop_size=100,
bounder=problem.bounder,
maximize=problem.maximize,
max_evaluations=30000, neighbour_size = 5)
Code is working but a am not sure if resuls are ok.
Can you give me an advice how to use PSO algoritm to solve TSP?
Thank You!