@@ -2422,14 +2422,11 @@ 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 ->terminated () == this ->terminated ());
2426- if (this ->terminated ()) {
2425+ if (this ->terminatorTerminated ()) {
24272426 highsLogUser (options.log_options , HighsLogType::kInfo ,
24282427 " instance%d: terminated %6.4f (MIP)\n " , int (this ->mipRaceMyInstance ()), this ->mipsolver .timer_ .read ());
24292428 return true ;
24302429 }
2431- assert (this ->terminated () == this ->terminated ());
2432- if (this ->terminated ()) return true ;
24332430 }
24342431
24352432 // Possible user interrupt
@@ -2734,14 +2731,14 @@ void HighsMipSolverData::mipRaceReport() const {
27342731 if (mipsolver.mip_race_ .record ) mipsolver.mip_race_ .report ();
27352732}
27362733
2737- void HighsMipSolverData::terminate () {
2738- if (mipsolver.terminator_ .num_instance <= 0 ) return ;
2734+ void HighsMipSolverData::terminatorTerminate () {
2735+ assert (mipsolver.terminator_ .num_instance > 0 );
27392736 mipsolver.terminator_ .terminate ();
27402737}
27412738
2742- bool HighsMipSolverData::terminated () const {
2743- if (mipsolver. terminator_ . num_instance > 0 )
2744- mipsolver.termination_status_ = mipsolver.terminator_ .terminated ();
2739+ bool HighsMipSolverData::terminatorTerminated () const {
2740+ if (this -> terminatorActive () )
2741+ mipsolver.termination_status_ = mipsolver.terminator_ .terminationStatus ();
27452742 return mipsolver.termination_status_ != HighsModelStatus::kNotset ;
27462743}
27472744
@@ -3039,7 +3036,7 @@ void HighsTerminator::terminate() {
30393036 this ->record [this ->my_instance ] = HighsModelStatus::kHighsInterrupt ;
30403037}
30413038
3042- HighsModelStatus HighsTerminator::terminated () const {
3039+ HighsModelStatus HighsTerminator::terminationStatus () const {
30433040 assert (this ->record );
30443041 for (HighsInt instance = 0 ; instance < this ->num_instance ; instance++) {
30453042 if (this ->record [instance] != HighsModelStatus::kNotset )
@@ -3048,15 +3045,6 @@ HighsModelStatus HighsTerminator::terminated() const {
30483045 return HighsModelStatus::kNotset ;
30493046}
30503047
3051- bool HighsTerminator::notTerminated () 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-
30603048void HighsTerminator::report (const HighsLogOptions log_options) const {
30613049 highsLogUser (log_options, HighsLogType::kInfo , " \n Terminator: " );
30623050 for (HighsInt instance = 0 ; instance < this ->num_instance ; instance++)
0 commit comments