@@ -147,6 +147,7 @@ int run_single_file(std::string file_path,
147147 int num_cpu_threads,
148148 bool write_log_file,
149149 bool log_to_console,
150+ int reliability_branching,
150151 double time_limit)
151152{
152153 const raft::handle_t handle_{};
@@ -196,14 +197,14 @@ int run_single_file(std::string file_path,
196197 }
197198 }
198199 }
199-
200200 settings.time_limit = time_limit;
201201 settings.heuristics_only = heuristics_only;
202202 settings.num_cpu_threads = num_cpu_threads;
203203 settings.log_to_console = log_to_console;
204204 settings.tolerances .relative_tolerance = 1e-12 ;
205205 settings.tolerances .absolute_tolerance = 1e-6 ;
206206 settings.presolve = true ;
207+ settings.reliability_branching = reliability_branching;
207208 cuopt::linear_programming::benchmark_info_t benchmark_info;
208209 settings.benchmark_info_ptr = &benchmark_info;
209210 auto start_run_solver = std::chrono::high_resolution_clock::now ();
@@ -256,6 +257,7 @@ void run_single_file_mp(std::string file_path,
256257 int num_cpu_threads,
257258 bool write_log_file,
258259 bool log_to_console,
260+ int reliability_branching,
259261 double time_limit)
260262{
261263 std::cout << " running file " << file_path << " on gpu : " << device << std::endl;
@@ -271,6 +273,7 @@ void run_single_file_mp(std::string file_path,
271273 num_cpu_threads,
272274 write_log_file,
273275 log_to_console,
276+ reliability_branching,
274277 time_limit);
275278 // this is a bad design to communicate the result but better than adding complexity of IPC or
276279 // pipes
@@ -354,6 +357,11 @@ int main(int argc, char* argv[])
354357 .help (" track allocations (t/f)" )
355358 .default_value (std::string (" f" ));
356359
360+ program.add_argument (" --reliability-branching" )
361+ .help (" reliability branching: -1 (automatic), 0 (disable) or k > 0 (use k)" )
362+ .scan <' i' , int >()
363+ .default_value (-1 );
364+
357365 // Parse arguments
358366 try {
359367 program.parse_args (argc, argv);
@@ -376,12 +384,13 @@ int main(int argc, char* argv[])
376384 std::string result_file;
377385 int batch_num = -1 ;
378386
379- bool heuristics_only = program.get <std::string>(" --heuristics-only" )[0 ] == ' t' ;
380- int num_cpu_threads = program.get <int >(" --num-cpu-threads" );
381- bool write_log_file = program.get <std::string>(" --write-log-file" )[0 ] == ' t' ;
382- bool log_to_console = program.get <std::string>(" --log-to-console" )[0 ] == ' t' ;
383- double memory_limit = program.get <double >(" --memory-limit" );
384- bool track_allocations = program.get <std::string>(" --track-allocations" )[0 ] == ' t' ;
387+ bool heuristics_only = program.get <std::string>(" --heuristics-only" )[0 ] == ' t' ;
388+ int num_cpu_threads = program.get <int >(" --num-cpu-threads" );
389+ bool write_log_file = program.get <std::string>(" --write-log-file" )[0 ] == ' t' ;
390+ bool log_to_console = program.get <std::string>(" --log-to-console" )[0 ] == ' t' ;
391+ double memory_limit = program.get <double >(" --memory-limit" );
392+ bool track_allocations = program.get <std::string>(" --track-allocations" )[0 ] == ' t' ;
393+ int reliability_branching = program.get <int >(" --reliability-branching" );
385394
386395 if (num_cpu_threads < 0 ) { num_cpu_threads = omp_get_max_threads () / n_gpus; }
387396
@@ -469,6 +478,7 @@ int main(int argc, char* argv[])
469478 num_cpu_threads,
470479 write_log_file,
471480 log_to_console,
481+ reliability_branching,
472482 time_limit);
473483 } else if (sys_pid < 0 ) {
474484 std::cerr << " Fork failed!" << std::endl;
@@ -509,6 +519,7 @@ int main(int argc, char* argv[])
509519 num_cpu_threads,
510520 write_log_file,
511521 log_to_console,
522+ reliability_branching,
512523 time_limit);
513524 }
514525
0 commit comments