@@ -2422,13 +2422,13 @@ bool HighsMipSolverData::checkLimits(int64_t nodeOffset) const {
24222422 if (!mipsolver.submip ) {
24232423 highsLogUser (options.log_options , HighsLogType::kInfo ,
24242424 " instance%d: terminated? %6.4f (MIP)\n " , int (this ->mipRaceMyInstance ()), this ->mipsolver .timer_ .read ());
2425- assert (this ->mipRaceTerminated () == this ->terminatedNw ());
2426- if (this ->mipRaceTerminated ()) {
2425+ assert (this ->terminatedNw () == this ->terminatedNw ());
2426+ if (this ->terminatedNw ()) {
24272427 highsLogUser (options.log_options , HighsLogType::kInfo ,
24282428 " instance%d: terminated %6.4f (MIP)\n " , int (this ->mipRaceMyInstance ()), this ->mipsolver .timer_ .read ());
24292429 return true ;
24302430 }
2431- assert (this ->mipRaceTerminated () == this ->terminatedNw ());
2431+ assert (this ->terminatedNw () == this ->terminatedNw ());
24322432 if (this ->terminatedNw ()) return true ;
24332433 }
24342434
@@ -2728,18 +2728,6 @@ HighsInt HighsMipSolverData::mipRaceNewSolution(const HighsInt instance,
27282728 return mipsolver.mip_race_ .newSolution (instance, objective_value, solution);
27292729}
27302730
2731- void HighsMipSolverData::mipRaceTerminate () {
2732- assert (!mipsolver.submip );
2733- if (!mipsolver.mip_race_ .record ) return ;
2734- mipsolver.mip_race_ .terminate ();
2735- }
2736-
2737- bool HighsMipSolverData::mipRaceTerminated () const {
2738- assert (!mipsolver.submip );
2739- if (!mipsolver.mip_race_ .record ) return false ;
2740- return mipsolver.mip_race_ .terminated ();
2741- }
2742-
27432731void HighsMipSolverData::mipRaceReport () const {
27442732 assert (!mipsolver.submip );
27452733 if (mipsolver.terminator_ .record ) mipsolver.terminator_ .report (mipsolver.options_mip_ ->log_options );
@@ -2934,14 +2922,12 @@ HighsInt MipRaceIncumbent::read(const HighsInt last_incumbent_read,
29342922}
29352923
29362924void MipRaceRecord::clear () {
2937- this ->terminated .clear ();
29382925 this ->incumbent .clear ();
29392926}
29402927
29412928void MipRaceRecord::initialise (const HighsInt mip_race_concurrency,
29422929 const HighsInt num_col) {
29432930 this ->clear ();
2944- this ->terminated .assign (mip_race_concurrency, false );
29452931 MipRaceIncumbent incumbent_;
29462932 incumbent_.initialise (num_col);
29472933 for (HighsInt instance = 0 ; instance < mip_race_concurrency; instance++)
@@ -2962,10 +2948,6 @@ void MipRaceRecord::report(const HighsLogOptions log_options) const {
29622948 highsLogUser (log_options, HighsLogType::kInfo , " \n MipRaceRecord: " );
29632949 for (HighsInt instance = 0 ; instance < mip_race_concurrency; instance++)
29642950 highsLogUser (log_options, HighsLogType::kInfo , " %20d" , int (instance));
2965- highsLogUser (log_options, HighsLogType::kInfo , " \n Terminated: " );
2966- for (HighsInt instance = 0 ; instance < mip_race_concurrency; instance++)
2967- highsLogUser (log_options, HighsLogType::kInfo , " %20s" ,
2968- this ->terminated [instance] ? " T" : " F" );
29692951 highsLogUser (log_options, HighsLogType::kInfo , " \n StartWrite: " );
29702952 for (HighsInt instance = 0 ; instance < mip_race_concurrency; instance++)
29712953 highsLogUser (log_options, HighsLogType::kInfo , " %20d" ,
@@ -3022,18 +3004,6 @@ bool MipRace::newSolution(const HighsInt instance, double objective,
30223004 return false ;
30233005}
30243006
3025- void MipRace::terminate () {
3026- assert (this ->record );
3027- this ->record ->terminated [this ->my_instance ] = true ;
3028- }
3029-
3030- bool MipRace::terminated () const {
3031- assert (this ->record );
3032- for (HighsInt instance = 0 ; instance < this ->concurrency (); instance++)
3033- if (this ->record ->terminated [instance]) return true ;
3034- return false ;
3035- }
3036-
30373007void MipRace::report () const {
30383008 assert (this ->record );
30393009 this ->record ->report (this ->log_options );
@@ -3078,6 +3048,15 @@ HighsModelStatus HighsTerminator::terminatedNw() const {
30783048 return HighsModelStatus::kNotset ;
30793049}
30803050
3051+ bool HighsTerminator::notTerminatedNw () const {
3052+ assert (this ->record );
3053+ for (HighsInt instance = 0 ; instance < this ->num_instance ; instance++) {
3054+ if (this ->record [instance] != HighsModelStatus::kNotset )
3055+ return false ;
3056+ }
3057+ return true ;
3058+ }
3059+
30813060void HighsTerminator::report (const HighsLogOptions log_options) const {
30823061 highsLogUser (log_options, HighsLogType::kInfo , " \n Terminator: " );
30833062 for (HighsInt instance = 0 ; instance < this ->num_instance ; instance++)
0 commit comments