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

Method callbackAction

highs/lp_data/HighsCallback.cpp:77–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77bool 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

Callers 5

interruptCheckMethod · 0.80
InterruptCheckMethod · 0.80
queryExternalSolutionMethod · 0.80
bailoutMethod · 0.80

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected