@@ -78,25 +78,25 @@ int main() {
78
78
79
79
VariableNeighborhoodDescent<ESolutionTSP> VND (demo.eval , ns_list);
80
80
// VND.setVerbose();//
81
- ILSLPerturbationLPlus2<ESolutionTSP> pert (demo.eval , demo.nsSwap , rg2);
82
-
83
- IteratedLocalSearchLevels<ESolutionTSP> ils (demo.eval , nnptr::copy (initRand),
84
- nnptr::copy (VND),
85
- nnptr::copy (pert), 10 , 5 );
86
- // ils.setVerbose();
87
-
88
- std::cout << " will start ILS for 10 seconds" << std::endl;
89
-
90
- optframe::Timer t;
91
- ils.setVerbose ();
92
- auto status = ils.search (
93
- StopCriteria<ESolutionTSP::second_type>{10.0 }); // 3.0 seconds max
94
- ESolutionTSP best = *status.best ;
95
- std::cout << " spent time: " << t.now () << " s" << std::endl;
96
- // best solution value
97
- best.second .print ();
98
- std::cout << " solution: " << best.first << std::endl;
99
-
100
- std::cout << " FINISHED" << std::endl;
101
- return 0 ;
81
+ ILSLPerturbationLPlus2<ESolutionTSP> pert (demo.eval , demo.nsSwap , rg2);
82
+
83
+ IteratedLocalSearchLevels<ESolutionTSP> ils (demo.eval , nnptr::copy (initRand),
84
+ nnptr::copy (VND), nnptr::copy (pert ),
85
+ 10 , 5 );
86
+ // ils.setVerbose();
87
+
88
+ std::cout << " will start ILS for 10 seconds" << std::endl;
89
+
90
+ optframe::Timer t;
91
+ ils.setVerbose ();
92
+ auto status = ils.search (
93
+ StopCriteria<ESolutionTSP::second_type>{10.0 }); // 3.0 seconds max
94
+ ESolutionTSP best = *status.best ;
95
+ std::cout << " spent time: " << t.now () << " s" << std::endl;
96
+ // best solution value
97
+ best.second .print ();
98
+ std::cout << " solution: " << best.first << std::endl;
99
+
100
+ std::cout << " FINISHED" << std::endl;
101
+ return 0 ;
102
102
}
0 commit comments