@@ -49,7 +49,7 @@ int main(int argc, char** argv) {
49
49
};
50
50
51
51
std::vector<std::string> methods = {" random" , " random+local" , " greedy" ,
52
- " grasp" , " genetic " };
52
+ " grasp" };
53
53
54
54
for (std::string method : methods) {
55
55
cda_rail::sim::ScoreHistoryCollection score_coll;
@@ -63,9 +63,9 @@ int main(int argc, char** argv) {
63
63
int max_samples;
64
64
if (method == " random" || method == " greedy" ||
65
65
method == " random+local" || method == " grasp" )
66
- max_samples = 4 ;
66
+ max_samples = 1 ;
67
67
else
68
- max_samples = 2 ;
68
+ max_samples = 1 ;
69
69
70
70
for (size_t sample = 0 ; sample < max_samples; sample++) {
71
71
// Method here
@@ -74,15 +74,15 @@ int main(int argc, char** argv) {
74
74
cda_rail::sim::ScoreHistory>
75
75
res;
76
76
if (method == " random" ) {
77
- res = solver.random_search (std::chrono::seconds{2500 }, {});
77
+ res = solver.random_search (std::chrono::seconds{10 }, {});
78
78
} else if (method == " greedy" ) {
79
- res = solver.greedy_search (std::chrono::seconds{2500 }, {},
79
+ res = solver.greedy_search (std::chrono::seconds{10 }, {},
80
80
{std::chrono::milliseconds{50 }});
81
81
} else if (method == " random+local" ) {
82
- res = solver.random_local_search (std::chrono::seconds{2500 },
82
+ res = solver.random_local_search (std::chrono::seconds{10 },
83
83
loc_params);
84
84
} else if (method == " grasp" ) {
85
- res = solver.grasp_search (std::chrono::seconds{2500 },
85
+ res = solver.grasp_search (std::chrono::seconds{10 },
86
86
{std::chrono::milliseconds{50 }},
87
87
loc_params);
88
88
} else if (method == " genetic" ) {
@@ -109,8 +109,10 @@ int main(int argc, char** argv) {
109
109
workers.pop_back ();
110
110
}
111
111
112
- score_coll.export_csv (output_path + " /" + model_name + " _" + method +
113
- " .csv" );
112
+ cda_rail::is_directory_and_create (output_path + " /results/methods/" +
113
+ model_name);
114
+ score_coll.export_csv (output_path + " /methods/" + model_name +
115
+ " /score_hist_" + method + " .csv" );
114
116
}
115
117
}
116
118
0 commit comments