GUROBI Appendix C

From TomWiki

Jump to: navigation, search

Notice.png

This page is part of the GUROBI Manual. See GUROBI.

Contents

Gurobi Parameters

Setting GUROBI Parameters in Matlab

The behavior of the GUROBI solver is controlled by means of a large number of parameters. It is possible to set all of these parameters from Matlab.

If using the gurobiTL interface for solving problems defined in a TOMLAB Prob structure, the field Prob.MIP.grbControl is used to set values for parameters. The user needs to set only those parameters that he/she wants to change. The non-TOMLAB format gurobi.m interface has a corresponding input parameter, grbControl.

When setting parameter values in the grbControl structure, this prefix should be omitted. For example, to set the iterations for the dual simplex optimizer do:

>> grbControl.ITERATIONLIMIT  = 1000;
>> grbControl.LPMETHOD	= 0;

The complete list of GUROBI parameters are given in the Tables below:

Termination

These parameters affect the termination of the algorithms. If the algorithm exceeds any of these limits, it will terminate and report a non-optimal termination status.

TOMLAB parameterValue
grbControl.CutoffAny number.

Default: INF

Description: Sets a target objective value; optimization will terminate if the engine determines that the optimal objective value for the model is worse than the specified cutoff.
grbControl.IterationLimitAny non-negative integer.

Default: INF

Description: Limits the number of simplex iterations performed.
grbControl.NodeLimitAny non-negative integer

Default: INF

Description: Limits the number of MIP nodes explored (MIP only).
grbControl.SolutionLimitAny positive integer

Default: 1

Description: Limits the number of feasible solutions found (MIP only).
grbControl.TimeLimitAny non-negative number

Default: 0

Description: Limits the total time expended (in seconds).

Tolerances

These parameters control the allowable feasibility or optimality violations.

TOMLAB parameterValue
grbControl.FeasibilityTolAny number from 10-9 to 10-2 .

Default: 10-6

Description: Primal feasibility tolerance. All constraints must be satisfied to a tolerance of FeasibilityTol.
grbControl.IntFeasTolAny number from 10-9 to 10-1 .

Default: 10-5

Description: Integer feasibility tolerance (MIP only). An integrality restriction on a variable is considered satisfied when the variable's value is less than INTFEASTOL from the nearest integer value.
grbControl.MarkowitzTolAny number from 10-4 to 0.999.

Default: 0.0078125

Description: Threshold pivoting tolerance. Used to limit numerical error in the simplex algorithm. A larger value may avoid numerical problems in rare situations, but it will also harm performance.
grbControl.MIPGapAny number = 0

Default: 10-4

Description: Relative MIP optimality gap (MIP only). The MIP engine will terminate (with an optimal result) when the gap between the lower and upper objective bound is less than MIPGap times the upper bound.
grbControl.OptimalityTolAny number from 10-9 to 10-2 .

Default: 10-6

Description: Dual feasibility tolerance. Reduced costs must all be smaller than OptimalityTol in the improving direction in order for a model to be declared optimal.

Simplex

These parameters control the operation of the simplex algorithms.

TOMLAB parameterValue
grbControl.LPMethodAny integer from 0 to 1.

Default: 1

Description: Simplex algorithm (0=primal, 1=dual). The selected algorithm is used when solving continuous models, and when solving node relaxations within the MIP solver.
grbControl.NormAdjustAny number from -1 to 3.

Default: -1

Description: Chooses from among multiple pricing norm variants. The default value of -1 chooses automatically.
grbControl.ObjScaleAny number = -1.

Default: 0.0

Description: Divides the model objective by the specified value to avoid numerical errors that may result from very large objective coefficients. The default value of 0 decides on the scaling automatically. A value less than zero uses the maximum coefficient to the specified power as the scaling (so ObjScale=-0.5 would scale by the square root of the largest objective coefficient).
grbControl.PerturbValueAny number from 0 to 10-2 .

Default: 0.0002

Description: Magnitude of simplex perturbation (when required).
grbControl.QuadAny number from -1 to 1.

Default: -1

Description: Enables or disables quad precision computation in simplex. The -1 default setting allows the algorithm to decide.
grbControl.ScaleFlagAny integer from 0 to 1.

Default: 1

Description: Enables or disables model scaling.
grbControl.SimplexPricingAny integer from -1 to 3 Default: -1
Description: Determines simplex variable pricing strategy. Available options are Automatic (-1), Partial Pricing (0), Steepest Edge (1), Devex (2), and Quick-Start Steepest Edge (3).

MIP

These parameters control the operation of the MIP algorithms.

TOMLAB parameterValue
grbControl.HeuristicsAny number from 0 to 1.

Default: 0.05

Description: Controls the amount of time spent in MIP heuristics. Larger values produce more and better feasible solutions, at a cost of slower progress in the best bound.
grbControl.NodefileDirAny directory string

Default: .

Description: Determines the directory into which nodes are written when node memory usage exceeds the specified NodefileStart value.
grbControl.NodefileStartAny number = 0.

Default: I nf

Description: Controls the point at which MIP tree nodes are written to disk. Whenever node storage exceeds the specified value (in GBytes), nodes are written to disk.
grbControl.RootMethodAny number from 0 to 1.

Default: 0

Description: Simplex algorithm used for MIP root relaxation (0=primal, 1=dual).
grbControl.SubMIPNodesAny number = 0.

Default: 500

Description: Limits the number of nodes explored by the RINS heuristic. Exploring more nodes can produce better solutions, but it generally takes longer.
grbControl.VarBranchAny integer from -1 to 3.

Default: -1

Description: Controls the branch variable selection strategy. The default -1 setting makes an automatic choice, depending on problem characteristics. Available alternatives are Pseudo Reduced Cost Branching (0), Pseudo Shadow Price Branching (1), Maximum Infeasibility Branching (2), and Strong Branching (3).

MIP Cuts

These parameters affect the generation of MIP cutting planes. In all cases, a value of -1 corresponds to an automatic setting, which allows the solver to determine the appropriate level of aggressiveness in the cut generation. Unless otherwise noted, settings of 0, 1, and 2 correspond to no cut generation, conservative cut generation, or aggressive cut generation, respectively. The Cuts parameter provides global cut control, affecting the generation of all cuts. This parameter also has a setting of 3, which corresponds to very aggressive cut generation. The other parameters override the global Cuts parameter (so setting Cuts to 2 and CliqueCuts to 0 would generate all cut types aggressively, except clique cuts which would not be generated at all).

TOMLAB parameterValue
grbControl.CutsAny integer from -1 to 3.

Default: -1

Description: Global cut generation control.
grbControl.CliqueCutsAny integer from -1 to 2.

Default: -1

Description: Controls clique cut generation. Overrides the Cuts parameter.
grbControl.CoverCutsAny integer from -1 to 2.

Default: -1

Description: Controls cover cut generation. Overrides the Cuts parameter.
grbControl.FlowCoverCutsAny integer from -1 to 2.

Default: -1

Description: Controls flow cover cut generation. Overrides the Cuts parameter.
grbControl.FlowPathCutsAny integer from -1 to 2.

Default: -1

Description: Controls flow path cut generation. Overrides the Cuts parameter.
grbControl.GUBCoverCutsAny integer from -1 to 2.

Default: -1

Description: Controls GUB cover cut generation. Overrides the Cuts parameter.
grbControl.ImpliedCutsAny integer from -1 to 2.

Default: -1

Description: Controls implied bound cut generation. Overrides the Cuts parameter.
grbControl.MIPSepCutsAny integer from -1 to 2.

Default: -1

Description: Controls MIP separation cut generation. Overrides the Cuts parameter.
grbControl.MIRCutsAny integer from -1 to 2.

Default: -1

Description: Controls MIR cut generation. Overrides the Cuts parameter.
grbControl.ZeroHalfCutsAny integer from -1 to 2.

Default: -1

Description: Controls zero-half cut generation. Overrides the Cuts parameter.
grbControl.CutAggPassesAny integer = -1.

Default: -1

Description: A non-negative value indicates the maximum number of constraint aggregation passes performed during cut generation. Overrides the Cuts parameter.
grbControl.GomoryPassesAny integer = -1.

Default: -1

Description: A non-negative value indicates the maximum number of Gomory cut passes performed. Overrides the Cuts parameter.

Other

Other parameters.

TOMLAB parameterValue
grbControl.AggregateAny integer from 0 to 1.

Default: 1

Description: Enables or disables aggregation in presolve. In rare instances, aggregation can lead to an accumulation of numerical errors. Turning it off can sometimes improve solution accuracy.
grbControl.DisplayIntervalAny integer = 1.

Default: 5

Description: Controls the frequency at which log lines are printed (in seconds).
grbControl.IISMethodAny integer from -1 to 1.

Default: -1

Description: Chooses the IIS method to use. Method 0 is often faster, while method 1 can produce a smaller IIS. The default value of -1 chooses automatically.
grbControl.OutputFlagAny integer from 0 to 1.

Default: 1

Description: Enables or disables engine output.
grbControl.PreCrushAny integer from 0 to 1.

Default: 0

Description: Allows presolve to translate constraints on the original model to equivalent constraints on the presolved model. Turn this parameter on when you are using callbacks to add your own cuts.
grbControl.PresolveAny integer from -1 to 2.

Default: -1

Description: Controls the presolve level. A value of -1 corresponds to an automatic setting. Other options are off (0), conservative (1), or aggressive (2).
grbControl.ThreadsAny integer from 0 to NProc.

Default: 0

Description: Controls the number of threads to apply to parallel MIP. The default value of 0 sets the thread

count equal to the maximum value, which is the number of processors in the machine.

Personal tools