-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataSet.java
57 lines (42 loc) · 1.37 KB
/
DataSet.java
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
57
public class DataSet {
private int alpha = 1; // >= 0 is a parameter to control the influence of Tau (τ)
private int beta = 2; // >= 1 is a parameter to control the influence of eta (η)
private int cities=5; //Let us suppose we have got a TSP problem with 5 cities
private double [][]distance = new double[cities][cities]; //The next matrix will save the "distance" between cities
private double [][]tau = new double[cities][cities]; //For each segment between "cities" we give initial pheromone value
private double [][]eta = new double[cities][cities];
private int []routeAnt = new int[cities-1];
public int[] getRouteAnt() {
return routeAnt;
}
public void setRouteAnt(int[] routeAnt) {
this.routeAnt = routeAnt;
}
public int getAlpha() {
return alpha;
}
public int getBeta() {
return beta;
}
public double[][] getEta() {
return eta;
}
public void setEta(double[][] eta) {
this.eta = eta;
}
public int getCities() {
return cities;
}
public double[][] getDistance() {
return distance;
}
public void setDistance(double[][] distance) {
this.distance = distance;
}
public double[][] getTau() {
return tau;
}
public void setTau(double[][] tau) {
this.tau = tau;
}
}