MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / interruptCheck

Method interruptCheck

highs/ipm/hipo/ipm/Control.cpp:18–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16double Control::elapsed() const { return timer_ ? timer_->read() : -1.0; }
17
18Int Control::interruptCheck(const Int ipm_iteration_count) const {
19 HighsTaskExecutor::getThisWorkerDeque()->checkInterrupt();
20
21 if (options_ && options_->time_limit >= 0 &&
22 elapsed() > options_->time_limit) {
23 return kStatusTimeLimit;
24 }
25
26 if (callback_) {
27 if (callback_->user_callback && callback_->active[kCallbackIpmInterrupt]) {
28 callback_->clearHighsCallbackOutput();
29 callback_->data_out.ipm_iteration_count = ipm_iteration_count;
30 if (callback_->callbackAction(kCallbackIpmInterrupt, "IPM interrupt"))
31 return kStatusUserInterrupt;
32 }
33 }
34
35 return 0;
36}
37
38} // namespace hipo

Callers 1

checkInterruptMethod · 0.80

Calls 3

callbackActionMethod · 0.80
checkInterruptMethod · 0.45

Tested by

no test coverage detected