Code is a real mess, that is not how you should use branches... Still I don't think I will ever clean it, so will just give hints how to use this mess. Will do that by giving examples how to run it for every stage I listed on my kaggle post. You may have troubles running it on Windows because of gettimeofday (comment it out maybe..).
I will just provide one of my .par files for LKH. Something like this with maybe different seed and multiple reruns and changes to PATCHING MOVE_TYPE params gave me my raw score.
- Switch to master branch.
- Make sure to have cities.csv and .cand file in the same directory.
- Comment 'readTourSubmission(argv, tour)'. Oh shame on me...
- gcc -Wall -O3 -lm -lpthread main.c
- Run with './a.out out9.proc submission.csv submission.csv 2 100 197769'. Arguments: raw TSP, submission.csv to continue from, output submission.csv, number of threads, timelimit seconds, CycleSize.
- To restart you may want to undo step 3, and maybe change itK in code.
- Switch to pure_gain branch (don't question the name).
- Same as first stage
- Compile as in a first stage
- Run with './a.out out9.proc submission.csv submission.csv 2 10 1000 10'. Arguments same as in a first stage but last one is maximum K for opt to look into.
- Here I would often find myself changing 'datas[i]->pureGainLimit = -1;' to someting like 0, -3. Shame on me for not having it as argument.
Fourth and fith stage:
- Switch to gpx branch.
- Apart from files for other stages you will need .tsp file here
- Sudden switch to C++ to incorporate GPX2 code, run make
- Run with './a.out submission.csv submission.csv submission.csv 2 0.1 1000'. Instead of raw TSP for first argument here I have some other submission.csv I wanted to get additional candidates from.
- Here I will change often pureLimit variable with is basically 'The positive gain criterion' for different K in opts. Also number of kicks in 'for (int kick = 0; kick < 11; kick++)'. And maxStep minStep at the same place to kick at smalled or larget chunks of tour.