| 75 | } |
| 76 | |
| 77 | bool HighsCallback::callbackAction(const int callback_type, |
| 78 | std::string message) { |
| 79 | if (!callbackActive(callback_type)) return false; |
| 80 | this->user_callback(callback_type, message.c_str(), &this->data_out, |
| 81 | &this->data_in, this->user_callback_data); |
| 82 | // Assess any action |
| 83 | bool action = this->data_in.user_interrupt; |
| 84 | |
| 85 | // Check for no action if case not handled internally |
| 86 | if (callback_type == kCallbackMipImprovingSolution || |
| 87 | callback_type == kCallbackMipSolution || |
| 88 | callback_type == kCallbackMipLogging || |
| 89 | callback_type == kCallbackMipGetCutPool || |
| 90 | callback_type == kCallbackMipDefineLazyConstraints || |
| 91 | callback_type == kCallbackMipUserSolution) |
| 92 | assert(!action); |
| 93 | return action; |
| 94 | } |
| 95 | |
| 96 | // Conversions for C API |
| 97 |
no test coverage detected