forked from biorobotics/GLNS_lazy_edge_eval.jl
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest.jl
More file actions
16 lines (11 loc) · 1.68 KB
/
test.jl
File metadata and controls
16 lines (11 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import Pkg
Pkg.activate(".")
using NPZ
using GLNS
given_initial_tours = [ 0, 1, 35, 86, 18, 69, 120, 137, 103, 52, 154, 171, 222, 205, 188, 273, 239, 256, 307, 290, 341, 324, 392, 358, 375, 426, 460, 409, 443, 494, 477, 528, 562, 511, 596, 545, 579, 613, 681, 647, 630, 664, 715, 698, 749, 732, 766, 834, 817, 783, 800, 851, 885, 868, 936, 902, 919, 970, 987, 953, 1004, 1021, 1055, 1089, 1072, 1038, 1106, 1123, 1140, 1191, 1208, 1157, 1174, 1242, 1225, 1276, 1310, 1344, 1293, 1259, 1327, 1378, 1412, 1429, 1361, 1395, 1463, 1480, 1497, 1531, 1548, 1446, 1565, 1514, 1582, 1616, 1599, 1650, 1633, 1684, 1718, 1735, 1752, 1667, 1769, 1701, 1837, 1854, 1786, 1803, 1820, 1888, 1905, 1871, 1922, 1939, 1956, 1990, 2007, 1973, 2024, 2041, 2058, 2075, 2126, 2092, 2160, 2109, 2143, 2177, 2194, 2228, 2211, 2245, 2279, 2296, 2313, 2262, 2347, 2364, 2330, 2381, 2415, 2432, 2398, 2483, 2466, 2500, 2449, 2517, 2551, 2585, 2602, 2534, 2636, 2568, 2653, 2619, 2670, 2738, 2704, 2687, 2789, 2772, 2721, 2806, 2755, 2823, 2840, 2857, 2908, 2925, 2891, 2874, 3010, 2942, 2959, 2993, 2976, 3061, 3027, 3044, 3095, 3112, 3146, 3078, 3163, 3180, 3197, 3129, 3231, 3248, 3265, 3214, 3282, 3299, 3316, 3333, 3367, 3350, 3384] .+ 1
ARGS = ["/home/cobra/GLKH-1.1/GTSPLIB/debug/custom0.gtsp", "-output=custom.tour", "-socket_port=65432", "-lazy_edge_eval=0", "-new_socket_each_instance=0", "-verbose=3", "-mode=fast"]
npyfile = first(ARGS[1], length(ARGS[1]) - length(".gtsp")) * ".npy"
dist = npzread(npyfile)
inf_val = maximum(dist)
@time GLNS.main(ARGS, 10., inf_val, given_initial_tours, dist, 10)
@time GLNS.main(ARGS, 10., inf_val, given_initial_tours, dist, 10)