Merge branch 'gtsp-comb'

master
Alinson S. Xavier 11 years ago
commit 5d4a6649aa

@ -1,201 +1,101 @@
200 50
31.00 90.00 0
53.00 38.00 1
73.00 38.00 2
59.00 41.00 3
4.00 8.00 4
44.00 92.00 5
64.00 54.00 6
43.00 16.00 7
13.00 24.00 8
32.00 39.00 9
28.00 72.00 10
47.00 79.00 11
81.00 29.00 12
11.00 12.00 13
12.00 43.00 14
83.00 43.00 15
34.00 36.00 16
33.00 59.00 17
75.00 93.00 18
1.00 31.00 19
53.00 97.00 20
75.00 18.00 21
3.00 18.00 22
86.00 16.00 23
42.00 19.00 24
55.00 70.00 25
91.00 54.00 26
1.00 25.00 27
35.00 13.00 28
37.00 48.00 29
56.00 20.00 30
43.00 42.00 31
9.00 77.00 32
2.00 36.00 33
22.00 3.00 34
67.00 27.00 35
0.00 42.00 36
45.00 56.00 37
12.00 84.00 38
72.00 54.00 39
55.00 28.00 40
24.00 98.00 41
34.00 26.00 42
23.00 70.00 43
91.00 61.00 44
18.00 99.00 45
33.00 13.00 46
42.00 42.00 47
90.00 44.00 48
78.00 64.00 49
99.00 97.00 18
92.00 51.00 26
91.00 89.00 18
7.00 3.00 4
25.00 80.00 10
57.00 80.00 11
60.00 34.00 3
79.00 46.00 15
12.00 54.00 14
16.00 3.00 34
15.00 86.00 38
54.00 49.00 3
0.00 48.00 36
92.00 22.00 23
59.00 43.00 3
19.00 51.00 14
95.00 11.00 23
92.00 54.00 26
66.00 18.00 21
86.00 24.00 12
50.00 98.00 20
58.00 81.00 11
45.00 70.00 11
36.00 61.00 17
25.00 3.00 34
48.00 31.00 40
4.00 0.00 4
80.00 48.00 15
94.00 24.00 23
70.00 53.00 39
68.00 41.00 2
56.00 15.00 30
4.00 49.00 36
69.00 71.00 49
19.00 8.00 34
47.00 69.00 25
6.00 5.00 4
3.00 51.00 36
27.00 39.00 9
65.00 4.00 21
94.00 65.00 44
35.00 99.00 0
65.00 15.00 21
47.00 59.00 37
40.00 69.00 10
65.00 60.00 6
10.00 21.00 8
27.00 67.00 10
70.00 48.00 39
38.00 41.00 47
56.00 85.00 11
63.00 63.00 6
42.00 66.00 37
66.00 21.00 35
57.00 31.00 40
25.00 51.00 17
96.00 12.00 23
2.00 13.00 4
28.00 49.00 29
25.00 20.00 42
18.00 90.00 38
32.00 81.00 0
11.00 59.00 14
48.00 34.00 1
7.00 38.00 33
27.00 64.00 43
75.00 90.00 18
79.00 17.00 21
8.00 45.00 14
90.00 65.00 44
29.00 67.00 10
69.00 77.00 25
79.00 71.00 49
91.00 59.00 44
73.00 68.00 49
79.00 43.00 15
10.00 11.00 13
24.00 21.00 8
70.00 72.00 49
7.00 78.00 32
62.00 87.00 20
94.00 37.00 48
77.00 73.00 49
6.00 86.00 38
70.00 96.00 18
3.00 99.00 45
63.00 72.00 25
29.00 95.00 0
96.00 72.00 44
54.00 69.00 25
40.00 34.00 16
12.00 50.00 14
97.00 89.00 18
23.00 20.00 8
13.00 83.00 38
50.00 76.00 11
70.00 44.00 2
13.00 47.00 14
17.00 20.00 8
85.00 39.00 15
91.00 32.00 12
65.00 20.00 35
27.00 61.00 17
92.00 33.00 48
82.00 32.00 12
67.00 47.00 6
34.00 17.00 28
36.00 57.00 17
37.00 49.00 29
40.00 87.00 5
25.00 62.00 43
31.00 91.00 0
10.00 0.00 4
11.00 47.00 14
91.00 31.00 12
88.00 82.00 18
63.00 54.00 6
2.00 42.00 36
67.00 94.00 18
76.00 50.00 39
78.00 95.00 18
97.00 12.00 23
64.00 33.00 35
70.00 1.00 21
34.00 62.00 17
40.00 12.00 7
25.00 23.00 42
3.00 87.00 38
23.00 66.00 43
86.00 67.00 44
97.00 75.00 44
49.00 13.00 7
81.00 52.00 15
7.00 48.00 14
46.00 35.00 1
50.00 25.00 40
31.00 47.00 29
89.00 95.00 18
32.00 59.00 17
49.00 19.00 7
74.00 89.00 18
31.00 99.00 41
13.00 34.00 14
38.00 88.00 0
52.00 24.00 40
55.00 49.00 3
51.00 57.00 37
14.00 32.00 8
9.00 22.00 8
33.00 7.00 28
100 60
49.00 95.00 0
26.00 66.00 1
76.00 50.00 2
39.00 65.00 3
20.00 7.00 4
60.00 91.00 5
2.00 26.00 6
67.00 80.00 7
46.00 99.00 8
90.00 42.00 9
70.00 59.00 10
37.00 83.00 11
83.00 7.00 12
91.00 93.00 13
90.00 0.00 14
27.00 40.00 15
47.00 6.00 16
58.00 23.00 17
56.00 49.00 18
88.00 28.00 19
56.00 0.00 20
71.00 10.00 21
27.00 38.00 22
90.00 73.00 23
89.00 80.00 24
15.00 60.00 25
91.00 4.00 26
43.00 75.00 27
12.00 86.00 28
20.00 54.00 29
38.00 99.00 30
94.00 85.00 31
5.00 4.00 32
8.00 13.00 33
53.00 48.00 34
41.00 10.00 35
48.00 12.00 36
72.00 75.00 37
50.00 63.00 38
1.00 92.00 39
95.00 68.00 40
52.00 87.00 41
73.00 47.00 42
62.00 37.00 43
85.00 34.00 44
91.00 23.00 45
33.00 38.00 46
42.00 20.00 47
4.00 48.00 48
68.00 98.00 49
10.00 68.00 50
10.00 82.00 51
96.00 13.00 52
45.00 97.00 53
5.00 41.00 54
65.00 9.00 55
28.00 90.00 56
8.00 42.00 57
79.00 93.00 58
76.00 71.00 59
68.00 61.00 10
61.00 80.00 7
52.00 55.00 18
0.00 9.00 32
3.00 20.00 6
7.00 13.00 33
88.00 17.00 45
96.00 84.00 31
82.00 93.00 58
33.00 39.00 46
34.00 51.00 15
0.00 14.00 33
41.00 8.00 35
56.00 21.00 17
53.00 84.00 41
44.00 73.00 27
98.00 57.00 40
53.00 50.00 34
12.00 53.00 25
59.00 16.00 17
73.00 18.00 21
81.00 14.00 12
36.00 29.00 46
98.00 70.00 40
23.00 84.00 56
62.00 9.00 55
35.00 62.00 3
24.00 28.00 22
71.00 32.00 43
1.00 76.00 51
69.00 45.00 42
50.00 67.00 38
2.00 3.00 32
69.00 67.00 10
9.00 29.00 6
35.00 82.00 11
99.00 16.00 52
48.00 35.00 34
98.00 47.00 9
58.00 21.00 17

@ -147,8 +147,6 @@ static int BNC_solve_node(struct BNC *bnc, int depth)
bnc->best_x = x;
x = 0;
log_info("Found a better integral solution:\n");
log_info(" obj val = %.2lf **\n", objval);

@ -58,7 +58,6 @@ int GTSP_create_random_problem(
struct Graph *graph = 0;
int edge_count = (node_count * (node_count - 1)) / 2;
http://ns-webapp-b.private.uwaterloo.ca/wifisetup/index.html?cmd=login&switchip=fd74:6b6a:8eca:402::6&mac=44:6d:57:16:be:2a&ip=2620:101:f000:701::5d3c:2c75&essid=uw-wifi-setup-no-encrypt&apname=ENG-AP-E5-5--E&apgroup=E5&url=http%3A%2F%2Fwww%2Egstatic%2Ecom%2Fgenerate_204
graph = (struct Graph *) malloc(sizeof(struct Graph));
abort_if(!graph, "could not allocate graph\n");
@ -619,11 +618,14 @@ int GTSP_main(int argc, char **argv)
int init_val ;
init_val = inital_tour_value(&data);
log_info("Writing random instance to file gtsp.in\n");
rval = GTSP_write_problem(&data, "gtsp.in");
char filename[100];
sprintf(filename, "input/gtsp-m%d-n%d-s%d.in", input_cluster_count,
input_node_count, SEED);
log_info("Writing random instance to file %s\n", filename);
rval = GTSP_write_problem(&data, filename);
abort_if(rval, "GTSP_write_problem failed");
@ -883,7 +885,7 @@ int Larg_neighborhood_search(int* tour, struct GTSP *data){
//LNS starts
for(int iter = 0; iter < 500; iter++){
for(int iter = 0; iter < 1000; iter++){
//Delete a vertex
int delete_vertex = rand()%(data->cluster_count - 1) + 1;