Question about setStartOffset in SalesMan

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

Question about setStartOffset in SalesMan

Ashish Kulkarni-2
Hi
Can some one please explain how does setStartOffset work, and where do i set it

For example i have places A B C D E F G

so by default A will not be swaped as it should be the starting point,

so suppose if i want to have G as my last place can i put

setStartOffset(6);

and this will make A and G as non swapping cities? or will it make only G as not swapping.

Can i also add

setStartOffset(1);
setStartOffset(4);
setStartOffset(6);

to make A D and G as not swapping places,

Second question i have is where in my program set them,
for example if i have

public class MyTravellingSalesMan extends Salesman
{

private String []allFormats;
private GetTotalTimeFromList getTotalTimeFromList;
public JGapTravellingSalesManOptimization(GetTotalTimeFromList _getTotalTimeFromList, String [] _allFormats)throws Exception
{
logger = Logger.getLogger (this.getClass().getName());
this.allFormats = _allFormats;
this.getTotalTimeFromList = _getTotalTimeFromList;
setStartOffset(1);
setStartOffset(6);

}

Will this work

Ashish


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users