@@ -105,7 +105,7 @@ HighsMipSolver::HighsMipSolver(HighsCallback& callback,
105105HighsMipSolver::~HighsMipSolver () = default ;
106106
107107void HighsMipSolver::run () {
108- const bool debug_logging = false ;// true;
108+ const bool debug_logging = false ; // true;
109109 modelstatus_ = HighsModelStatus::kNotset ;
110110
111111 if (submip) {
@@ -234,9 +234,11 @@ void HighsMipSolver::run() {
234234 int64_t num_nodes = mipdata_->nodequeue .numNodes ();
235235 if (num_nodes > 1 ) {
236236 // Should be exactly one node on the queue?
237- if (debug_logging) printf (
238- " HighsMipSolver::run() popping node from nodequeue with %d > 1 nodes\n " ,
239- HighsInt (num_nodes));
237+ if (debug_logging)
238+ printf (
239+ " HighsMipSolver::run() popping node from nodequeue with %d > 1 "
240+ " nodes\n " ,
241+ HighsInt (num_nodes));
240242 assert (num_nodes == 1 );
241243 }
242244
@@ -275,22 +277,23 @@ void HighsMipSolver::run() {
275277 auto limitReached = [&]() -> bool {
276278 bool limit_reached = false ;
277279 for (HighsInt iSearch = 0 ; iSearch < use_mip_concurrency; iSearch++) {
278- HighsSearch& search = iSearch == 0 ? master_search : worker_search;
279- limit_reached = limit_reached || search.limit_reached_ ;
280+ HighsSearch& search = iSearch == 0 ? master_search : worker_search;
281+ limit_reached = limit_reached || search.limit_reached_ ;
280282 }
281283 return limit_reached;
282284 };
283285
284286 // Lambda checking whether lopp pass is to be skipped
285- auto performedDive = [&](const HighsSearch& search, const HighsInt iSearch) -> bool {
287+ auto performedDive = [&](const HighsSearch& search,
288+ const HighsInt iSearch) -> bool {
286289 if (iSearch == 0 ) {
287- assert (search.performed_dive_ );
290+ assert (search.performed_dive_ );
288291 } else {
289- assert (!search.performed_dive_ );
292+ assert (!search.performed_dive_ );
290293 }
291294 return search.performed_dive_ ;
292295 };
293-
296+
294297 // Perform concurrent dives
295298 for (HighsInt iSearch = 0 ; iSearch < use_mip_concurrency; iSearch++) {
296299 HighsSearch& search = iSearch == 0 ? master_search : worker_search;
@@ -310,7 +313,6 @@ void HighsMipSolver::run() {
310313 analysis_.mipTimerStop (kMipClockOpenNodesToQueue );
311314
312315 search.flushStatistics ();
313-
314316 }
315317
316318 for (HighsInt iSearch = 0 ; iSearch < use_mip_concurrency; iSearch++) {
@@ -329,7 +331,8 @@ void HighsMipSolver::run() {
329331 prev_lower_bound, mipdata_->lower_bound , mipdata_->upper_bound ,
330332 mipdata_->upper_bound );
331333 mipdata_->printDisplayLine ();
332- if (debug_logging) printf (" HighsMipSolver::run() break on limit_reached - 0\n " );
334+ if (debug_logging)
335+ printf (" HighsMipSolver::run() break on limit_reached - 0\n " );
333336 break ;
334337 }
335338
@@ -361,7 +364,10 @@ void HighsMipSolver::run() {
361364 prev_lower_bound, mipdata_->lower_bound , mipdata_->upper_bound ,
362365 mipdata_->upper_bound );
363366 mipdata_->printDisplayLine ();
364- if (debug_logging) printf (" HighsMipSolver::run() break on mipdata_->domain.infeasible() - 0\n " );
367+ if (debug_logging)
368+ printf (
369+ " HighsMipSolver::run() break on mipdata_->domain.infeasible() - "
370+ " 0\n " );
365371 break ;
366372 }
367373
@@ -376,8 +382,10 @@ void HighsMipSolver::run() {
376382 mipdata_->upper_bound );
377383 mipdata_->printDisplayLine ();
378384 if (mipdata_->nodequeue .empty ()) {
379- if (debug_logging) printf (" HighsMipSolver::run() break on mipdata_->nodequeue.empty()\n " );
380- break ;
385+ if (debug_logging)
386+ printf (
387+ " HighsMipSolver::run() break on mipdata_->nodequeue.empty()\n " );
388+ break ;
381389 }
382390
383391 // if global propagation found bound changes, we update the local domain
@@ -479,7 +487,6 @@ void HighsMipSolver::run() {
479487 // remove the iteration limit when installing a new node
480488 // mipdata_->lp.setIterationLimit();
481489
482-
483490 /*
484491 } // HighsInt iSearch = 0...use_mip_concurrency
485492
@@ -493,10 +500,6 @@ void HighsMipSolver::run() {
493500 -analysis_.mipTimerRead (kMipClockNodeSearch );
494501 analysis_.mipTimerStart (kMipClockNodeSearch );
495502
496-
497-
498-
499-
500503 while (!mipdata_->nodequeue .empty ()) {
501504 assert (!search.hasNode ());
502505
@@ -522,7 +525,10 @@ void HighsMipSolver::run() {
522525 numStallNodes >= options_mip_->mip_max_stall_nodes ) {
523526 limit_reached = true ;
524527 modelstatus_ = HighsModelStatus::kSolutionLimit ;
525- if (debug_logging) printf (" HighsMipSolver::run() break on HighsModelStatus::kSolutionLimit\n " );
528+ if (debug_logging)
529+ printf (
530+ " HighsMipSolver::run() break on "
531+ " HighsModelStatus::kSolutionLimit\n " );
526532 break ;
527533 }
528534 } else
@@ -563,13 +569,17 @@ void HighsMipSolver::run() {
563569 mipdata_->updatePrimalDualIntegral (
564570 prev_lower_bound, mipdata_->lower_bound ,
565571 mipdata_->upper_bound , mipdata_->upper_bound );
566- if (debug_logging) printf (" HighsMipSolver::run() break on mipdata_->domain.infeasible() - 1\n " );
572+ if (debug_logging)
573+ printf (
574+ " HighsMipSolver::run() break on "
575+ " mipdata_->domain.infeasible() - 1\n " );
567576 break ;
568577 }
569578
570579 if (mipdata_->checkLimits ()) {
571580 limit_reached = true ;
572- if (debug_logging) printf (" HighsMipSolver::run() break on limit_reached - 1\n " );
581+ if (debug_logging)
582+ printf (" HighsMipSolver::run() break on limit_reached - 1\n " );
573583 break ;
574584 }
575585
@@ -622,7 +632,10 @@ void HighsMipSolver::run() {
622632 mipdata_->updatePrimalDualIntegral (
623633 prev_lower_bound, mipdata_->lower_bound , mipdata_->upper_bound ,
624634 mipdata_->upper_bound );
625- if (debug_logging) printf (" HighsMipSolver::run() break on mipdata_->domain.infeasible() - 2\n " );
635+ if (debug_logging)
636+ printf (
637+ " HighsMipSolver::run() break on mipdata_->domain.infeasible() "
638+ " - 2\n " );
626639 break ;
627640 }
628641
@@ -640,28 +653,29 @@ void HighsMipSolver::run() {
640653 mipdata_->lp .setStoredBasis (basis);
641654 }
642655
643- if (debug_logging) printf (" HighsMipSolver::run() break on completed node search\n " );
656+ if (debug_logging)
657+ printf (" HighsMipSolver::run() break on completed node search\n " );
644658 break ;
645659 } // while(!mipdata_->nodequeue.empty())
646660 analysis_.mipTimerStop (kMipClockNodeSearch );
647661 if (analysis_.analyse_mip_time ) {
648- this_node_search_time += analysis_.mipTimerRead (kMipClockNodeSearch );
649- analysis_.node_search_time .push_back (this_node_search_time);
662+ this_node_search_time += analysis_.mipTimerRead (kMipClockNodeSearch );
663+ analysis_.node_search_time .push_back (this_node_search_time);
650664 }
651- } // HighsInt iSearch = 0...use_mip_concurrency
652-
665+ } // HighsInt iSearch = 0...use_mip_concurrency
653666
654667 /*
655668 for (HighsInt iSearch = 0; iSearch < use_mip_concurrency; iSearch++) {
656669 HighsSearch& search = iSearch == 0 ? master_search : worker_search;
657670 if (!performedDive(search, iSearch)) continue;
658671 */
659- limit_reached = limitReached ();
660- if (limit_reached) {
661- if (debug_logging) printf (" HighsMipSolver::run() break on limit_reached - 2\n " );
662- break ;
663- }
664- // } // HighsInt iSearch = 0...use_mip_concurrency
672+ limit_reached = limitReached ();
673+ if (limit_reached) {
674+ if (debug_logging)
675+ printf (" HighsMipSolver::run() break on limit_reached - 2\n " );
676+ break ;
677+ }
678+ // } // HighsInt iSearch = 0...use_mip_concurrency
665679 } // while(search.hasNode())
666680 analysis_.mipTimerStop (kMipClockSearch );
667681
0 commit comments