• Gurobi Staff

Hi,

You can add user cuts inside callbacks, but please be aware of the fact that they have to be globally valid. Please also see here for more details.

Best regards,

Sonja

Dear Sonja,

As you mentioned, I do not have any special cuts to add to the model. I will need to add some of the Cutting Planes (such as Gomory) separately and check whose behaviour on the model.
AFAIK, SCIP solver has such capabilities.
Would you please, say that is it possible with Gurobi?

Regards

Abbas

• Gurobi Staff
• To disable Gurobi cut generation - including Gomory - set Cuts=0
• To disable Gurobi heuristics, set Heuristics=0
• To disable presolve, set Presolve=0. However, you may be better off setting PreCrush=1 instead

Hi,

With thanks for your useful comment, I try to use you mentioned parameters. I'm using Gurobi Java API. The parameters are set as follows:

model.set(GRB.IntParam.PreCrush, 1);model.set(GRB.IntParam.Presolve, 0);model.set(GRB.IntParam.Cuts, 0);model.set(GRB.IntParam.NoRelHeuristic, 0);

When I'm just using "preCrush", the result is:

Optimize a model with 9 rows, 25 columns and 45 nonzerosVariable types: 20 continuous, 5 integer (5 binary)Coefficient statistics:Matrix range [1e+00, 2e+01]Objective range [1e+03, 2e+04]Bounds range [1e+00, 1e+00]RHS range [1e+01, 2e+01]Loaded MIP start with objective 210500Presolve time: 0.00sPresolved: 9 rows, 25 columns, 45 nonzerosVariable types: 20 continuous, 5 integer (5 binary)Root relaxation: objective 1.998333e+05, 11 iterations, 0.00 secondsNodes | Current Node | Objective Bounds | WorkExpl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time0 0 199833.333 0 1 210500.000 199833.333 5.07% - 0s0 0 210252.941 0 2 210500.000 210252.941 0.12% - 0sCutting planes:Gomory: 1Explored 1 nodes (13 simplex iterations) in 0.01 secondsThread count was 4 (of 4 available processors)Solution count 1: 210500Optimal solution found (tolerance 1.00e-04)Best objective 2.105000000000e+05, best bound 2.105000000000e+05, gap 0.0000%TOTAL COSTS: 210500.0

In the second step, I used "Presolve", "Cuts" and "NoRelHeuristic" and these had the flowing result:

Optimize a model with 9 rows, 25 columns and 45 nonzerosVariable types: 20 continuous, 5 integer (5 binary)Coefficient statistics:Matrix range [1e+00, 2e+01]Objective range [1e+03, 2e+04]Bounds range [1e+00, 1e+00]RHS range [1e+01, 2e+01]Loaded MIP start with objective 210500Variable types: 20 continuous, 5 integer (5 binary)Root relaxation: objective 1.998333e+05, 11 iterations, 0.00 secondsNodes | Current Node | Objective Bounds | WorkExpl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time0 0 199833.333 0 1 210500.000 199833.333 5.07% - 0s0 0 199833.333 0 1 210500.000 199833.333 5.07% - 0s0 2 199833.333 0 1 210500.000 199833.333 5.07% - 0sExplored 5 nodes (22 simplex iterations) in 0.01 secondsThread count was 4 (of 4 available processors)Solution count 1: 210500Optimal solution found (tolerance 1.00e-04)Best objective 2.105000000000e+05, best bound 2.105000000000e+05, gap 0.0000%TOTAL COSTS: 210500.0

According to the results, In the second step, it seems that the parameters are disabled but, in the first step it does not work. Indeed, in some cases in the second step, the result shows "Found heuristic solution: objective 200.0000000".

I was wondering if, where I'm wrong in the first or second step? and have I used the true parameter setting?

Regards

• Gurobi Staff

Hi Abbas,

Greg suggested the PreCrush parameter as an alternative to the Presolve parameter for your situation. In either case, if you also want to disable cuts and heuristics, you still need to set the Cuts and Heuristics parameters.

Note that the NoRelHeuristic parameter only controls one type of heuristic. To completely disable Heuristics, you should set the Heuristics parameter to 0.

Thanks!

Eli

Dear Eli,

Thanks so much for your detailed explanation. I can do that.

Regards