Cuts Parameter and B&B Root Node User Cuts
AnsweredHello,
I am currently testing new Valid Inequalities (VIs) with Gurobi. I am convinced that these inequalities strongly cut of the LP relaxation.
To test their efficacy I am adding the cuts at the root node of the B&B tree. In addition, I have set the following series of parameters so that Gurobi does not perturb the cut generating process: Presolve=0, Heuristics=0, Cuts=0, Symmetry=0, Disconnected=0, VarBranch=2.
The problem I am encountering is the following: For each call a cut is generated and added by Gurobi to the model. What I don't understand is that Gurobi leaves the root node of the B&B tree even if the last VI is added to the model. The USER cutting plane parameter in the first log confirms that the VI is indeed added. Hence, Gurobi skips the callback call after adding the last cut and immediately sttarts branching. Moreover, when I use Cuts=1, I do not get this issue and more user cuts are added, this is shown in the second log. Hence, I believe my issue is related to the Cuts parameter.
Thanks in advance for your help.
Regards,
Marius Roland
Here is a log with Cuts=0:
Academic license - for non-commercial use only - expires 2024-06-08
Set parameter Threads to value 1
Set parameter IntFeasTol to value 1e-09
Set parameter Presolve to value 0
Set parameter Heuristics to value 0
Set parameter Cuts to value 0
Set parameter Symmetry to value 0
Set parameter Disconnected to value 0
Set parameter VarBranch to value 2
Set parameter TimeLimit to value 1.7613764286041260e+01
Gurobi Optimizer version 10.0.1 build v10.0.1rc0 (linux64)
CPU model: AMD Ryzen 5 5500U with Radeon Graphics, instruction set [SSE2|AVX|AVX2]
Thread count: 6 physical cores, 12 logical processors, using up to 1 threads
Optimize a model with 3001 rows, 140 columns and 115150 nonzeros
Model fingerprint: 0x1ea9dca1
Variable types: 40 continuous, 100 integer (100 binary)
Coefficient statistics:
Matrix range [1e-02, 1e+04]
Objective range [2e+00, 2e+02]
Bounds range [1e+00, 1e+00]
RHS range [8e-01, 1e+04]
Variable types: 40 continuous, 100 integer (100 binary)
Root relaxation: objective -1.233674e+03, 412 iterations, 0.04 seconds (0.09 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 -1233.6744 0 100 - -1233.6744 - - 0s
Point not feasible, computing covering cut
=================================
All violations are [-996.00168938]
Now adding cut based on these violations
Added 1 cuts
0 0 -1088.3132 0 100 - -1088.3132 - - 1s
Point not feasible, computing covering cut
=================================
All violations are [-1199.96702963]
Now adding cut based on these violations
Added 1 cuts
Point not feasible, computing covering cut
=================================
All violations are [-917.41841219]
Now adding cut based on these violations
Added 1 cuts
0 2 -1020.7824 0 100 - -1020.7824 - - 2s
* 35 35 20 -801.4792087 -994.27025 24.1% 87.8 3s
* 403 287 45 -801.4964102 -951.48624 18.7% 64.2 4s
* 407 289 48 -801.5280659 -951.48624 18.7% 63.6 4s
* 408 288 48 -801.5671778 -951.48624 18.7% 63.4 4s
* 414 286 47 -801.6345069 -951.48624 18.7% 62.5 4s
453 314 -833.49906 6 70 -801.63451 -951.48624 18.7% 60.4 5s
* 821 420 42 -802.3938926 -933.78933 16.4% 59.5 6s
* 934 419 45 -802.8153655 -932.75560 16.2% 56.2 7s
* 1019 410 57 -802.9183719 -928.45588 15.6% 53.5 7s
* 1024 391 57 -802.9569426 -928.45588 15.6% 53.3 7s
* 1177 413 46 -803.5314443 -924.99125 15.1% 51.4 7s
* 1440 553 61 -803.5461007 -922.65787 14.8% 48.0 8s
* 1441 551 61 -803.5581399 -922.65787 14.8% 48.0 8s
* 1442 550 60 -803.7493295 -922.65787 14.8% 48.0 8s
* 1443 549 59 -803.9548656 -922.65787 14.8% 47.9 8s
2070 968 -816.24884 28 54 -803.95487 -912.16298 13.5% 43.7 10s
* 2684 1363 62 -803.9729138 -906.65567 12.8% 40.8 11s
* 2685 1361 62 -804.0855163 -906.65567 12.8% 40.8 11s
* 3089 1622 55 -804.1359952 -901.19034 12.1% 39.7 12s
* 3090 1614 55 -804.4983926 -901.19034 12.0% 39.7 12s
4147 2293 -816.73409 36 56 -804.49839 -895.19791 11.3% 38.0 15s
Cutting planes:
User: 3
Explored 5302 nodes (191576 simplex iterations) in 17.61 seconds (25.56 work units)
Thread count was 1 (of 12 available processors)
Solution count 10: -804.498 -804.136 -804.086 ... -802.957
Time limit reached
Best objective -8.044983926293e+02, best bound -8.922433994780e+02, gap 10.9068%
User-callback calls 14585, time in user-callback 2.84 sec
Here is the same instance with Cuts=1:
Academic license - for non-commercial use only - expires 2024-06-08
/home/marius/Documents/montreal/projects/quantile-cuts-ccp/code/results/ccmknap-40-30-100-1-20-1.csv
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-08
Set parameter Threads to value 1
Set parameter IntFeasTol to value 1e-09
Set parameter Presolve to value 0
Set parameter Heuristics to value 0
Set parameter Cuts to value 1
Set parameter Symmetry to value 0
Set parameter Disconnected to value 0
Set parameter VarBranch to value 2
Set parameter TimeLimit to value 1.7584865331649780e+01
Gurobi Optimizer version 10.0.1 build v10.0.1rc0 (linux64)
CPU model: AMD Ryzen 5 5500U with Radeon Graphics, instruction set [SSE2|AVX|AVX2]
Thread count: 6 physical cores, 12 logical processors, using up to 1 threads
Optimize a model with 3001 rows, 140 columns and 115150 nonzeros
Model fingerprint: 0x1ea9dca1
Variable types: 40 continuous, 100 integer (100 binary)
Coefficient statistics:
Matrix range [1e-02, 1e+04]
Objective range [2e+00, 2e+02]
Bounds range [1e+00, 1e+00]
RHS range [8e-01, 1e+04]
Variable types: 40 continuous, 100 integer (100 binary)
Root relaxation: objective -1.233674e+03, 412 iterations, 0.04 seconds (0.09 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 -1233.6744 0 100 - -1233.6744 - - 0s
Point not feasible, computing covering cut
=================================
All violations are [-996.00168938]
Now adding cut based on these violations
Added 1 cuts
0 0 -1052.8377 0 100 - -1052.8377 - - 1s
Point not feasible, computing covering cut
=================================
All violations are [-1174.75167635]
Now adding cut based on these violations
Added 1 cuts
0 0 -1008.6017 0 100 - -1008.6017 - - 2s
Point not feasible, computing covering cut
=================================
All violations are [-914.04184713]
Now adding cut based on these violations
Added 1 cuts
0 0 -994.62119 0 100 - -994.62119 - - 3s
Point not feasible, computing covering cut
=================================
All violations are [-716.62883265]
Now adding cut based on these violations
Added 1 cuts
0 0 -920.65446 0 97 - -920.65446 - - 3s
Point not feasible, computing covering cut
=================================
All violations are [-622.3911128]
Now adding cut based on these violations
Added 1 cuts
0 0 -911.96686 0 100 - -911.96686 - - 4s
Point not feasible, computing covering cut
=================================
All violations are [-404.61347191]
Now adding cut based on these violations
Added 1 cuts
0 0 -908.05372 0 100 - -908.05372 - - 5s
Point not feasible, computing covering cut
=================================
All violations are [-168.92934129]
Now adding cut based on these violations
Added 1 cuts
0 0 -904.72965 0 100 - -904.72965 - - 5s
Point not feasible, computing covering cut
=================================
All violations are [-81.35162411]
Now adding cut based on these violations
Added 1 cuts
0 0 -904.21182 0 90 - -904.21182 - - 6s
Point not feasible, computing covering cut
=================================
All violations are [-246.7243069]
Now adding cut based on these violations
Added 1 cuts
0 0 -901.89703 0 88 - -901.89703 - - 7s
Point not feasible, computing covering cut
=================================
All violations are [-73.05151025]
Now adding cut based on these violations
Added 1 cuts
0 0 -900.09003 0 93 - -900.09003 - - 7s
Point not feasible, computing covering cut
=================================
All violations are [-269.18625315]
Now adding cut based on these violations
Added 1 cuts
0 0 -898.70017 0 89 - -898.70017 - - 8s
Point not feasible, computing covering cut
=================================
All violations are [-73.58541943]
Now adding cut based on these violations
Added 1 cuts
0 0 -895.56087 0 87 - -895.56087 - - 9s
Point not feasible, computing covering cut
=================================
All violations are [-51.67189416]
Now adding cut based on these violations
Added 1 cuts
0 0 -895.02798 0 92 - -895.02798 - - 9s
Point not feasible, computing covering cut
=================================
All violations are [-32.17359494]
Now adding cut based on these violations
Added 1 cuts
0 0 -895.02798 0 94 - -895.02798 - - 10s
0 0 -892.25616 0 100 - -892.25616 - - 10s
Point not feasible, computing covering cut
=================================
All violations are [-369.29104415]
Now adding cut based on these violations
Added 1 cuts
0 0 -890.37406 0 100 - -890.37406 - - 11s
Point not feasible, computing covering cut
=================================
All violations are [-33.17837973]
Now adding cut based on these violations
Added 1 cuts
0 0 -890.04868 0 100 - -890.04868 - - 12s
Point not feasible, computing covering cut
=================================
All violations are [-32.69767232]
Now adding cut based on these violations
Added 1 cuts
0 0 -889.55170 0 100 - -889.55170 - - 13s
Point not feasible, computing covering cut
=================================
All violations are [-59.26383283]
Now adding cut based on these violations
Added 1 cuts
0 0 -889.41152 0 100 - -889.41152 - - 13s
Point not feasible, computing covering cut
=================================
All violations are [-25.30062019]
Now adding cut based on these violations
Added 1 cuts
0 0 -888.86857 0 100 - -888.86857 - - 14s
Point not feasible, computing covering cut
=================================
All violations are [-53.62832401]
Now adding cut based on these violations
Added 1 cuts
0 0 -888.76698 0 100 - -888.76698 - - 15s
Point not feasible, computing covering cut
=================================
All violations are [-28.26909146]
Now adding cut based on these violations
Added 1 cuts
0 0 -888.56516 0 100 - -888.56516 - - 16s
Point not feasible, computing covering cut
=================================
All violations are [-19.8120878]
Now adding cut based on these violations
Added 1 cuts
0 0 -888.45453 0 100 - -888.45453 - - 17s
Point not feasible, computing covering cut
=================================
terminating
No cut added, interupting process
Cutting planes:
User: 7
Gomory: 31
MIR: 37
Explored 1 nodes (2420 simplex iterations) in 18.19 seconds (0.97 work units)
Thread count was 1 (of 12 available processors)
Solution count 0
Solve interrupted
Best objective -, best bound -8.884545322149e+02, gap -
User-callback calls 321, time in user-callback 17.68 sec
Here is the same instance with Cuts=-1 and no callback is applied:
Academic license - for non-commercial use only - expires 2024-06-08
/home/marius/Documents/montreal/projects/quantile-cuts-ccp/code/results/ccmknap-40-30-100-1-20-1.csv
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-08
Set parameter Threads to value 1
Set parameter IntFeasTol to value 1e-09
Set parameter Presolve to value 0
Set parameter Heuristics to value 0
Set parameter Symmetry to value 0
Set parameter Disconnected to value 0
Set parameter VarBranch to value 2
Set parameter TimeLimit to value 1.7551588296890259e+01
Gurobi Optimizer version 10.0.1 build v10.0.1rc0 (linux64)
CPU model: AMD Ryzen 5 5500U with Radeon Graphics, instruction set [SSE2|AVX|AVX2]
Thread count: 6 physical cores, 12 logical processors, using up to 1 threads
Optimize a model with 3001 rows, 140 columns and 115150 nonzeros
Model fingerprint: 0x1ea9dca1
Variable types: 40 continuous, 100 integer (100 binary)
Coefficient statistics:
Matrix range [1e-02, 1e+04]
Objective range [2e+00, 2e+02]
Bounds range [1e+00, 1e+00]
RHS range [8e-01, 1e+04]
Variable types: 40 continuous, 100 integer (100 binary)
Root relaxation: objective -1.233674e+03, 412 iterations, 0.04 seconds (0.09 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 -1233.6744 0 100 - -1233.6744 - - 0s
0 0 -1175.3947 0 100 - -1175.3947 - - 0s
0 0 -1174.5612 0 100 - -1174.5612 - - 0s
0 0 -1159.4256 0 100 - -1159.4256 - - 0s
0 0 -1157.3039 0 100 - -1157.3039 - - 0s
0 0 -1156.7521 0 100 - -1156.7521 - - 0s
0 0 -1156.0265 0 100 - -1156.0265 - - 0s
0 0 -1155.9535 0 100 - -1155.9535 - - 0s
0 0 -1150.4771 0 100 - -1150.4771 - - 0s
0 0 -1149.5326 0 100 - -1149.5326 - - 0s
0 0 -1149.5257 0 100 - -1149.5257 - - 0s
0 0 -1144.3511 0 100 - -1144.3511 - - 0s
0 0 -1144.2516 0 100 - -1144.2516 - - 0s
0 0 -1142.3615 0 100 - -1142.3615 - - 0s
0 0 -1142.3394 0 100 - -1142.3394 - - 0s
0 0 -1141.4790 0 100 - -1141.4790 - - 0s
0 0 -1140.7290 0 100 - -1140.7290 - - 0s
0 0 -1140.6896 0 100 - -1140.6896 - - 0s
0 0 -1139.1844 0 100 - -1139.1844 - - 1s
0 0 -1139.1552 0 100 - -1139.1552 - - 1s
0 0 -1137.5446 0 100 - -1137.5446 - - 1s
0 0 -1137.4733 0 100 - -1137.4733 - - 1s
0 0 -1137.4730 0 100 - -1137.4730 - - 1s
0 0 -1135.8674 0 100 - -1135.8674 - - 1s
0 0 -1135.8337 0 100 - -1135.8337 - - 1s
0 0 -1135.8326 0 100 - -1135.8326 - - 1s
0 0 -1134.9687 0 100 - -1134.9687 - - 1s
0 0 -1134.9365 0 100 - -1134.9365 - - 1s
0 0 -1134.9350 0 100 - -1134.9350 - - 1s
0 0 -1133.8168 0 100 - -1133.8168 - - 1s
0 0 -1133.2316 0 100 - -1133.2316 - - 1s
0 0 -1133.1613 0 100 - -1133.1613 - - 1s
0 0 -1133.1501 0 100 - -1133.1501 - - 1s
0 0 -1132.2036 0 100 - -1132.2036 - - 1s
0 0 -1132.0368 0 100 - -1132.0368 - - 1s
0 0 -1132.0282 0 100 - -1132.0282 - - 1s
0 0 -1131.2614 0 100 - -1131.2614 - - 1s
0 0 -1130.7192 0 100 - -1130.7192 - - 1s
0 0 -1130.7143 0 100 - -1130.7143 - - 1s
0 0 -1130.3278 0 100 - -1130.3278 - - 1s
0 0 -1129.4846 0 100 - -1129.4846 - - 1s
0 0 -1129.4557 0 100 - -1129.4557 - - 1s
0 0 -1129.4446 0 100 - -1129.4446 - - 1s
0 0 -1128.0746 0 100 - -1128.0746 - - 1s
0 0 -1128.0565 0 100 - -1128.0565 - - 1s
0 0 -1128.0550 0 100 - -1128.0550 - - 1s
0 0 -1126.5514 0 100 - -1126.5514 - - 1s
0 0 -1126.5350 0 100 - -1126.5350 - - 1s
0 0 -1126.5075 0 100 - -1126.5075 - - 1s
0 0 -1126.5040 0 100 - -1126.5040 - - 1s
0 0 -1125.8795 0 100 - -1125.8795 - - 2s
0 0 -1125.8216 0 100 - -1125.8216 - - 2s
0 0 -1125.8132 0 100 - -1125.8132 - - 2s
0 0 -1124.5813 0 100 - -1124.5813 - - 2s
0 0 -1124.5753 0 100 - -1124.5753 - - 2s
0 0 -1123.7604 0 100 - -1123.7604 - - 2s
0 0 -1122.4763 0 100 - -1122.4763 - - 2s
0 0 -1122.4724 0 100 - -1122.4724 - - 2s
0 0 -1120.7080 0 100 - -1120.7080 - - 2s
0 0 -1120.4257 0 100 - -1120.4257 - - 2s
0 0 -1120.4241 0 100 - -1120.4241 - - 2s
0 0 -1120.1054 0 100 - -1120.1054 - - 2s
0 0 -1120.0989 0 100 - -1120.0989 - - 2s
0 0 -1119.0310 0 100 - -1119.0310 - - 2s
0 0 -1119.0064 0 100 - -1119.0064 - - 2s
0 0 -1119.0001 0 100 - -1119.0001 - - 2s
0 0 -1118.2560 0 100 - -1118.2560 - - 2s
0 0 -1118.2530 0 100 - -1118.2530 - - 2s
0 0 -1117.6139 0 100 - -1117.6139 - - 2s
0 0 -1117.5520 0 100 - -1117.5520 - - 2s
0 0 -1117.2689 0 100 - -1117.2689 - - 2s
0 0 -1117.2368 0 100 - -1117.2368 - - 2s
0 0 -1116.3100 0 100 - -1116.3100 - - 2s
0 0 -1116.2475 0 100 - -1116.2475 - - 2s
0 0 -1116.2318 0 100 - -1116.2318 - - 2s
0 0 -1115.6078 0 100 - -1115.6078 - - 2s
0 0 -1115.6075 0 100 - -1115.6075 - - 2s
0 0 -1115.2467 0 100 - -1115.2467 - - 2s
0 0 -1114.8431 0 100 - -1114.8431 - - 2s
0 0 -1114.8344 0 100 - -1114.8344 - - 2s
0 0 -1114.3835 0 100 - -1114.3835 - - 2s
0 0 -1114.1180 0 100 - -1114.1180 - - 2s
0 0 -1114.1089 0 100 - -1114.1089 - - 2s
0 0 -1113.1659 0 100 - -1113.1659 - - 2s
0 0 -1113.1221 0 100 - -1113.1221 - - 2s
0 0 -1113.1139 0 100 - -1113.1139 - - 2s
0 0 -1112.3907 0 100 - -1112.3907 - - 2s
0 0 -1112.2663 0 100 - -1112.2663 - - 2s
0 0 -1112.2004 0 100 - -1112.2004 - - 2s
0 0 -1112.1981 0 100 - -1112.1981 - - 2s
0 0 -1111.7540 0 100 - -1111.7540 - - 2s
0 0 -1111.6297 0 100 - -1111.6297 - - 2s
0 0 -1111.6052 0 100 - -1111.6052 - - 2s
0 0 -1111.5872 0 100 - -1111.5872 - - 2s
0 0 -1111.5862 0 100 - -1111.5862 - - 2s
0 0 -1111.2564 0 100 - -1111.2564 - - 2s
0 0 -1111.2039 0 100 - -1111.2039 - - 2s
0 0 -1111.2033 0 100 - -1111.2033 - - 2s
0 0 -1110.8741 0 100 - -1110.8741 - - 2s
0 0 -1110.8204 0 100 - -1110.8204 - - 2s
0 0 -1110.7959 0 100 - -1110.7959 - - 2s
0 0 -1109.9166 0 100 - -1109.9166 - - 2s
0 0 -1109.8603 0 100 - -1109.8603 - - 3s
0 0 -1109.8370 0 100 - -1109.8370 - - 3s
0 0 -1109.8369 0 100 - -1109.8369 - - 3s
0 0 -1109.4383 0 100 - -1109.4383 - - 3s
0 0 -1109.3377 0 100 - -1109.3377 - - 3s
0 0 -1109.3373 0 100 - -1109.3373 - - 3s
0 0 -1108.6716 0 100 - -1108.6716 - - 3s
0 0 -1108.5715 0 100 - -1108.5715 - - 3s
0 0 -1108.5709 0 100 - -1108.5709 - - 3s
0 0 -1108.2863 0 100 - -1108.2863 - - 3s
0 0 -1108.1276 0 100 - -1108.1276 - - 3s
0 0 -1108.0164 0 100 - -1108.0164 - - 3s
0 0 -1107.9893 0 100 - -1107.9893 - - 3s
0 0 -1107.9546 0 100 - -1107.9546 - - 3s
0 0 -1107.9492 0 100 - -1107.9492 - - 3s
0 0 -1107.4552 0 100 - -1107.4552 - - 3s
0 0 -1107.3510 0 100 - -1107.3510 - - 3s
0 0 -1107.3432 0 100 - -1107.3432 - - 3s
0 0 -1106.5864 0 100 - -1106.5864 - - 3s
0 0 -1106.5839 0 100 - -1106.5839 - - 3s
0 0 -1105.9321 0 100 - -1105.9321 - - 3s
0 0 -1105.8975 0 100 - -1105.8975 - - 3s
0 0 -1105.8960 0 100 - -1105.8960 - - 3s
0 0 -1105.2852 0 100 - -1105.2852 - - 3s
0 0 -1105.2709 0 100 - -1105.2709 - - 3s
0 0 -1105.1469 0 100 - -1105.1469 - - 3s
0 2 -1105.1010 0 100 - -1105.1010 - - 3s
* 45 45 23 -798.1081305 -994.52024 24.6% 118 4s
* 47 45 24 -801.1865520 -994.52024 24.1% 117 4s
* 108 81 30 -801.2825933 -959.21702 19.7% 91.1 4s
167 130 -830.25034 21 73 -801.28259 -955.93261 19.3% 89.7 5s
* 336 230 38 -801.4825309 -943.05348 17.7% 69.5 5s
* 349 226 38 -801.9756209 -943.05348 17.6% 67.3 5s
718 404 -904.48324 28 86 -801.97562 -939.21897 17.1% 67.4 10s
* 858 428 52 -802.1613138 -939.21897 17.1% 64.5 10s
* 1122 462 55 -802.1942490 -939.21897 17.1% 60.3 11s
* 1123 446 54 -802.3006471 -939.21897 17.1% 60.2 11s
* 1954 853 53 -802.3381940 -908.99494 13.3% 50.3 14s
2068 906 -906.66863 26 88 -802.33819 -906.66863 13.0% 50.5 15s
Cutting planes:
Gomory: 8
MIR: 128
Flow cover: 120
RLT: 54
Explored 2878 nodes (134886 simplex iterations) in 17.55 seconds (31.27 work units)
Thread count was 1 (of 12 available processors)
Solution count 9: -802.338 -802.301 -802.194 ... -798.108
Time limit reached
Best objective -8.023381939757e+02, best bound -9.009728826478e+02, gap 12.2934%
-
Hi Marius,
From the GRBCallback::addCut() docs:
You should consider setting parameter PreCrush to value 1 when adding your own cuts. This setting shuts off a few presolve reductions that can sometimes prevent your cut from being applied to the presolved model (which would result in your cut being silently ignored).
Could you try setting this parameter and repeating the experiments?
Cheers,
David0 -
Hello David,
Thanks for the quick reply :)!
I tried with PreCrush set to the value 1 and it does not change anything. I still have the same behavior as in the first log I added.
In addition, you can observe in the first log file that the cuts are indeed added as confirmed by the statement:
Cutting planes: User: 3
Thanks for your help,
Marius
0 -
That is interesting. What value of \(\texttt{where}\) are you using to add these cuts?
Additionally, are you cutting off integer solutions? From the same link:
they can cut off continuous solutions, but they may not cut off integer solutions that respect the original constraints of the model. Ignoring this restriction will lead to incorrect solutions.
Cheers,
David0 -
This is the callback function I use:
def cb_covering(model, where):
if where == GRB.Callback.MIPNODE:
node_count = model.cbGet(GRB.Callback.MIPNODE_NODCNT)
condition = (node_count == 0)
# Starting cb based on condition
if condition:
status = model.cbGet(GRB.Callback.MIPNODE_STATUS)
if status == GRB.OPTIMAL:This means: 1) It checks if we are in a MIPNODE 2) It checks that we are in node zero 3) It checks if the LP of the node is solved to optimality.
Maybe it might be related to these conditions?
Marius
0 -
I am not surprised if this is normal behavior, users don't typically have a great deal of control over how and when their user-cuts are used. What happens if you set NodeLimit=1? I'm wondering if an approach could work where you set this, wait till the solve terminates, set NodeLimit=float("infinity"), then call optimize() to resume the solve.
- Riley
1 -
Hello Riley,
Thanks a lot for your comment.
Unfortunately setting NodeLimit=1 and then re-optimizing with NodeLimit=float("infinity") does not work for me.
Marius
0
Please sign in to leave a comment.
Comments
6 comments