Re: TravellingSalesMan example

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: TravellingSalesMan example

Klaus Meffert-5
there is an example implementation for TSP from Audrius: Pleae have a look at the class examples.salesman.TravellingSalesman, this class uses Integer's. It should be easy to rewrite them to doubles.



From: John Spangenberg [mailto:[hidden email]]
Sent: Sunday, November 27, 2011 5:35 PM
To: [hidden email]
Subject: [jgap-users] TravellingSalesMan example

Hi there,

I am completely new to JGAP and genetic algorithms in general. But I would like to enhance the TravellingsSalesMan example a little.
In the source code of the TravelingSalesMan demo ( the author Audrius Meskauskas recommends to define a new type of gene, corresponding the data about a "city". For example, it can contain the city X and Y co-ordinates, used by the distance function.

Does anyone have a simple code example of such a gene type, in which the x/y coordinates are of type double?

Many thanks in advance,

John Spangenberg

All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
jgap-users mailing list
[hidden email]