blob: 94417ae112c38d2c3971fd5371bdcfde90c0e11b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
package jcgp.backend.modules.problem;
import java.io.File;
import jcgp.backend.function.TravellingSalesmanFunctions;
import jcgp.backend.population.Chromosome;
import jcgp.backend.population.Population;
import jcgp.backend.resources.ModifiableResources;
import jcgp.backend.resources.Resources;
/**
* Travelling salesman problem
* <br><br>
* Using this problem type, travelling salesman tours can be evolved.
* {@code parseData()} must be used to load the desired city
* coordinates in the standard .tsp format.
*
* @see TravellingSalesmanFunctions
* @author Eduardo Pedroni
*
*/
public class TravellingSalesmanProblem extends Problem {
/**
* Construct a new instance of TravellingSalesmanProblem.
*
* @param resources a reference to the experiment's resources.
*/
public TravellingSalesmanProblem(Resources resources) {
setFunctionSet(new TravellingSalesmanFunctions());
setName("Travelling salesman");
setFileExtension(".tsp");
}
@Override
public void evaluate(Population population, Resources resources) {
// TODO Auto-generated method stub
}
@Override
public boolean isPerfectSolution(Chromosome fittest) {
// TODO Auto-generated method stub
return false;
}
@Override
public void parseProblemData(File file, ModifiableResources resources) {
// TODO Auto-generated method stub
}
@Override
public boolean isImprovement(Chromosome fittest) {
// TODO Auto-generated method stub
return false;
}
}
|