Skip to content

Commit df80c23

Browse files
committed
Fixed failing test. Re-added cutpool_num_cut, it's redundant, but probably easier to use.
1 parent ee40e7d commit df80c23

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

check/TestCallbacks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ HighsCallbackFunctionType userMipCutPoolCallback =
174174
if (dev_run) {
175175
printf("userMipCutPoolCallback: dim(%2d, %2d, %2d)\n",
176176
int(data_out->cutpool_num_col), int(data_out->cutpool_num_cut),
177-
int(data_out->cutpool_num_nz));
177+
int(data_out->cutpool_value.size()));
178178
for (HighsInt iCut = 0; iCut < data_out->cutpool_num_cut; iCut++) {
179179
printf("Cut %d\n", int(iCut));
180180
for (HighsInt iEl = data_out->cutpool_start[iCut];

src/lp_data/HighsCallback.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ struct HighsCallbackDataOut {
4343
double mip_gap;
4444
std::vector<double> mip_solution;
4545
HighsInt cutpool_num_col;
46+
HighsInt cutpool_num_cut;
4647
std::vector<HighsInt> cutpool_start;
4748
std::vector<HighsInt> cutpool_index;
4849
std::vector<double> cutpool_value;

src/mip/HighsMipSolver.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -851,9 +851,7 @@ void HighsMipSolver::callbackGetCutPool() const {
851851
HighsCallbackDataOut& data_out = callback_->data_out;
852852

853853
HighsSparseMatrix cut_matrix;
854-
HighsInt num_cut;
855-
856-
mipdata_->lp.getCutPool(data_out.cutpool_num_col, num_cut,
854+
mipdata_->lp.getCutPool(data_out.cutpool_num_col, data_out.cutpool_num_cut,
857855
data_out.cutpool_lower, data_out.cutpool_upper,
858856
cut_matrix);
859857

0 commit comments

Comments
 (0)