Skip to content

Commit 51a701e

Browse files
Update Highs callback
1 parent 5804c79 commit 51a701e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/MIPSolver/MIPSolverHighs.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ namespace SHOT
2727

2828
// Callback that correctly indents Highs log messages and prints them using SHOT's logging functionality
2929
HighsCallbackFunctionType highsCallback
30-
= [](int callback_type, const std::string& message, const HighsCallbackDataOut* data_out,
31-
HighsCallbackDataIn* data_in, void* user_callback_data) {
30+
= [](int callback_type, const std::string& message, const HighsCallbackOutput* data_out,
31+
HighsCallbackInput* data_in, void* user_callback_data) {
3232
HighsMipData callback_data = *(static_cast<HighsMipData*>(user_callback_data));
3333
auto env = callback_data.env;
3434

@@ -65,8 +65,7 @@ HighsCallbackFunctionType highsCallback
6565

6666
if(callback_type == kCallbackMipSolution)
6767
{
68-
std::vector<double> solution(
69-
data_out->mip_solution, data_out->mip_solution + MIPSolver->getNumberOfVariables());
68+
std::vector<double> solution = data_out->mip_solution;
7069

7170
double hashValue = Utilities::calculateHash(solution);
7271

0 commit comments

Comments
 (0)