Concepts
Features
Reference
This section provides the type, default value, and range of possible values forall Gurobi parameters, and describes their effects. You will find acategorization of parameters by the aspect of Gurobi they control inParameter Groups.
Presolve aggregation fill level
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
Controls the amount of fill allowed during presolve aggregation. Largervalues generally lead to presolved models with fewer rows and columns,but with more constraint matrix non-zeros.
The default value chooses automatically, and usually works well.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Presolve aggregation
Type:int
Default value:1
Minimum value:0
Maximum value:2
Controls the aggregation level in presolve. The options are off (0),moderate (1), or aggressive (2). In rare instances, aggregation can leadto an accumulation of numerical errors. Turning it off can sometimesimprove solution accuracy.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Barrier convergence tolerance
Type:double
Default value:1e-8
Minimum value:0.0
Maximum value:1.0
The barrier solver terminates with aGRB_OPTIMAL status when somesolution quality attributes are less than the specified tolerance. Thealgorithm considers the relative difference between the primal and dualobjective values, relative primal and dual feasiblity, and complementarity.Tightening this tolerance often produces a more accurate solution, which cansometimes reduce the time spent in crossover. Be aware that such tighteningmay result in an increase of barrier iterations and hence computation timespent therein. Loosening it causes the barrier algorithm to terminate witha less accurate solution, which can be useful when barrier is making veryslow progress in later iterations but increases chances of prolongedruntime in crossover.
This parameter does not affect models with quadratic constraints. For thesemodels useBarQCPConvTol.
Note
Barrier only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Barrier central corrections
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
Limits the number of central corrections performed in each barrieriteration. The default value chooses automatically, depending on problemcharacteristics. The automatic strategy generally works well, althoughit is often possible to obtain higher performance on a specific model byselecting a value manually.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Barrier only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Barrier homogeneous algorithm
Type:int
Default value:-1
Minimum value:-1
Maximum value:1
Determines whether to use the homogeneous barrier algorithm. At thedefault setting (-1), it is only used when barrier solves a noderelaxation for a MIP model. Setting the parameter to 0 turns it off, andsetting it to 1 forces it on. The homogeneous algorithm is useful forrecognizing infeasibility or unboundedness. It is a bit slower than thedefault algorithm.
Note
Barrier only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Barrier iteration limit
Type:int
Default value:1000
Minimum value:0
Maximum value:MAXINT
Limits the number of barrier iterations performed. This parameter israrely used. If you would like barrier to terminate early, it is almostalways better to use theBarConvTol parameter instead.
Optimization returns with anITERATION_LIMIT statusif the limit is exceeded.
This parameter iscallback settable. It can be changed from within a callbackwhen thewhere value isPRESOLVED,SIMPLEX,MIP,MIPSOL,MIPNODE,BARRIER, orMULTIOBJ (see theCallback Codes section for moreinformation). How to do that for the different APIs is illustratedhere. In case of a remoteserver, the change of a parameter from within acallback may not be taken into account immediately.
Note
Barrier only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Barrier ordering algorithm
Type:int
Default value:-1
Minimum value:-1
Maximum value:1
Chooses the barrier sparse matrix fill-reducing algorithm. A value of 0chooses Approximate Minimum Degree ordering, while a value of 1 choosesNested Dissection ordering. The default value of -1 choosesautomatically. You should only modify this parameter if you notice thatthe barrier ordering phase is consuming a significant fraction of theoverall barrier runtime.
Note
Barrier only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Barrier convergence tolerance for QCP models
Type:double
Default value:1e-6
Minimum value:0.0
Maximum value:1.0
When solving a QCP model, the barrier solver terminates with aGRB_OPTIMAL status when some solution quality attributes are less thanthe specified tolerance. The algorithm considers the relative differencebetween the primal and dual objective values, relative primal and dualfeasiblity, and complementarity. Tightening this tolerance may lead to amore accurate solution, but it may also lead to a failure to converge.
Note
Barrier only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Objective bound to stop optimization
Type:double
Default value:Infinity
Minimum value:-Infinity
Maximum value:Infinity
Terminates as soon as the engine determines that the best bound on theobjective value is at least as good as the specified value. Optimizationreturns with anUSER_OBJ_LIMIT status in this case.
Note that you should always include a small tolerance in this value.Without this, a bound that satisfies the intended termination criterionmay not actually lead to termination due to numerical round-off in thebound.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Objective value to stop optimization
Type:double
Default value:-Infinity
Minimum value:-Infinity
Maximum value:Infinity
Terminate as soon as the engine finds a feasible solution whoseobjective value is at least as good as the specified value. Optimizationreturns with anUSER_OBJ_LIMIT status in this case.
Note that you should always include a small tolerance in this value.Without this, a solution that satisfies the intended terminationcriterion may not actually lead to termination due to numericalround-off in the objective.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
BQP cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls Boolean Quadric Polytope (BQP) cut generation. Use 0 to disablethese cuts, 1 for moderate cut generation, or 2 for aggressive cutgeneration. The default -1 value chooses automatically. Overrides theCuts parameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Preferred branch direction
Type:int
Default value:0
Minimum value:-1
Maximum value:1
Determines which child node is explored first in the branch-and-cutsearch. The default value chooses automatically. A value of -1 willalways explore the down branch first, while a value of 1 will alwaysexplore the up branch first.
Changing the value of this parameter rarely produces a significantbenefit.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Clique cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls clique cut generation. Use 0 to disable these cuts, 1 formoderate cut generation, or 2 for aggressive cut generation. The default-1 value choose automatically. Overrides theCutsparameter.
We have observed that setting this parameter to its aggressive settingcan produce a significant benefit for some large set partitioningmodels.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Access ID for Gurobi Instant Cloud
Type:string
Default value:""
Set this parameter to the Access ID for your Instant Cloud license whenlaunching a new instance. You can retrieve this string from your accounton theGurobi Instant Cloud Manager website.
You must set this parameter through either agurobi.lic file (usingCLOUDACCESSID=id) or anempty environment.Changing the parameter after your environment has been created will haveno effect.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Host for the Gurobi Cloud entry point
Type:string
Default value:""
Set this parameter to the host name of the Gurobi Cloud entry point.Currentlycloud.gurobi.com.
You must set this parameter through either agurobi.lic file (usingCLOUDHOST=host) or anempty environment.Changing the parameter after your environment has been started willresult in an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Secret Key for Gurobi Instant Cloud
Type:string
Default value:""
Set this parameter to the Secret Key for your Instant Cloud license whenlaunching a new instance. You can retrieve this string from your accounton theGurobi Instant Cloud Manager website.
You must set this parameter through either agurobi.lic file (usingCLOUDSECRETKEY=key) or anempty environment.Changing the parameter after your environment has been created will haveno effect.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Cloud pool to use for Gurobi Instant Cloud instance
Type:string
Default value:""
Set this parameter to the name of the cloud pool you would like to usefor your new Instant Cloud instance. You can browse your existing cloudpools or create new ones from your account on theGurobi Instant Cloud Manager website.
You must set this parameter through either agurobi.lic file (usingCLOUDPOOL=pool) or anempty environment.Changing the parameter after your environment has been created will haveno effect.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Name of a node in the Remote Services cluster
Type:string
Default value:""
Set this parameter to the name of a node in the Remote Services clusterwhere you’d like your Compute Server job to run. You can refer to theserver using its name or its IP address. If you are using a non-defaultport, the server name should be followed by the port number (e.g.,server1:61000).
You will also need to set theServerPassword parameterto supply the client password for the specified cluster.
You can provide a comma-separated list of nodes to increase robustness.If the first node in the list doesn’t respond, the second will be tried,etc.
Refer to theGurobi Remote Services Reference Manualfor more information on starting Compute Server jobs.
You must set this parameter through either agurobi.lic file (usingCOMPUTESERVER=server) or anempty environment. Changing the parameter afteryour environment has been created will have no effect.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Distributed concurrent optimizer job count
Type:int
Default value:0
Minimum value:0
Maximum value:MAXINT
Enables distributed concurrent optimization, which can be used to solveLP or MIP models on multiple machines. A value ofn causes thesolver to createn independent models, using different parametersettings for each. Each of these models is sent to a distributed workerfor processing. Optimization terminates when the first solve completes.Use theComputeServer parameter to indicate the name ofthe cluster where you would like your distributed concurrent job to run(or useWorkerPool if your client machine will act asmanager and you just need a pool of workers).
By default, Gurobi chooses the parameter settings used for eachindependent solve automatically. You can create concurrent environmentsto choose your own parameter settings (refer to theconcurrent optimization section fordetails). The intent of concurrent MIP solving is to introduceadditional diversity into the MIP search. By bringing the resources ofmultiple machines to bear on a single model, this approach can sometimessolve models much faster than a single machine.
The distributed concurrent solver produces a slightly different log fromthe standard solver, and provides different callbacks as well. Pleaserefer to theDistributedAlgorithms section of theGurobi Remote Services Reference Manualfor additional details.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls the methods used by the concurrent continuous solver
Type:int
Default value:-1
Minimum value:-1
Maximum value:3
This parameter is only evaluated when solving an LP with a concurrentsolver (Method = 3 or 4). It controls which methods arerun concurrently by the concurrent solver. Options are:
-1=automatic,
0=barrier, dual, primal simplex,
1=barrier and dual simplex,
2=barrier and primal simplex, and
3=dual and primal simplex.
Which methods are actually run also depends on the number of threadsavailable.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Enables the concurrent MIP solver
Type:int
Default value:1
Minimum value:1
Maximum value:64
This parameter enables the concurrent MIP solver. When the parameter isset to valuen, the MIP solver performsn independent MIP solvesin parallel, with different parameter settings for each. Optimizationterminates when the first solve completes.
By default, Gurobi chooses the parameter settings used for eachindependent solve automatically. You can create concurrent environmentsto choose your own parameter settings (refer to theconcurrent optimization section fordetails). The intent of concurrent MIP solving is to introduceadditional diversity into the MIP search. This approach can sometimessolve models much faster than applying all available threads to a singleMIP solve, especially on very large parallel machines.
The concurrent MIP solver divides available threads evenly among theindependent solves. For example, if you have 6 threads available and yousetConcurrentMIP to 2, the concurrent MIP solver will allocate 3threads to each independent solve. Note that the number of independentsolves launched will not exceed the number of available threads.
The concurrent MIP solver produces a slightly different log from thestandard MIP solver, and provides different callbacks as well. Pleaserefer to theconcurrent optimizer discussion foradditional details.
Concurrent MIP is not deterministic. If runtimes for differentindependent solves are very similar, and if the model has multipleoptimal solutions, you may get slightly different results from multipleruns on the same model.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Create concurrent environments from a list of .prm files
Type:string
Default value:""
This command-line only parameter allows you to specify a comma-separatedlist of.prm files that are used to set parametersfor the different instances in a concurrent MIP run.
To give an example, you could create two.prm files with thefollowing contents…
s0.prm:
MIPFocus 0
s1.prm:
MIPFocus 1
Issuing the commandgurobi_clConcurrentSettings=s0.prm,s1.prmmodel.mpswould invoke the concurrent MIP solver, using parameter settingMIPFocus=0 in one of the two concurrent solves andMIPFocus=1 in the other.It is also possible to provide one parameterfile with several parameter settings, refer toPRM Format for more details.
Note that if you want to run concurrent MIP on multiple machines, youmust also set theConcurrentJobs parameter. The commandfor running distributed concurrent optimization using the two exampleparameter files on two machines would be
> gurobi_cl ConcurrentJobs=2 ConcurrentSettings=s0.prm,s1.prm model.mps
Note
Command-line only (gurobi_cl). SeeConcurrent Environments for the equivalent feature inthe Gurobi APIs.
Cover cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls cover cut generation. Use 0 to disable these cuts, 1 formoderate cut generation, or 2 for aggressive cut generation. The default-1 value chooses automatically. Overrides theCutsparameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Barrier crossover strategy
Type:int
Default value:-1
Minimum value:-1
Maximum value:4
Determines the crossover strategy used to transform the interiorsolution produced by barrier or PDHG into a basic solution (note that crossoveris not available for QP or QCP models). Crossover consists of threephases: (i) aprimal push phase, where primal variables are pushed tobounds, (ii) adual push phase, where dual variables are pushed tobounds, and (iii) acleanup phase, where simplex is used to remove anyprimal or dual infeasibilities that remain after the push phases arecomplete. The order of the first two phases and the algorithm used forthe third phase are both controlled by theCrossover parameter:
Parameter value | First push | Second push | Cleanup |
|---|---|---|---|
0 | Disabled | Disabled | Disabled |
1 | Dual | Primal | Primal |
2 | Dual | Primal | Dual |
3 | Primal | Dual | Primal |
4 | Primal | Dual | Dual |
The default value of -1 chooses the strategy automatically. Use value 0to disable crossover; this setting returns the interior solutioncomputed by barrier or PDHG. Since an interior solution is typically less accuratethan a basic solution after crossover, disabling crossover may sometimesresult in barrier or PDHG performing more iterations to improve the returned interiorsolution.
Note
Barrier and PDHG only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Crossover basis construction strategy
Type:int
Default value:-1
Minimum value:-1
Maximum value:1
Determines the initial basis construction strategy for crossover. Avalue of 0 chooses an initial basis quickly. A value of 1 can take muchlonger, but often produces a more numerically stable start basis. Thedefault value of -1 makes an automatic choice.
Note
Barrier and PDHG only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Access ID for Gurobi Cluster Manager
Type:string
Default value:""
A unique identifier used to authenticate an application on a GurobiCluster Manager.
You can provide either an access ID and asecret key, or ausername andpassword, to authenticate yourconnection to a Cluster Manager.
You must set this parameter through either agurobi.lic file (usingCSAPIACCESSID=YOUR_API_ID) or anempty environment. Changing the parameter afteryour environment has been started will result in an error.
Note
Cluster Manager only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Secret key for Gurobi Cluster Manager
Type:string
Default value:""
The secret password associated with an API access ID.
You can provide either anaccess ID anda secret key, or ausername andpassword, to authenticate yourconnection to a Cluster Manager.
You must set this parameter through either agurobi.lic file (usingCSAPISECRET=YOUR_API_SECRET_KEY) or anempty environment. Changing the parameter afteryour environment has been started will result in an error.
Note
Cluster Manager only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Application name of the batches or jobs
Type:string
Default value:""
The application name which will be sent to the server to track whichapplication is submitting the batches or jobs.
Note
Cluster Manager only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
JSON Web Token for accessing the Cluster Manager
Type:string
Default value:""
When a client authenticates with a Cluster Manager using a username andpassword, a signed token is returned by the server to be used in furthercalls or command-line operations. It is used internally.
Note
Cluster Manager only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls Batch-Mode optimization
Type:int
Default value:0
Minimum value:0
Maximum value:1
When set to 1, enable the local creation of models, and later submitbatch-optimization jobs to the Cluster Manager. See theBatch Optimization section for moredetails. Note that ifCSBatchMode is enabled, onlybatch-optimization calls are allowed.
You must set this parameter through either agurobi.lic file (usingCSBATCHMODE=1) or anempty environment.Changing the parameter after your environment has been started willresult in an error.
Note
Cluster Manager only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Turns logging on or off
Type:int
Default value:0
Minimum value:0
Maximum value:3
Turns logging on or off for Compute Server and the Web License Service(WLS). Options are off (0), only error messages (1), information anderror messages (2), or (3) verbose, information, and error messages.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Group placement request for cluster
Type:string
Default value:""
Specifies one or more groups of cluster nodes to control the placementof the job. The list is a comma-separated string of group names, withoptionally a priority for a group. For example, specifyinggroup1:10,group2:50 means that the job will run on machines ofgroup1 orgroup2, and if the job is queued, it will havepriority 10 on group1 and 50 on group2. Note that if the group is notspecified, the job may run on any node. If there are no nodes in thecluster having the specified groups, the job will be rejected.
Refer to theGurobi Remote Services Reference Manualfor more information on starting Compute Server jobs and in particulartoGurobi Remote Services Cluster Groupingfor more information on grouping cluster nodes.
You must set this parameter through either a license file (usingGROUP=name) or anempty environment.Changing the parameter after your environment has been created will haveno effect.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Idle time before Compute Server kills a job
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
This parameter allows you to set a limit on how long a Compute Serverjob can sit idle before the server kills the job (in seconds). A job isconsidered idle if the server is not currently performing anoptimization and the client has not issued any additional commands.
The default value will allow a job to sit idle indefinitely in all butone circumstance. Currently the only exception is the Gurobi InstantCloud, where the default setting will automatically impose a 30 minuteidle time limit (1800 seconds). If you are using an Instant Cloud pool,the actual value will be the maximum between this parameter value andthe idle timeout defined by the pool.
You must set this parameter through either agurobi.lic file (usingIDLETIMEOUT=n) or anempty environment.Changing the parameter after your environment has been created will haveno effect.
Refer to theGurobi Remote Services Reference Manualfor more information on starting Compute Server jobs.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
URL of the Cluster Manager for the Remote Services cluster
Type:string
Default value:""
URL of the Cluster Manager for the Remote Services cluster.
You must set this parameter through either agurobi.lic file (usingCSMANAGER=YOUR_MANAGER_URL) or anempty environment. Changing the parameter afteryour environment has been started will result in an error.
Note
Cluster Manager only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Job priority for Remote Services job
Type:int
Default value:0
Minimum value:-100
Maximum value:100
The priority of the Compute Server job. Priorities must be between -100and 100, with a default value of 0 (by convention). Higher priority jobsare chosen from the server job queue before lower priority jobs. A jobwith priority 100 runs immediately, bypassing the job queue and ignoringthe job limit on the server. You should exercise caution with priority100 jobs, since they can severely overload a server, which can causejobs to fail, and in extreme cases can cause the server to crash.
Refer to theGurobi Remote Services Reference Manualfor more information on starting Compute Server jobs.
You must set this parameter through either agurobi.lic file (usingPRIORITY=n) or anempty environment.Changing the parameter after your environment has been created will haveno effect.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Queue timeout for new jobs
Type:double
Default value:-1
Minimum value:-1
Maximum value:Infinity
This parameter allows you to set a limit (in seconds) on how long a newCompute Server job will wait in queue before it gives up (and reports aJOB_REJECTED error). Note that there might be a delay of up to 20seconds for the actual signaling of the time out.
Any negative value will allow a job to sit in the Compute Server queueindefinitely.
You must set this parameter through agurobi.lic file (usingQUEUETIMEOUT=n) or anempty environment.Changing the parameter after your environment has been created will haveno effect.
Refer to theGurobi Remote Services Reference Manualfor more information on starting Compute Server jobs.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Router node for Remote Services cluster
Type:string
Default value:""
The router node for a Remote Services cluster. A router can be used toimprove the robustness of a Compute Server deployment. You can refer tothe router using either its name or its IP address. A typical RemoteServices deployment won’t use a router, so you typically won’t need toset this parameter.
Refer to theGurobi Remote Services Reference Manualfor more information on starting Compute Server jobs.
You must set this parameter through either agurobi.lic file (usingROUTER=name) or anempty environment.Changing the parameter after your environment has been created will haveno effect.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Use insecure mode in Transport Layer Security (TLS)
Type:int
Default value:0
Minimum value:0
Maximum value:1
Indicates whether the Remote Services cluster is using insecure mode inthe TLS (Transport Layer Security). Leave this at its default value of 0unless your server administrator tells you otherwise.
Refer to theGurobi Remote Services Reference Manualfor more information on starting Compute Server jobs.
You must set this parameter through either agurobi.lic file (usingCSTLSINSECURE) or anempty environment.Changing the parameter after your environment has been created will haveno effect.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Constraint aggregation passes in cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
A non-negative value indicates the maximum number of constraintaggregation passes performed during cut generation. Overrides theCuts parameter.
Changing the value of this parameter rarely produces a significantbenefit.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Objective cutoff
Type:double
Default value: Infinity for minimization, -Infinity for maximization
Minimum value:-Infinity
Maximum value:Infinity
Indicates that you aren’t interested in solutions whose objective valuesare worse than the specified value. If the objective value for theoptimal solution is equal to or better than the specified cutoff, thesolver will return the optimal solution. Otherwise, it will terminatewith aCUTOFF status.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Cutting plane passes
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
A non-negative value indicates the maximum number of cutting planepasses performed during root cut generation. The default value choosesthe number of cut passes automatically.
In addition to cutting plane separation, each cut pass also appliesheuristics and node probing and also may launch parallel root helperthreads. So even when theCuts parameter is set to 0,the cut loop will apply probing, heuristics and parallel root helpers ina single cut loop iteration.
You should experiment with different values of this parameter if younotice the MIP solver spending significant time on root cut passes thathave little impact on the objective bound.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Global cut control
Type:int
Default value:-1
Minimum value:-1
Maximum value:3
Global cut aggressiveness setting. Use value 0 to shut off cuts, 1 formoderate cut generation, 2 for aggressive cut generation, and 3 for veryaggressive cut generation. The default -1 value chooses automatically.This parameter is overridden by the parameters that control individualcut types (e.g.,CliqueCuts).
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Degenerate simplex moves
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
Limits degenerate simplex moves. These moves are performed to improvethe integrality of the current relaxation solution. By default, thealgorithm chooses the number of degenerate move passes to performautomatically.
The default setting generally works well, but there can be cases wherean excessive amount of time is spent after the initial root relaxationhas been solved but before the cut generation process or the rootheuristics have started. If you see multiple ‘Total elapsed time’messages in the log immediately after the root relaxation log, you maywant to try setting this parameter to 0.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Disconnected component strategy
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
A MIP or an LP model can sometimes be made up of multiple, completelyindependent sub-models. This parameter controls how aggressively we tryto exploit this structure. A value of 0 ignores this structure entirely,while larger values try more aggressive approaches. The default value of-1 chooses automatically.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Frequency of log lines
Type:int
Default value:5
Minimum value:1
Maximum value:MAXINT
Determines the frequency at which log lines are printed (in seconds).
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Distributed MIP job count
Type:int
Default value:0
Minimum value:0
Maximum value:MAXINT
Enables distributed MIP. A value ofn causes the MIP solver todivide the work of solving a MIP model amongn machines. Use theComputeServer parameter to indicate the name of thecluster where you would like your distributed MIP job to run (or useWorkerPool if your client machine will act as managerand you just need a pool of workers).
The distributed MIP solver produces a slightly different log from thestandard MIP solver, and provides different callbacks as well. Pleaserefer to theDistributedAlgorithms section of theGurobi Remote Services Reference Manualfor additional details.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Dual implied bound cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls dual implied bound cut generation. Use 0 to disable these cuts,1 for moderate cut generation, or 2 for aggressive cut generation. Thedefault -1 value chooses automatically. Overrides theCuts parameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls dual reductions
Type:int
Default value:1
Minimum value:0
Maximum value:1
Determines whether dual reductions are performed during the optimizationprocess. You should disable these reductions if you received an optimizationstatus ofINF_OR_UNBD and would like a moredefinitive conclusion.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Primal feasibility tolerance
Type:double
Default value:1e-6
Minimum value:1e-9
Maximum value:1e-2
All constraints must be satisfied to a tolerance ofFeasibilityTol. Tightening this tolerance can produce smallerconstraint violations, but for numerically challenging models it can sometimeslead to much larger iteration counts.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Big-M value for feasibility relaxations
Type:double
Default value:1e6
Minimum value:0
Maximum value:Infinity
When relaxing a constraint in a feasibility relaxation, it is sometimesnecessary to introduce a big-M value. This parameter determines thedefault magnitude of that value.
For details about feasibility relaxations, refer to e.g.GRBfeasrelax in the C API.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls conversion of indicator constraints in the fixed model
Type:int
Default value:0
Minimum value:0
Maximum value:1
Controls how Gurobi deals with indicator constraints when creatingthe fixed model (e.g.GRBconverttofixed andGRBfixmodel in C, orModel.convertToFixed andModel.fixed in Python).
If set to 0 (the default), then an indicator constraint is discarded ifits premise is false (i.e., if the associated binary indicator variableis fixed to a value that does not satisfy the premise condition) in thesolution or MIP start that is associated to the fixed model. On theother hand, if the premise of the indicator is true, then the impliedlinear constraint is added as a regular linear constraint to the fixedmodel.
Let’s consider the case whereFixVarsInIndicators is set to 0.If there is an indicator constraint
\(z = 0 \rightarrow ax \leq b\)
in the model and variable\(z\) has value 1 in the solution for whichthe fixed model is created, then the indicator constraintis not active and it is therefore discarded from the fixed model.If the indicator variable\(z\) has value 0, then the indicator isactive and the linear constraint\(ax \leq b\) is added to thefixed model.
If theFixVarsInIndicators parameter is set to 1, thenall variables (including continuous variables) in the indicatorconstraint are fixed to their solution value, independent of whetherthe indicator is active or not in the associated solution.
Note
Only affects mixed integer programming (MIP) models
Flow cover cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls flow cover cut generation. Use 0 to disable these cuts, 1 formoderate cut generation, or 2 for aggressive cut generation. The default-1 value chooses automatically. Overrides theCutsparameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Flow path cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls flow path cut generation. Use 0 to disable these cuts, 1 formoderate cut generation, or 2 for aggressive cut generation. The default-1 value chooses automatically. Overrides theCutsparameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Error allowed for PWL translation of function constraints
Type:double
Default value:1e-3
Minimum value:1e-6
Maximum value:1e+6
Deprecated since version 13.0:Usingfunction constraints is deprecated since version 13.0.Please usenonlinear constraints instead.
If theFuncPieces parameter is set to value\(-1\)or\(-2\), this attribute provides the maximum allowed error(absolute for\(-1\), relative for\(-2\)) in thepiecewise-linear approximation.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Piece length for PWL translation of function constraints
Type:double
Default value:1e-2
Minimum value:1e-5
Maximum value:1e+6
Deprecated since version 13.0:Usingfunction constraints is deprecated since version 13.0.Please usenonlinear constraints instead.
If theFuncPieces parameter is set to value\(1\),this parameter gives the length of each piece of the piecewise-linearapproximation.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Control whether to under- or over-estimate function values in PWLapproximation
Type:double
Default value:-1
Minimum value:-1
Maximum value:1
Deprecated since version 13.0:Usingfunction constraints is deprecated since version 13.0.Please usenonlinear constraints instead.
This parameter controls whether the piecewise-linear approximation of afunction constraint is an underestimate of the function, anoverestimate, or somewhere in between. A value of\(0.0\) willalways underestimate, while a value of\(1.0\) will alwaysoverestimate. A value in between will interpolate between theunderestimate and the overestimate. A special value of -1 chooses pointsthat are on the original function. The behaviour is not defined forother negative values.
See the discussion offunction constraints for moreinformation.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Sets strategy for PWL function approximation
Type:int
Default value:0
Minimum value:-2
Maximum value:2e+8
Deprecated since version 13.0:Usingfunction constraints is deprecated since version 13.0.Please usenonlinear constraints instead.
This parameter sets the strategy used for performing a piecewise-linearapproximation of a function constraint. There are a few options:
FuncPieces >= 2: Sets the number of pieces; pieces are equalwidth.
FuncPieces = 1: Uses a fixed width for each piece; the actualwidth is provided in theFuncPieceLength parameter.
FuncPieces = 0: Default value; chooses automatically. Currentlyit uses the relative error approach for the approximation, while forversion 10.0 or earlier it mainly uses the number of functionconstraints to set the total number of pieces.
FuncPieces = -1: Bounds the absolute error of the approximation;the error bound is provided in theFuncPieceErrorparameter.
FuncPieces = -2: Bounds the relative error of the approximation;the error bound is provided in theFuncPieceErrorparameter.
This parameter only applies to function constraints whoseFuncPieces attribute has been set to\(0\).
See the discussion offunction constraints for moreinformation.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Maximum allowed value for x and y variables in function constraints withpiecewise-linear approximation
Type:double
Default value:1e+6
Minimum value:1e-2
Maximum value:Infinity
Deprecated since version 13.0:Usingfunction constraints is deprecated since version 13.0.Please usenonlinear constraints instead.
Very large values in piecewise-linear approximations can cause numericalissues. This parameter limits the bounds on the variables thatparticipate in function constraints approximated by a piecewise-linearfunction. Specifically, any bound larger thanFuncMaxVal (inabsolute value) on the variables participating in such a functionconstraint will be truncated.
If theFuncNonlinear attribute of theconstraint is set to 1, or if it is set to -1 and the globalFuncNonlinear parameter is set to 1, thefunction constraint is not approximated by a piecewise-linear functionand theFuncMaxVal parameter does not apply.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Chooses the approximation approach used to handle function constraints
Type:int
Default value:1
Minimum value:0
Maximum value:1
Deprecated since version 13.0:Usingfunction constraints is deprecated since version 13.0.Please usenonlinear constraints instead.
This parameter controls whether general function constraints with theirFuncNonlinear attribute set to -1 arereplaced with a static piecewise-linear approximation (0), or handledinside the branch-and-bound tree using a dynamic outer-approximationapproach (1).
See the discussion offunction constraints for moreinformation.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Gomory cut passes
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
A non-negative value indicates the maximum number of Gomory cut passesperformed. Overrides theCuts parameter.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
GUB cover cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls GUB cover cut generation. Use 0 to disable these cuts, 1 formoderate cut generation, or 2 for aggressive cut generation. The default-1 value chooses automatically. Overrides theCutsparameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Time spent in feasibility heuristics
Type:double
Default value:0.05
Minimum value:0
Maximum value:1
Determines the amount of time spent in MIP heuristics. You can think ofthe value as the desired fraction of total MIP runtime devoted toheuristics (so by default, we aim to spend 5% of runtime on heuristics).Larger values produce more and better feasible solutions, at a cost ofslower progress in the best bound.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Indicates whether to ignore names provided by users.
Type:int
Default value:0
Minimum value:0
Maximum value:1
This parameter affects how Gurobi deals with names. If set to 1,subsequent calls to add variables or constraints to the model willignore the associated names. Names for objectives and the model willalso be ignored. In addition, subsequent calls to modify name attributeswill have no effect. Note that variables or constraints that had namesat the point this parameter was changed to 1 will retain their names. Ifyou wish to discard all name information, you should set this parameterto 1 before adding variables or constraints to the model.
In addition, the parameter affects the behavior of the write functions(e.g.GRBwrite in C, orModel.write in Python). IfIgnoreNames is set to 1, Gurobi uses default names when writing thefile. This can be useful if you have a model with names and want towrite the model, the attributes, a MIP start file, or other informationto disk without including variable and constraint names in the files.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Selects method used to compute IIS
Type:int
Default value:-1
Minimum value:-1
Maximum value:3
Chooses the IIS method to use. To compute an IIS for an LP, it issufficient to solve an LP with dimensions similar to the dual of theoriginal model. If the solve time for that LP is excessive, setting theIISMethod parameter to 1 may offer a faster alternative; other settingsdo not alter the default approach for infeasible LPs. For MIPs,filtering of constraints and variables is required, which involvessolving a series of related MIP subproblems. Methods 0-2 all usefiltering techniques. Method 0 is often faster than method 1, but mayproduce a larger IIS. Method 2 ignores the bound constraints. Ittherefore tends to be faster than methods 0-1, but will fail if thesebounds are necessary to make the problem infeasible. Method 3 willreturn the IIS for the LP relaxation of a MIP model if the relaxation isinfeasible, even though the result may not be minimal when integralityconstraints are included. The default value of -1 chooses automatically.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Implied bound cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls implied bound cut generation. Use 0 to disable these cuts, 1for moderate cut generation, or 2 for aggressive cut generation. Thedefault -1 value chooses automatically. Overrides theCuts parameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Solution improvement strategy control
Type:double
Default value:0.0
Minimum value:0.0
Maximum value:Infinity
The MIP solver can change parameter settings in the middle of the searchin order to adopt a strategy that gives up on moving the best bound andinstead devotes all of its effort towards finding better feasiblesolutions. This parameter allows you to specify an optimality gap atwhich the MIP solver switches to this solution improvement strategy. Forexample, setting this parameter to 0.1 will cause the MIP solver toswitch strategies once the relative optimality gap is smaller than 0.1.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Solution improvement strategy control
Type:double
Default value:Infinity
Minimum value:0.0
Maximum value:Infinity
The MIP solver can change parameter settings in the middle of the searchin order to adopt a strategy that gives up on moving the best bound andinstead devotes all of its effort towards finding better feasiblesolutions. This parameter allows you to specify the node count at whichthe MIP solver switches to this solution improvement strategy. For example,setting this parameter to 10 will cause the MIP solver to switchstrategies once the node count is larger than 10, provided that at leastone feasible solution has been found. If no incumbent solution existswhen the specified node count is reached, the strategy switch will occuras soon as the first feasible solution is discovered.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Solution improvement strategy control
Type:double
Default value:Infinity
Minimum value:0.0
Maximum value:Infinity
The MIP solver can change parameter settings in the middle of the searchin order to adopt a strategy that gives up on moving the best bound andinstead devotes all of its effort towards finding better feasiblesolutions. This parameter allows you to specify the time (in seconds) when the MIPsolver switches to this solution improvement strategy. For example, settingthis parameter to 10 will cause the MIP solver to switch strategies 10seconds after starting the optimization, provided that at least onefeasible solution has been found. If no incumbent solution exists whenthe specified time is reached, the strategy switch will occur as soon asthe first feasible solution is discovered.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Solution improvement strategy control
Type:double
Default value:Infinity
Minimum value:0.0
Maximum value:Infinity
The MIP solver can change parameter settings in the middle of the searchin order to adopt a strategy that gives up on moving the best bound andinstead devotes all of its effort towards finding better feasiblesolutions. This parameter allows you to specify the work (in work units)when the MIP solver switches to this solution improvement strategy. Forexample, setting this parameter to 10 will cause the MIP solver toswitch strategies 10 work units after starting the optimization,provided that at least one feasible solution has been found. If noincumbent solution exists when the specified work is reached, thestrategy switch will occur as soon as the first feasible solution isdiscovered.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Infeasibility proof cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls infeasibility proof cut generation. Use 0 to disable thesecuts, 1 for moderate cut generation, or 2 for aggressive cut generation.The default -1 value chooses automatically. Overrides theCuts parameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Additional info for infeasible/unbounded models
Type:int
Default value:0
Minimum value:0
Maximum value:1
Set this parameter if you want to query the unbounded ray for unboundedmodels (through theUnbdRay attribute), or the infeasibilityproof for infeasible models (through theFarkasDual andFarkasProof attributes).
When this parameter is set additional information will be computed when amodel is determined to be infeasible or unbounded, and a simplex basis isavailable (from simplex or crossover). Note that if a model is determinedto be infeasible or unbounded when solving with barrier, prior to crossover,then this additional information will not be available.
Note that if a model is found to be either infeasible or unbounded, andyou simply want to know which one it is, you should use theDualReductions parameter instead. It performs much lessadditional computation.
Note
Only affects linear programming (LP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls parameter inheritance
Type:int
Default value:-1
Minimum value:-1
Maximum value:1
Indicates whether parameters from a main environment should be inherited whenworking withConcurrent Environments orMultiobjective Environments. If set to 1,parameters are inherited from the main environment: if their value has not beenset in the supporting environment, their value in the mainenvironment is considered. If set to 0, parameters arenot inherited: only parameters defined on the supporting environmentare used.The default value of -1 is equivalent to 0, i.e., parameters are notinherited. This parameter can be set either on the main environment or on thesupporting environment. If it is set on both, its value in the supportingenvironment overrules the value in the main environment.
When using the command line parametersMultiObjSettings orConcurrentSettings, set this parameter to 1 if you want toprovide additional parameters valid for all objectives or concurrent settings,respectively.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Import data into a model before beginning optimization
Type:string
Default value:""
Specifies the name of a file that will be read before beginning acommand-line optimization run. This parameter can be used to input a MIPstart (a.mst or.sol file), MIP hints (a.hnt file), asimplex basis (a.bas file), Gurobi attributes (a.attr file),or a set of parameter settings (a.prm file) from the Gurobi commandline. The suffix may optionally be followed by.zip,.gz,.bz2,.7z or.xz ifthe input files are compressed.
Note
Command-line only (gurobi_cl), can be used multiple times
For examples of how to use this parameter, refer to theReading Input Files section.
Integrality focus
Type:int
Default value:0
Minimum value:0
Maximum value:1
One unfortunate reality in MIP is that integer variables don’t alwaystake exact integral values. While this typically doesn’t createsignificant problems, in some situations the side-effects can be quiteundesirable. The best-known example is probably atrickle flow, wherea continuous variable that is meant to be zero when an associated binaryvariable is zero instead takes a non-trivial value. More precisely,given a constraint\(y \leq M b\), where\(y\) is a non-negativecontinuous variable,\(b\) is a binary variable, and\(M\) is aconstant that captures the largest possible value of\(y\), theconstraint is intended to enforce the relationship that\(y\) mustbe zero if\(b\) is zero. With the defaultinteger feasibility tolerance, the binaryvariable is allowed to take a value as large as\(1e-5\) while stillbeing considered as taking value zero. If the\(M\) value is large,then the\(M b\) upper bound on the\(y\) variable can besubstantial.
Reducing the value of theIntFeasTol parameter can mitigatethe effects of such trickle flows, but often at a significant cost, and oftenwith limited success. TheIntegralityFocus parameter providesa better alternative. Setting this parameter to 1 requests that the solverwork harder to try to avoid solutions that exploit integrality tolerances.More precisely, the solver tries to find solutions that are still (nearly)feasible if all integer variables are rounded to exact integral values. Weshould say that the solver won’t always succeed in finding such solutions, andthat this setting introduces a modest performance penalty, but the settingwill significantly reduce the frequency and magnitude of such violations.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Integer feasibility tolerance
Type:double
Default value:1e-5
Minimum value:1e-9
Maximum value:1e-1
An integrality restriction on a variable is considered satisfied whenthe variable’s value is less thanIntFeasTol from the nearestinteger value. Tightening this tolerance can produce smaller integralityviolations, but very tight tolerances may significantly increaseruntime. Loosening this tolerance rarely reduces runtime.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Simplex iteration limit
Type:double
Default value:Infinity
Minimum value:0
Maximum value:Infinity
Limits the number of simplex iterations performed. The limit applies toMIP, barrier crossover, and simplex. Optimization returns with anITERATION_LIMIT status if the limit is exceeded.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Compute Server Job ID
Type:string
Default value:""
If you are running on a Compute Server, this parameter provides theCompute Server Job ID for the current job. Note that this is a read-onlyparameter.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Level of detail in JSON solution format
Type:int
Default value:0
Minimum value:0
Maximum value:1
This parameter controls the amount of detail included in a JSONsolution. For example, when this parameter is set to 1, the JSON stringwill contain data for all of the variables, even those with solutionvalue 0.
For a precise description of the contents of the resulting JSON string,please refer to theJSON solution format section.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Programs that use lazy constraints must set this parameter
Type:int
Default value:0
Minimum value:0
Maximum value:1
Programs that add lazy constraints through a callback must set thisparameter to value 1. The parameter tells the Gurobi algorithms to avoidcertain reductions and transformations that are incompatible with lazyconstraints.
Note that if you use lazy constraints by setting theLazyattribute (and not through a callback), there’s no need to set thisparameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
License ID
Type:int
Default value:0
Minimum value:0
Maximum value:MAXINT
When using a WLS license, set this parameter to the license ID. You canretrieve this value from your account on theGurobi Web License Manager site.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Lift-and-project cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls lift-and-project cut generation. Use 0 to disable these cuts, 1for moderate cut generation, or 2 for aggressive cut generation. Thedefault -1 value chooses automatically. Overrides theCuts parameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls whether and how to warm-start LP optimization
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls whether and how Gurobi uses warm start information for an LPoptimization. A warm start can consist of any combination ofbasis statuses, a primal start vector, or a dual start vector. It isspecified using the attributesVBasis andCBasisorPStart andDStart on the original model.
Setting this parameter to 2 is particularly useful for communicatingadvanced start information while retaining the performance benefitsof presolve. The default value of -1 is equivalent to 1 for allMethod choices except for PDHG, for which it isequivalent to 2.
As a general rule, setting this parameter to 0 ignores any startinformation and solves the model from scratch. Setting it to 1 (thedefault) uses the provided warm start information to solve the original,unpresolved problem, regardless of whether presolve is enabled. Settingit to 2 uses the start information to solve the presolved problem,assuming that presolve is enabled. This involves mapping the solution ofthe original problem into an equivalent (or sometimes nearly equivalent)crushed solution of the presolved problem. If presolve is disabled, thensetting 2 still prioritizes start vectors, while setting 1 prioritizesbasis statuses. Taken together, the LPWarmStart parameter setting, theLP algorithm specified by Gurobi’s Method parameter, and the availableadvanced start information determine whether Gurobi will use basisstatuses only, basis statuses augmented with information from startvectors, or a basis obtained by applying the crossover method to theprovided primal and dual start vectors to jump start the optimization.
When Gurobi’s Method parameter requests the barrier solver, primal anddual start vectors are prioritized over basis statuses (but only if youprovide both). These start vectors are fed to the crossover procedure.This is the same crossover that is used to compute a basic solution fromthe interior solution produced by the core barrier algorithm, but inthis case crossover is started from arbitrary start vectors. If you setthe LPWarmStart parameter to 1, crossover will be invoked on theoriginal model using the provided vectors. Any provided basisinformation will not be used in this case. If you set LPWarmStart to 2,crossover will be invoked on the presolved model using crushed startvectors. If you set the parameter to 2 and provide a basis but no startvectors, the basis will be used to compute the corresponding primal anddual solutions on the original model. Those solutions will then becrushed and used as primal and dual start vectors for the crossover,which will then construct a basis for the presolved model. Note that forall of these settings and start combinations, no barrier algorithmiterations are performed.
When the Method parameter selects PDHG, primal and dual start vectors areused to warm start PDHG iterations directly before proceeding to crossoverif it is enabled. If a warm start basis is provided, it will be used toconstruct start vectors for the PDHG solve. If both a basis and vectors aregiven, vectors are prioritised over basis statuses. If you set LPWarmStartto 1, start vectors will be used to warm-start PDHG on the original model.Otherwise, if presolve is enabled, start vectors will be crushed and usedto warm-start PDHG on the presolved model.
The simplex algorithms provide more warm-starting options. With aparameter value of 1, simplex will start from a provided basis, ifavailable. Otherwise, it uses a provided start vector to refine thecrash basis it computes. Primal simplex will usePStart and dualsimplex will useDStart in this refinement process.
With a value of 2, simplex will use the crushed start vector on the presolvedmodel (PStart for primal simplex,DStart for dual) torefine the crash basis. This is true regardless of whether the start isderived from start vectors or a starting basis from the original model. Thedifference is that if you provide an advanced basis, the basis will be used tocompute the corresponding primal and dual solutions on the original model fromwhich the primal or dual start on the presolved model will be derived.
Note
Only affects linear programming (LP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Name for Gurobi log file
Type:string
Default value:""
Determines the name of the Gurobi log file. Modifying this parametercloses the current log file and opens the specified file. Use an emptystring for no log file. UseOutputFlag to shut off alllogging.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Control console logging
Type:int
Default value:1
Minimum value:0
Maximum value:1
Enables or disables console logging. Note that this refers to the outputof Gurobi to the console. This includes the various display and printfunctions provided by the API in interactive environments.
UseOutputFlag to shut off all logging.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Threshold pivoting tolerance
Type:double
Default value:0.0078125
Minimum value:1e-4
Maximum value:0.999
The Markowitz tolerance is used to limit numerical error in the simplexalgorithm. Specifically, larger values reduce the error introduced inthe simplex basis factorization. A larger value may avoid numericalproblems in rare situations, but it will also harm performance.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Master Knapsack cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls the generation of cuts derived from the master knapsack polytope.Use 0 to disable these cuts, 1 for moderate cut generation,or 2 for aggressive cut generation. The default -1 value choosesautomatically. Overrides theCuts parameter.
Memory limit
Type:double
Default value:Infinity
Minimum value:0
Maximum value:Infinity
Limits the total amount of memory (in GB, i.e.,\(10^9\) bytes)available to Gurobi. If more is needed, Gurobi will fail with anOUT_OF_MEMORY error.
Note that it is not possible to retrieve solution information after anerror termination. Thus, the behavior of this parameter is differentfrom that of other termination criteria likeSoftMemLimit,TimeLimit, orNodeLimit, where the solver will terminate with aStatus Code and solution information will stillbe available.
One advantage of using this parameter rather than the similarSoftMemLimit is thatMemLimit is checked afterevery memory allocation, so Gurobi will terminate at precisely the point wherethe limit is exceeded.
Note that allocated memory is tracked across all models within a Gurobienvironment. If you create multiple models in one environment, theseadditional models will count towards overall memory consumption.
Memory usage is also tracked across all threads. One consequence of thisis that termination may be non-deterministic for multi-threaded runs.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Algorithm used to solve continuous models
Type:int
Default value:-1
Minimum value:-1
Maximum value:6
Algorithm used to solve continuous models or the initial root relaxationof a MIP model. Options are:
-1=automatic,
0=primal simplex,
1=dual simplex,
2=barrier,
3=concurrent,
4=deterministic concurrent,
5=deterministic concurrent simplex (deprecated; seeConcurrentMethod), and
6=PDHG (Primal-Dual Hybrid Gradient).
Available settings and default behaviour depend on the model type or the typeof the initial root relaxation. In the current release, the default Automatic(Method=-1) setting will typically choose non-deterministic concurrent(Method=3) for an LP, barrier (Method=2) for a QP or QCP, and dual(Method=1) for the MIP root relaxation. If the size of the MIP rootrelaxation is large, then it will often select deterministic concurrent(Method=4) or deterministic concurrent simplex (Method=5).
Concurrent methods aren’t available for QP and QCP. Only the simplex andbarrier algorithms are available for continuous QP models. If you selectbarrier (Method=2) to solve the root of an MIQP model, then you need toalso select barrier for the node relaxations (i.e. setNodeMethod=2). Only barrier is available for continuous QCP models.However if you choose LP relaxations for solving MIQCP, you can also selectthe simplex algorithms (Method=0 orMethod=1).
Concurrent optimizers run multiple solvers on multiple threadssimultaneously and choose the one that finishes first. The solvers that arerun concurrently can be controlled with theConcurrentMethod parameter. The deterministic options(Method=4 andMethod=5) give the exact same result each time, whilethe non-deterministic option (Method=3) is often faster but can producedifferent optimal bases when run multiple times.
The default setting is rarely significantly slower than the bestpossible setting, so you generally won’t see a big gain from changingthis parameter. There are classes of models where one particularalgorithm is consistently fastest, though, so you may want to experimentwith different options when confronted with a particularly difficultmodel.
Note that if memory is tight on an LP model, you should consider usingthe dual simplex method (Method=1). The concurrent optimizer, which istypically chosen when using the default setting, consumes a lot morememory than dual simplex alone.
In multi-objective LP optimization:
The first objective is solved using LP defaults. It can be set by theuser using theMethod parameter.
Subsequent objectives are solved by default using primal simplex toallow for warm starting. The algorithm used here can be controlled usingMultiObjMethod.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Minimum relaxation heuristic
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
Number of nodes to explore in the minimum relaxation heuristic.
This heuristic is quite expensive, and generally produces poor qualitysolutions. You should generally only use it if other means, includingexploration of the tree with default settings, fail to produce afeasible solution.
The default value automatically chooses whether to apply the heuristic.It will only rarely choose to do so.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
MIP solver focus
Type:int
Default value:0
Minimum value:0
Maximum value:3
TheMIPFocus parameter allows you to modify your high-levelsolution strategy, depending on your goals. By default, the Gurobi MIP solverstrikes a balance between finding new feasible solutions and proving that thecurrent solution is optimal. If you are more interested in finding feasiblesolutions quickly, you can selectMIPFocus=1. If you believe the solver ishaving no trouble finding good quality solutions, and wish to focus moreattention on proving optimality, selectMIPFocus=2. If the best objectivebound is moving very slowly (or not at all), you may want to tryMIPFocus=3 to focus on the bound.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Relative MIP optimality gap
Type:double
Default value:1e-4
Minimum value:0
Maximum value:Infinity
The MIP solver will terminate (with an optimal result) when the gap betweenthe lower and upper objective bound is less thanMIPGap timesthe absolute value of the incumbent objective value. More precisely, if\(z_P\) is the primal objective bound (i.e., the incumbent objectivevalue, which is the upper bound for minimization problems), and\(z_D\) isthe dual objective bound (i.e., the lower bound for minimization problems),then the MIP gap is defined as
\(gap = \vert z_P - z_D\vert / \vert z_P\vert\).
Note that if\(z_P = z_D = 0\), then the gap is defined to be zero.If\(z_P = 0\) and\(z_D \neq 0\), the gap is defined to beinfinity.
For most models,\(z_P\) and\(z_D\) will have the same signthroughout the optimization process, and then the gap is monotonicallydecreasing. But if\(z_P\) and\(z_D\) have opposite signs, therelative gap may increase after finding a new incumbent solution, eventhough the absolute gap\(\vert z_P - z_D\vert\) has decreased.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Absolute MIP optimality gap
Type:double
Default value:1e-10
Minimum value:0
Maximum value:Infinity
The MIP solver will terminate (with an optimal result) when the gap betweenthe lower and upper objective bound is less thanMIPGapAbs.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
MIP separation cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls MIP separation cut generation. Use 0 to disable these cuts, 1for moderate cut generation, or 2 for aggressive cut generation. Thedefault -1 value chooses automatically. Overrides theCuts parameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Method used to solve MIQCP models
Type:int
Default value:-1
Minimum value:-1
Maximum value:1
Controls the method used to solve MIQCP models. Value 1 uses alinearized, outer-approximation approach, while value 0 solvescontinuous QCP relaxations at each node. The default setting (-1)chooses automatically.
Note
Only affects MIQCP models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
MIR cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls Mixed Integer Rounding (MIR) cut generation. Use 0 to disablethese cuts, 1 for moderate cut generation, or 2 for aggressive cutgeneration. The default -1 value chooses automatically. Overrides theCuts parameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Mixing cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls Mixing cut generation. Use 0 to disable these cuts, 1 formoderate cut generation, or 2 for aggressive cut generation. The default-1 value chooses automatically. Overrides theCutsparameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Mod-k cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls mod-k cut generation. Use 0 to disable these cuts, 1 formoderate cut generation, or 2 for aggressive cut generation. The default-1 value chooses automatically. Overrides theCutsparameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Method used for multi-objective solves
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
When solving a continuous multi-objective model using a hierarchical approach,the model is solved once for each objective. The algorithm used to solve forthe highest priority objective is controlled by theMethodparameter. This parameter determines the algorithm used to solve forsubsequent objectives. As with theMethod parameters, valuesof 0 and 1 use primal and dual simplex, respectively. A value of 2 indicatesthat warm-start information from previous solves should be discarded, and themodel should be solved from scratch (using the algorithm indicated by theMethod parameter). The default setting of -1 usually choosesprimal simplex.
Note
Only affects continuous multi-objective models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Initial presolve level on multi-objective models
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls the initial presolve level used for multi-objective models.Value 0 disables the initial presolve, value 1 applies presolveconservatively, and value 2 applies presolve aggressively. The default-1 value usually applies presolve conservatively. Aggressive presolvemay increase the chance of the objective values being slightly differentthan those for other options.
Note
Only affects multi-objective models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Create multi-objective settings from a list of .prm files
Type:string
Default value:""
This command-line only parameter allows you to specify a comma-separatedlist of.prm files that are used to set parametersfor the different solves in a multi-objective model.It is also possible to provide one parameterfile with several parameter settings, refer toPRM Format for more details.
In the case ofgrbtune, the same settings are applied to all themodels.
To give an example, you could create two.prm files with thefollowing contents…
vb0.prm:
VarBranch 0
vb1.prm:
VarBranch 1
Issuing the commandgurobi_clMultiObjSettings=vb0.prm,vb1.prmmodel.mps would usedifferent branching strategies when solving for the two objectives ofthe multi-objective model.
Note
Command-line only (gurobi_cl andgrbtune)
Note
Only affects multi-objective models
Network simplex algorithm
Type:int
Default value:-1
Minimum value:-1
Maximum value:1
Controls whether to use network simplex. Value 0 doesn’t use networksimplex. Value 1 indicates to use network simplex, if an LP is a networkproblem. The default -1 value chooses automatically.
Note
Only affects linear programming (LP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Network cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls network cut generation. Use 0 to disable these cuts, 1 formoderate cut generation, or 2 for aggressive cut generation. The default-1 value chooses automatically. Overrides theCutsparameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Complementarity tolerance for the NL barrier algorithm
Type:double
Default value:1e-8
Minimum value:1e-12
Maximum value:1e-1
Important
We consider this feature apreview in this release. This means thatit is fully tested and supported, but will likely undergo significantchanges in subsequent Gurobi technical or major releases, potentiallyincluding breaking changes in API, behavior and packaging.
For the NL barrier algorithm, the complementarity error must be smaller thanNLBarCFeasTol in order for a model to be declared locallyoptimal. Due to problem transformations like presolve or internal scaling, thereturned solution’s residuals may deviate from those observed by the algorithm.
Note
Only affects the NL barrier algorithm
For examples of how to query or modify parameter values from our differentAPIs, refer to ourParameter Examples.
Dual feasibility tolerance for the NL barrier algorithm
Type:double
Default value:1e-6
Minimum value:1e-12
Maximum value:1e-1
Important
We consider this feature apreview in this release. This means thatit is fully tested and supported, but will likely undergo significantchanges in subsequent Gurobi technical or major releases, potentiallyincluding breaking changes in API, behavior and packaging.
For the NL barrier algorithm, the dual feasibility error must be smaller thanNLBarDFeasTol in order for a model to be declared locallyoptimal. Due to problem transformations like presolve or internal scaling, thereturned solution’s residuals may deviate from those observed by the algorithm.
Note
Only affects the NL barrier algorithm
For examples of how to query or modify parameter values from our differentAPIs, refer to ourParameter Examples.
NL barrier iteration limit
Type:int
Default value:1000
Minimum value:0
Maximum value:MAXINT
Important
We consider this feature apreview in this release. This means thatit is fully tested and supported, but will likely undergo significantchanges in subsequent Gurobi technical or major releases, potentiallyincluding breaking changes in API, behavior and packaging.
Limits the number of barrier NL iterations performed.
Optimization returns with anITERATION_LIMIT statusif the limit is exceeded.
Note
Only affects the NL barrier algorithm
For examples of how to query or modify parameter values from our differentAPIs, refer to ourParameter Examples.
Primal feasibility tolerance for the NL barrier algorithm
Type:double
Default value:1e-6
Minimum value:1e-12
Maximum value:1e-1
Important
We consider this feature apreview in this release. This means thatit is fully tested and supported, but will likely undergo significantchanges in subsequent Gurobi technical or major releases, potentiallyincluding breaking changes in API, behavior and packaging.
For the NL barrier algorithm, the primal feasibility error must be smaller thanNLBarPFeasTol in order for a model to be declared locallyoptimal. Due to problem transformations like presolve or internal scaling, thereturned solution’s residuals may deviate from those observed by the algorithm.
Note
Only affects the NL barrier algorithm
For examples of how to query or modify parameter values from our differentAPIs, refer to ourParameter Examples.
Controls the NLP heuristic
Type:int
Default value:-1
Minimum value:-1
Maximum value:3
The NLP heuristic uses a non-linear barrier solver to find feasible solutions tononconvex quadratic and nonlinear models during a global optimization solve. Itoften helps to find solutions quicker, but in some cases it can consumesignificant runtime without producing a solution. A value of 0 disablesthe heuristic completely, while larger values call the heuristic moreand more aggressively during the optimization process.The default -1 value chooses automatically.
Note
Only affects models with nonconvex quadratic or nonlinear expressions in theobjective or constraints
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Directory for node files
Type:string
Default value:"."
Determines the directory into which nodes are written when node memoryusage exceeds the specifiedNodefileStart value.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Write MIP nodes to disk
Type:double
Default value:Infinity
Minimum value:0
Maximum value:Infinity
If you find that the Gurobi Optimizer exhausts memory when solving aMIP, you should modify theNodefileStart parameter. When the amountof memory used to store nodes (measured in GB, i.e.,\(10^9\) bytes)exceeds the specified parameter value, nodes are compressed and writtento disk. We recommend a setting of0.5, but you may wish to choose adifferent value, depending on the memory available in your machine. Bydefault, nodes are written to the current working directory. TheNodefileDir parameter can be used to choose a differentlocation.
If you still exhaust memory after setting theNodefileStartparameter to a small value, you should try limiting the thread count.Each thread in parallel MIP requires a copy of the model, as well asseveral other large data structures. Reducing theThreads parameter can sometimes significantly reducememory usage.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
MIP node limit
Type:double
Default value:Infinity
Minimum value:0
Maximum value:Infinity
Limits the number of MIP nodes explored. Optimization returns with anNODE_LIMIT status if the limit is exceeded. Note thatif multiple threads are used for the optimization, the actual number ofexplored nodes may be slightly larger than the set limit.
This parameter iscallback settable. It can be changed from within a callbackwhen thewhere value isPRESOLVED,SIMPLEX,MIP,MIPSOL,MIPNODE,BARRIER, orMULTIOBJ (see theCallback Codes section for moreinformation). How to do that for the different APIs is illustratedhere. In case of a remoteserver, the change of a parameter from within acallback may not be taken into account immediately.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Method used to solve MIP node relaxations
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Algorithm used for MIP node relaxations (except for the initial rootnode relaxation, seeMethod). Options are: -1=automatic,0=primal simplex, 1=dual simplex, and 2=barrier. Note that barrier isnot an option for MIQP node relaxations.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Strategy for handling non-convex quadratic programs
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Sets the strategy for handling non-convex quadratic objectives ornon-convex quadratic constraints. With setting 0, an error is reportedif the original user model contains non-convex quadratic constructs(unless Q matrix linearization, as controlled by thePreQLinearize parameter, removes the non-convexity).With setting 1, an error is reported if non-convex quadratic constructscould not be discarded or linearized during presolve. With setting 2,non-convex quadratic problems are solved by translating them intobilinear form and applying spatial branching. The default -1 setting iscurrently almost equivalent to 2, except that it takes less care toavoid presolve reductions that might transform a convex constraint intoone that can no longer be detected to be convex, and thus can sometimesperform more presolve reductions.
Note
Only affects QP, QCP, MIQP, and MIQCP models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Limits the number of solutions found by the NoRel heuristic
Type:int
Default value:0
Minimum value:0
Maximum value:MAXINT
Limits the number of solutions found by the NoRel heuristic.This heuristic searches for high-quality feasible solutions.It can be quite useful on models where theroot relaxation is particularly expensive.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Limits the amount of time spent in the NoRel heuristic
Type:double
Default value:0
Minimum value:0
Maximum value:Infinity
Limits the amount of time (in seconds) spent in the NoRel heuristic.This heuristic searches for high-quality feasible solutions beforesolving the root relaxation. It can be quite useful on models where theroot relaxation is particularly expensive.
Note that this parameter will introduce non-determinism - different runsmay take different paths. Use theNoRelHeurWorkparameter for deterministic results.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Limits the amount of work spent in the NoRel heuristic
Type:double
Default value:0
Minimum value:0
Maximum value:Infinity
Limits the amount of work spent in the NoRel heuristic. This heuristicsearches for high-quality feasible solutions before solving the rootrelaxation. It can be quite useful on models where the root relaxationis particularly expensive.
The work metric used in this parameter is tough to define precisely. Asingle unit corresponds to roughly a second, but this will depend on themachine, the core count, and in some cases the model. You may need toexperiment to find a good setting for your model.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Choose simplex pricing norm.
Type:int
Default value:-1
Minimum value:-1
Maximum value:3
Chooses from among multiple pricing norm variants. The details of howthis parameter affects the simplex pricing algorithm are subtle anddifficult to describe, so we’ve simply labeled the options 0 through 3.The default value of -1 chooses automatically.
Changing the value of this parameter rarely produces a significantbenefit.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Numerical focus
Type:int
Default value:0
Minimum value:0
Maximum value:3
TheNumericFocus parameter controls the degree to which thecode attempts to detect and manage numerical issues. The default setting (0)makes an automatic choice, with a slight preference for speed. Settings 1-3increasingly shift the focus towards being more careful in numericalcomputations. With higher values, the code will spend more time checking thenumerical accuracy of intermediate results, and it will employ more expensivetechniques in order to avoid potential numerical issues.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls aggressiveness of optimality-based bound tightening
Type:int
Default value:-1
Minimum value:-1
Maximum value:3
Value 0 disables optimality-based bound tightening (OBBT). Levels 1-3describe the amount of work allowed for OBBT ranging from moderate toaggressive. The default -1 value is an automatic setting which chooses arather moderate setting.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Select an objective
Type:int
Default value:0
Minimum value:0
Maximum value:MAXINT
When working with multiple objectives, this parameter selects the indexof the objective you want to work with. When you query or modify anattribute associated with multiple objectives (ObjN,ObjNWeight, etc.), theObjNumber parameterdetermines which objective function is actually affected. When you queryan attribute associated with multi-objective passes(ObjPassNStatus,ObjPassNObjVal, etc.) and theparameterObjPassNumber is set to -1, theObjNumber parameter determines for which pass the valueis returned. The value of this parameter should be less than the valueof theNumObj attribute (which captures the number ofobjectives in the model).
Please refer to the discussion ofMultiple Objectives for more informationon the use of alternative objectives.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Select an optimization pass
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
After a multi-objective model has been solved, this parameter selectsthe index of the optimization pass for which you want to query resultssuch asObjPassNIterCount,ObjPassNMipGap, etc.The value of this parameter should be strictly less than the value oftheNumObjPasses attribute (which captures the number ofoptimization passes processed in the last run). If the parameter valueis set to -1 (default), the optimization pass selected is the one inwhich objective\(k\) was processed. You set\(k\) using theObjNumber parameter.
Please refer to the discussion ofMultiple Objectives for more information on the use of alternativeobjectives.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Objective scaling
Type:double
Default value:0.0
Minimum value:-1
Maximum value:Infinity
When positive, divides the model objective by the specified value toavoid numerical issues that may result from very large or very smallobjective coefficients. The default value of 0 decides on the scalingautomatically. A value less than zero uses the maximum coefficient tothe specified power as the scaling, e.g., ObjScale=-1 would divide bythe largest objective coefficient, while ObjScale=-0.5 would divide bythe square root of that coefficient.
Note that objective scaling can lead to large dual violations on theoriginal, unscaled objective when the optimality tolerance with thescaled objective is barely satisfied, so it should be used sparingly.Note also that scaling will be more effective when all objectivecoefficients are of similar orders of magnitude, as opposed toobjectives with a wide range of coefficients. In the latter case,consider using theMultiple Objectivesfeature instead.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls the strategy to solve continuous nonlinear nonconvex models
Type:int
Default value:-1
Minimum value:-1
Maximum value:1
Important
We consider this feature apreview in this release. This means thatit is fully tested and supported, but will likely undergo significantchanges in subsequent Gurobi technical or major releases, potentiallyincluding breaking changes in API, behavior and packaging.
Specifies the optimality target for nonlinear continuous problems (NLP),including nonconvex QP and QCP models. Available options are Automatic (-1),Global Optimum (0), and Local Optimum (1). Currently, the automatic choicealways selects the search for a global optimum (0).
For Option 0, the linearized outer-approximation branch-and-bound approachseeks a feasible point with the best possible objective value and provides anoptimality gap.
For Option 1, the nonlinear (NL) barrier algorithm seeks a local optimum, i.e.,a feasible point that has the best possible objective value among the feasiblepoints within a local neighborhood. This alternative typically converges fasterand is able to handle larger instances than a global search, but it does notprovide an optimality gap.
Upon success, the NL barrier algorithm concludes with statusLOCALLY_OPTIMAL. If it terminates withLOCALLY_INFEASIBLE, the method found a point that isan infeasible local minimizer of the constraint violation. This is an indicationthat the problem might be infeasible.
Note that the search for a local optimum can only be selected if the model hasno discrete variables or SOS constraints, and does not includenondifferentiable functions, such as PWL functions, Max-, Min-, Abs-operators,or the 1- or Infinity-norm.
The V13 preview version of the NL barrier algorithm does not yet support allsolution and quality attributes. In particular, the optimal values of dualvariables and some quality attributes (such as scaled violations) are not yetavailable.
Note
Only affects continuous nonlinear nonconvex QP, QCP, or NLP models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Dual feasibility tolerance
Type:double
Default value:1e-6
Minimum value:1e-9
Maximum value:1e-2
For the simplex algorithm and crossover, reduced costs must allbe smaller thanOptimalityTol in the improving direction inorder for a model to be declared optimal.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls Gurobi output
Type:int
Default value:1
Minimum value:0
Maximum value:1
Enables or disables solver output. UseLogFile andLogToConsole for finer-grain control. SettingOutputFlag to 0 is equivalent to settingLogFile to"" andLogToConsole to 0.
Note that server-side logging is always active for remote jobs run onGurobi Instant Cloud, Compute Server, or Cluster Manager. This is notimpacted by any user parameter settings.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls where the partition heuristic runs
Type:int
Default value:15
Minimum value:0
Maximum value:31
Setting thePartition attribute on at least one variable in amodel enables the partitioning heuristic, which uses large-neighborhoodsearch to try to improve the current incumbent solution.
This parameter determines where that heuristic runs. Options are:
Before the root relaxation is solved (16)
At the start of the root cut loop (8)
At the end of the root cut loop (4)
At the nodes of the branch-and-cut search (2)
When the branch-and-cut search terminates (1)
The parameter value is a bit vector, where each bit turns the heuristicon or off at that place. The numerical values next to the options listedabove indicate which bit controls the corresponding option. Thus, forexample, to enable the heuristic at the beginning and end of the rootcut loop (and nowhere else), you would set the 8 bit and the 4 bit to 1,which would correspond to a parameter value of 12.
The default value of 15 indicates that we enable every option except thefirst one listed above.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
PDHG absolute feasibility tolerance
Type:double
Default value:1e-6
Minimum value:1e-9
Maximum value:1e-2
The PDHG algorithm will terminate if both of the following conditions aresatisfied:
The relative difference between the primal and dual objective valuesis less thanPDHGConvTol, and
The primal and dual solution values meet the specified feasibilitytolerance. This is satisfied if either:
the absolute residuals of all primal and dual equations are belowPDHGAbsTol; or
the relative residuals of all primal and dual equations are belowPDHGRelTol.
You can set PDHGAbsTol to loosen or tighten the second terminationcriterion. Note though that relative tolerances typically lead to earliertermination than absolute tolerances. If you wish to terminate PDHG basedsolely on absolute tolerances, you should setPDHGRelTolto zero (0).
The first criterion is controlled byPDHGConvTol.
Note
PDHG only
PDHG convergence tolerance
Type:double
Default value:1e-6
Minimum value:0
Maximum value:1
The PDHG algorithm will terminate if both of the following conditions aresatisfied:
The relative difference between the primal and dual objective valuesis less thanPDHGConvTol, and
The primal and dual solution values meet the specified feasibilitytolerance. This is satisfied if either:
the absolute residuals of all primal and dual equations are belowPDHGAbsTol; or
the relative residuals of all primal and dual equations are belowPDHGRelTol.
You can set PDHGConvTol to loosen or tighten the first terminationcriterion.
The second criterion is controlled byPDHGAbsTol andPDHGRelTol.
Note
PDHG only
Enables PDHG on GPU on compatible systems
Type:int
Default value:0
Minimum value:0
Maximum value:1
Important
This feature is still consideredbeta in this release. This meansthat we invite users to try this features, but the code didn’t undergoas much testing as the rest of the product. This features shouldn’tbe used in production settings, and the scope of technical support ison a best-effort basis.
By default, the PDHG algorithm runs on the CPU. You can set this parameterto 1 to have PDHG run on the GPU instead, if your Gurobi build has GPU supportand your system has compatible hardware. Note that you must additionally set theMethod parameter toGRB_METHOD_PDHG (6) to enable PDHG.
Note
PDHG only
PDHG iteration limit
Type:double
Default value:Infinity
Minimum value:0
Maximum value:Infinity
Limits the number of PDHG iterations performed.
The PDHG algorithm will terminate if this limit is exceeded. If crossoveris enabled, it will start from the final PDHG iterate. If crossover isdisabled, optimization will return with anITERATION_LIMIT status.
Note
PDHG only
PDHG relative feasibility tolerance
Type:double
Default value:1e-6
Minimum value:0
Maximum value:Infinity
The PDHG algorithm will terminate if both of the following conditions aresatisfied:
The relative difference between the primal and dual objective valuesis less thanPDHGConvTol, and
The primal and dual solution values meet the specified feasibilitytolerance. This is satisfied if either:
the absolute residuals of all primal and dual equations are belowPDHGAbsTol; or
the relative residuals of all primal and dual equations are belowPDHGRelTol.
You can set PDHGRelTol to loosen or tighten the second terminationcriterion.
If you set PDHGRelTol to the special value zero (0), then only the absolutefeasibility tolerances are considered. Specifically, primal and dualsolutions are considered feasible only if the residuals of all primaland dual equations are belowPDHGAbsTol.
The first criterion is controlled byPDHGConvTol.
Note
PDHG only
Simplex perturbation
Type:double
Default value:0.0002
Minimum value:0
Maximum value:Infinity
Magnitude of the simplex perturbation. Note that perturbation is onlyapplied when progress has stalled, so the parameter will often have noeffect.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Maximum relative gap for stored solutions
Type:double
Default value:Infinity
Minimum value:0
Maximum value:Infinity
Determines how large a (relative) gap to tolerate in stored solutions.When this parameter is set to a non-default value, solutions whoseobjective values exceed that of the best known solution by more than thespecified (relative) gap are discarded. For example, if the MIP solverhas found a solution at objective 100, then a setting ofPoolGap=0.2would discard solutions with objective worse than 120 (assuming aminimization objective).
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Maximum absolute gap for stored solutions
Type:double
Default value:Infinity
Minimum value:0
Maximum value:Infinity
Determines how large a (absolute) gap to tolerate in stored solutions.When this parameter is set to a non-default value, solutions whoseobjective values exceed that of the best known solution by more than thespecified (absolute) gap are discarded. For example, if the MIP solverhas found a solution at objective 100, then a setting ofPoolGapAbs=20 would discard solutions with objective worse than 120(assuming a minimization objective).
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Selects different modes for exploring the MIP search tree
Type:int
Default value:0
Minimum value:0
Maximum value:2
Selects different modes for exploring the MIP search tree. With thedefault setting (PoolSearchMode=0), the MIP solver tries to find anoptimal solution to the model. It keeps other solutions found along theway, but those are incidental. By setting this parameter to anon-default value, the MIP search will continue after the optimalsolution has been found in order to find additional, high-qualitysolutions. With a non-default value (PoolSearchMode=1 orPoolSearchMode=2), the MIP solver will try to findn solutions,wheren is determined by the value of thePoolSolutions parameter. With a setting of 1, there areno guarantees about the quality of the extra solutions, while with asetting of 2, the solver will find then best solutions. The cost ofthe solve will increase with increasing values of this parameter.
Once optimization is complete, thePoolObjBound attribute canbe used to evaluate the quality of the solutions that were found. Forexample, a value ofPoolObjBound=100 indicates that there are noother solutions with objective better 100, and thus that any knownsolutions with objective better than 100 are better than any as-yetundiscovered solutions.
SeeSolution Pool for more information aboutsolution pools, including subtleties and limitations.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Number of MIP solutions to store
Type:int
Default value:10
Minimum value:1
Maximum value:MAXINT
Determines how many MIP solutions are stored. For the default value ofPoolSearchMode, these are just the solutions that are foundalong the way in the process of exploring the MIP search tree. For othervalues ofPoolSearchMode, this parameter sets a target for howmany solutions to find, so larger values will impact performance.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls presolve reductions that affect user cuts
Type:int
Default value:0
Minimum value:0
Maximum value:1
Shuts off a few reductions in order to allow presolve to transform anyconstraint on the original model into an equivalent constraint on thepresolved model. You should consider setting this parameter to 1 if youare using callbacks to add your own cuts. A cut that cannot be appliedto the presolved model will be silently ignored. The impact on the sizeof the presolved problem is usually small.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls the presolve dependent row reduction
Type:int
Default value:-1
Minimum value:-1
Maximum value:1
Controls the presolve dependent row reduction, which eliminates linearlydependent constraints from the constraint matrix. The default setting(-1) applies the reduction to continuous models but not to MIP models.Setting 0 turns the reduction off for all models. Setting 1 turns it onfor all models.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls presolve model dualization
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls whether presolve forms the dual of a continuous model.Depending on the structure of the model, solving the dual can reduceoverall solution time. The default setting uses a heuristic to decide.Setting 0 forbids presolve from forming the dual, while setting 1 forcesit to take the dual. Setting 2 employs a more expensive heuristic thatforms both the presolved primal and dual models (on two threads), andheuristically chooses one of them.
Note
Mainly affects LP, QP, and QCP models, but it is also used for theinitial root relaxation of mixed integer programs.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Format of presolved MIQCP model
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Determines the format of the presolved version of an MIQCP model. Option0 leaves the model in MIQCP form, so the branch-and-cut algorithm willoperate on a model with arbitrary quadratic constraints. Option 1 alwaystransforms the model into MISOCP form; quadratic constraints aretransformed into second-order cone constraints. Option 2 alwaystransforms the model into disaggregated MISOCP form; quadraticconstraints are transformed into rotated cone constraints, where eachrotated cone contains two terms and involves only three variables.
The default setting (-1) choose automatically. The automatic settingworks well, but there are cases where forcing a different form can bebeneficial.
Note
Only affects MIQCP models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Presolve pass limit
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
Limits the number of passes performed by presolve. The default setting(-1) chooses the number of passes automatically. You should experimentwith this parameter when you find that presolve is consuming a largefraction of total solve time.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Presolve quadratic linearization
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls presolve Q matrix linearization. Binary variables in quadraticexpressions provide some freedom to state the same expression inmultiple different ways. Options 1 and 2 of this parameter attempt tolinearize quadratic constraints or a quadratic objective, replacingquadratic terms with linear terms, using additional variables and linearconstraints. This can potentially transform an MIQP or MIQCP model intoan MILP. Option 1 focuses on producing an MILP reformulation with astrong LP relaxation, with a goal of limiting the size of the MIP searchtree. Option 2 aims for a compact reformulation, with a goal of reducingthe cost of each node. Option 0 attempts to leave Q matrices unmodified;it won’t add variables or constraints, but it may still performadjustments on quadratic objective functions to make them positivesemi-definite (PSD). The default setting (-1) chooses automatically.
Note
Only affects MIQP and MIQCP models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls the presolve level
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls the presolve level. A value of -1 corresponds to an automaticsetting. Other options are off (0), conservative (1), or aggressive (2).More aggressive application of presolve takes more time, but cansometimes lead to a significantly tighter model.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Threshold for SOS1-to-binary reformulation
Type:double
Default value:-1
Minimum value:-1
Maximum value:1e10
Controls the automatic reformulation of SOS1 constraints into binaryform. SOS1 constraints are often handled more efficiently using a binaryrepresentation. The reformulation often requiresbig-M values to beintroduced as coefficients. This parameter specifies the largestbig-M that can be introduced by presolve when performing thisreformulation. Larger values increase the chances that an SOS1constraint will be reformulated, but very large values (e.g., 1e8) canlead to numerical issues.
The default value of -1 chooses a threshold automatically. You shouldset the parameter to 0 to shut off SOS1 reformulation entirely, or alarge value to force reformulation.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Please refer tothis section formore information on SOS constraints.
Encoding used for SOS1 reformulation
Type:int
Default value:-1
Minimum value:-1
Maximum value:3
Controls the automatic reformulation of SOS1 constraints. Suchconstraints can be handled directly by the MIP branch-and-cut algorithm,but they are often handled more efficiently by reformulating them usingbinary or integer variables. There are several diffent ways to performthis reformulation; they differ in their size and strength. Smallerreformulations add fewer variables and constraints to the model.Stronger reformulations reduce the number of branch-and-cut nodesrequired to solve the resulting model.
Options 0 and 1 of this parameter encode an SOS1 constraint using aformulation whose size is linear in the number of SOS members. Option 0uses a so-called multiple choice model. It usually produces an LPrelaxation that is easier to solve. Option 1 uses an incremental model.It often gives a stronger representation, reducing the amount ofbranching required to solve harder problems.
Options 2 and 3 of this parameter encode the SOS1 using a formulation oflogarithmic size. They both only apply when all the variables in theSOS1 are non-negative. Option 3 additionally requires that the sum ofthe variables in the SOS1 is equal to 1. Logarithmic formulations areoften advantageous when the SOS1 constraint has a large number ofmembers. Option 2 focuses on a formulation whose LP relaxation is easierto solve, while option 3 has better branching behavior.
The default value of -1 chooses a reformulation for each SOS1 constraintautomatically.
Note that the reformulation of SOS1 constraints is also influenced bythePreSOS1BigM parameter. To shut off the reformulationentirely you should set that parameter to 0.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Please refer tothis section formore information on SOS constraints.
Threshold for SOS2-to-binary reformulation
Type:double
Default value:-1
Minimum value:-1
Maximum value:1e10
Controls the automatic reformulation of SOS2 constraints into binaryform. SOS2 constraints are often handled more efficiently using a binaryrepresentation. The reformulation often requiresbig-M values to beintroduced as coefficients. This parameter specifies the largestbig-M that can be introduced by presolve when performing thisreformulation. Larger values increase the chances that an SOS2constraint will be reformulated, but very large values (e.g., 1e8) canlead to numerical issues.
The default value of -1 chooses a threshold automatically. You shouldset the parameter to 0 to shut off SOS2 reformulation entirely, or alarge value to force reformulation.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Please refer tothis section formore information on SOS constraints.
Encoding used for SOS2 reformulation
Type:int
Default value:-1
Minimum value:-1
Maximum value:3
Controls the automatic reformulation of SOS2 constraints. Suchconstraints can be handled directly by the MIP branch-and-cut algorithm,but they are often handled more efficiently by reformulating them usingbinary or integer variables. There are several diffent ways to performthis reformulation; they differ in their size and strength. Smallerreformulations add fewer variables and constraints to the model.Stronger reformulations reduce the number of branch-and-cut nodesrequired to solve the resulting model.
Options 0 and 1 of this parameter encode an SOS2 constraint using aformulation whose size is linear in the number of SOS members. Option 0uses a so-called multiple choice model. It usually produces an LPrelaxation that is easier to solve. Option 1 uses an incremental model.It often gives a stronger representation, reducing the amount ofbranching required to solve harder problems.
Options 2 and 3 of this parameter encode the SOS2 using a formulation oflogarithmic size. They both only apply when all the variables in theSOS2 are non-negative. Option 3 additionally requires that the sum ofthe variables in the SOS2 is equal to 1. Logarithmic formulations areoften advantageous when the SOS2 constraint has a large number ofmembers. Option 2 focuses on a formulation whose LP relaxation is easierto solve, while option 3 has better branching behavior.
The default value of -1 chooses a reformulation for each SOS2 constraintautomatically.
Note that the reformulation of SOS2 constraints is also influenced bythePreSOS2BigM parameter. To shut off the reformulationentirely you should set that parameter to 0.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Please refer tothis section formore information on SOS constraints.
Controls the presolve sparsify reduction
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls the presolve sparsify reduction. This reduction can sometimessignificantly reduce the number of non-zero values in the presolvedmodel. Value 0 shuts off the reduction, while value 1 forces it on formixed integer programming (MIP) models and value 2 forces it on for alltypes of models, including linear programming (LP) models, and MIPrelaxations. The default value of -1 chooses automatically.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Projected implied bound cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls projected implied bound cut generation. Use 0 to disable thesecuts, 1 for moderate cut generation, or 2 for aggressive cut generation.The default -1 value chooses automatically. Overrides theCuts parameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
PSD cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls PSD cut generation. Use 0 to disable these cuts, 1 for moderatecut generation, or 2 for aggressive cut generation. The default -1 valuechooses automatically. Overrides theCuts parameter.
Note
Only affects models with nonconvex quadratic expressions in theobjective or constraints
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Positive semi-definite tolerance
Type:double
Default value:1e-6
Minimum value:0
Maximum value:Infinity
Sets a limit on the amount of diagonal perturbation that the optimizeris allowed to perform on a Q matrix in order to correct minor PSDviolations. If a larger perturbation is required, the optimizer willterminate with aQ_NOT_PSD error.
Note
Only affects QP, QCP, MIQP, and MIQCP models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Passes of the feasibility pump heuristic
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
Number of passes of the feasibility pump heuristic.
This heuristic is quite expensive, and generally produces poor qualitysolutions. You should generally only use it if other means, includingexploration of the tree with default settings, fail to produce afeasible solution.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
This parameter iscallback settable. It can be changed from within a callbackwhen thewhere value isPRESOLVED,SIMPLEX,MIP,MIPSOL,MIPNODE,BARRIER, orMULTIOBJ (see theCallback Codes section for moreinformation). How to do that for the different APIs is illustratedhere. In case of a remoteserver, the change of a parameter from within acallback may not be taken into account immediately.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Dual variables for QCP models
Type:int
Default value:0
Minimum value:0
Maximum value:1
Determines whether dual variable values are computed for QCP models.Computing them can add significant time to the optimization, so youshould only set this parameter to 1 if you need them.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls quad precision in simplex
Type:int
Default value:-1
Minimum value:-1
Maximum value:1
Enables or disables quad precision computation in simplex. The -1default setting allows the algorithm to decide. Quad precision cansometimes help solve numerically challenging models, but it can alsosignificantly increase runtime. Quad precision is only available onprocessors that support quadruple precision, e.g., common Intelprocessors. On other processors, the parameter has no effect.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Enables API call recording
Type:int
Default value:0
Minimum value:0
Maximum value:1
Enables API call recording. When enabled, Gurobi will write one or morefiles (namedgurobi000.grbr or similar) that capture the sequence ofGurobi commands that your program issued. This file can subsequently bereplayed using theGurobi command-line tool.Replaying the file will repeat the exact same sequence of commands, andwhen completed will show the time spent in Gurobi API routines, the timespent in Gurobi algorithms, and will indicate whether any Gurobienvironments or models were leaked by your program. Replay files areparticularly useful in tech support situations. They provide an easy wayto relay to Gurobi tech support the exact sequence of Gurobi commandsthat led to a question or issue.
This parameter must be set before starting anempty environment (or in agurobi.env file).All Gurobi commands will be recorded until the environment is freed orthe program ends.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Write a result file upon completion of optimization
Type:string
Default value:""
Specifies the name of the result file to be written upon completion ofoptimization. The type of the result file is determined by the filesuffix. The most commonly used suffixes are.sol (to capture thesolution vector),.bas (to capture the simplex basis), and.mst(to capture the solution vector on the integer variables). You can alsowrite a.ilp file (to capture the IIS for an infeasible model), or a.mps,.rew,.lp, or.rlp file (to capture the originalmodel), or a.dua or.dlp file (to capture the dual of a pure LPmodel). The file suffix may optionally be followed by.zip,.gz,.bz2,.7z or.xz, which produces a compressed result.
More information on the file formats can be found in theFile Format section.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Relaxation Induced Neighborhood Search (RINS) heuristic frequency
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
Frequency of the RINS heuristic. Default value (-1) choosesautomatically. A value of 0 shuts off RINS. A positive valuenapplies RINS at everyn-th node of the MIP search tree.
Increasing the frequency of the RINS heuristic shifts the focus of theMIP search away from proving optimality, and towards finding goodfeasible solutions. We recommend that you tryMIPFocus,ImproveStartGap,ImproveStartTime,ImproveStartWork, orImproveStartNodesbefore experimenting with this parameter.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Relax-and-lift cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls relax-and-lift cut generation. Use 0 to disable these cuts, 1for moderate cut generation, or 2 for aggressive cut generation. Thedefault -1 value chooses automatically. Overrides theCuts parameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
RLT cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls Relaxation Linearization Technique (RLT) cut generation. Use 0to disable these cuts, 1 for moderate cut generation, or 2 foraggressive cut generation. The default -1 value chooses automatically.Overrides theCuts parameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Model scaling
Type:int
Default value:-1
Minimum value:-1
Maximum value:3
Controls model scaling. By default, the rows and columns of the modelare scaled in order to improve the numerical properties of theconstraint matrix. The scaling is removed before the final solution isreturned. Scaling typically reduces solution times, but it may lead tolarger constraint violations in the original, unscaled model. Turningoff scaling (ScaleFlag=0) can sometimes produce smaller constraintviolations. Choosing a different scaling option can sometimes improveperformance for particularly numerically difficult models. Usinggeometric mean scaling (ScaleFlag=2) is especially well suited formodels with a wide range of coefficients in the constraint matrix rowsor columns. Settings 1 and 3 are not as directly connected to anyspecific model characteristics, so experimentation with both settingsmay be needed to assess performance impact.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Selects scenario index of multi-scenario models
Type:int
Default value:0
Minimum value:0
Maximum value:MAXINT
When working with multiple scenarios, this parameter selects the index of thescenario you want to work with. When you query or modify an attributeassociated with multiple scenarios (ScenNLB,ScenNUB,ScenNObj,ScenNRHS, etc.), theScenarioNumber parameter will determine which scenario isactually affected. The value of this parameter should be less than the valueof theNumScenarios attribute (which captures the number ofscenarios in the model).
Please refer to the discussion ofMultiple Scenarios for more information onthe use of alternative scenarios.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Random number seed
Type:int
Default value:0
Minimum value:0
Maximum value:MAXINT
Modifies the random number seed. This acts as a small perturbation tothe solver, and typically leads to different solution paths.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Client password for Remote Services cluster or token server
Type:string
Default value:""
The password for connecting to the server (either a Compute Server or atoken server).
For connecting to the Remote Services cluster referred to by theComputeServer parameter, you’ll need to supply theclient password. Refer to theGurobi Remote Services Reference Manualfor more information on starting Compute Server jobs.
Supply the token server password (if needed) when connecting to theserver referred to by theTokenServer parameter,
You must set this parameter through either agurobi.lic file (usingPASSWORD=pwd) or anempty environment.Changing the parameter after your environment has been created will haveno effect.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Network timeout
Type:int
Default value:60
Minimum value:1
Maximum value:MAXINT
Network time-out for Compute Server and token server (in seconds). Ifthe client program is unable to contact the server for more than thespecified amount of time, the client will quit with a network error.
Refer to theGurobi Remote Services Reference Manualfor more information on starting Compute Server jobs.
You must set this parameter using anempty environment. Changing the parameter afteryour environment has been created will have no effect.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Controls sifting within dual simplex
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Enables or disables sifting within dual simplex. Sifting can be usefulfor LP models where the number of variables is many times larger thanthe number of constraints (we typically only see significant benefitswhen the ratio is 100 or more). Options are Automatic (-1), Off (0),Moderate (1), and Aggressive (2). With a Moderate setting, sifting willbe applied to LP models and to the initial root relaxation for MIPmodels. With an Aggressive setting, sifting will be applied any timedual simplex is used, including at the nodes of a MIP. Note that thisparameter has no effect if you aren’t using dual simplex. Note also thatGurobi will ignore this parameter in cases where sifting is obviously aworse choice than dual simplex.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
LP method used to solve sifting sub-problems
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
LP method used to solve sifting sub-problems. Options are Automatic(-1), Primal Simplex (0), Dual Simplex (1), and Barrier (2). Note thatthis parameter only has an effect when you are using dual simplex andsifting has been selected (either automatically by dual simplex, orthrough theSifting parameter).
Changing the value of this parameter rarely produces a significantbenefit.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Simplex pricing strategy
Type:int
Default value:-1
Minimum value:-1
Maximum value:3
Determines the simplex variable pricing strategy. Available options areAutomatic (-1), Partial Pricing (0), Steepest Edge (1), Devex (2), andQuick-Start Steepest Edge (3).
Changing the value of this parameter rarely produces a significantbenefit.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Soft memory limit
Type:double
Default value:Infinity
Minimum value:0
Maximum value:Infinity
Limits the total amount of memory (in GB, i.e.,\(10^9\) bytes)available to Gurobi. If more is needed, Gurobi will terminate with aMEM_LIMIT status code.
In contrast to theMemLimit parameter, theSoftMemLimit parameter leads to a graceful exit of theoptimization, such that it is possible to retrieve solution informationafterwards or (in the case of a MIP solve) resume the optimization.
A disadvantage compared toMemLimit is that theSoftMemLimit is only checked at places where optimization canbe terminated gracefully, so memory use may exceed the limit between thesechecks.
Note that allocated memory is tracked across all models within a Gurobienvironment. If you create multiple models in one environment, theseadditional models will count towards overall memory consumption.
Memory usage is also tracked across all threads. One consequence of thisis that termination may be non-deterministic for multi-threaded runs.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
MIP solution limit
Type:int
Default value:MAXINT
Minimum value:1
Maximum value:MAXINT
Limits the number of feasible MIP solutions found. Optimization returns with aSOLUTION_LIMIT status once the limit has beenreached. To find a feasible solution quickly, Gurobi executes additionalfeasible point heuristics when the solution limit is set to exactly 1.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Solution Target for LP
Type:int
Default value:-1
Minimum value:-1
Maximum value:1
Specifies the solution target for linear programs (LP). Options areAutomatic (-1), primal and dual optimal, and basic (0), primal and dualoptimal (1).
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Location to store intermediate solution files
Type:string
Default value:""
During the MIP solution process, multiple incumbent solutions aretypically found on the path to finding a proven optimal solution.Setting this parameter to a non-empty string causes these solutions tobe written to files (in.sol format) as they arefound. The MIP solver will append_n.sol to the value of theparameter to form the name of the file that contains solution number\(n\). For example, setting the parameter to valuesolutions/mymodel will create filesmymodel_0.sol,mymodel_1.sol, etc., in directorysolutions.
Note that intermediate solutions can be retrieved as they are generatedthrough acallback (by requesting theMIPSOL_SOL in aMIPSOL callback). This parameter makes theprocess simpler.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Select a sub-optimal MIP solution
Type:int
Default value:0
Minimum value:0
Maximum value:MAXINT
When querying attributePoolNX,ObjNVal,PoolNObjVal or any of the solution pool quality attributes(e.g.,PoolNMaxVio) to retrieve information about analternate MIP solution, this parameter determines for which alternatesolution the data are retrieved. The value of this parameter should beless than the value of theSolCount attribute.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Limit MIP start sub-MIP nodes
Type:int
Default value:-1
Minimum value:-3
Maximum value:MAXINT
This parameter limits the number of branch-and-bound nodes explored whencompleting a partial MIP start. The default value of -1 uses the value of theSubMIPNodes parameter. A value of -2 means to only check fullMIP starts for feasibility and to ignore partial MIP starts. A value of -3shuts off MIP start processing entirely. Non-negative values are node limits.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Selects MIP start index
Type:int
Default value:0
Minimum value:-1
Maximum value:MAXINT
This parameter selects the index of the MIP start you want to work with. Whenyou modify a MIP start value (using theStart attribute) theStartNumber parameter will determine which MIP start isactually affected. The value of this parameter should be less than the valueof theNumStart attribute (which captures the number of MIP startsin the model).
The special value -1 is meant to append new MIP start to a model, butquerying a MIP start when StartNumber is -1 will result in an error.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Limit MIP start sub-MIP time
Type:double
Default value:Infinity
Minimum value:0
Maximum value:Infinity
This parameter limits the total time (in seconds) spent oncompleting a partial MIP start.
Note that this parameter will introduce non-determinism - different runsmay take different paths. Use theStartWorkLimitparameter for deterministic results.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Limit MIP start sub-MIP work
Type:double
Default value:Infinity
Minimum value:0
Maximum value:Infinity
This parameter limits the total work (in work units) spent oncompleting a partial MIP start.
In contrast to theStartTimeLimit, work limits aredeterministic. This means that on the same hardware and with the sameparameter and attribute settings, a work limit will stop theoptimization of a given model at the exact same point every time. Onework unit corresponds very roughly to one second on a single thread, butthis greatly depends on the hardware on which Gurobi is running and themodel that is being solved.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Strong-CG cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls Strong Chvátal-Gomory (Strong-CG) cut generation. Use 0 todisable these cuts, 1 for moderate cut generation, or 2 for aggressivecut generation. The default -1 value chooses automatically. OverridestheCuts parameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Sub-MIP cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls sub-MIP cut generation. Use 0 to disable these cuts, 1 formoderate cut generation, or 2 for aggressive cut generation. The default-1 value chooses automatically. Overrides theCutsparameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Nodes explored in sub-MIP heuristics
Type:int
Default value:500
Minimum value:0
Maximum value:MAXINT
Limits the number of nodes explored by MIP-based heuristics (such asRINS). Exploring more nodes can produce better solutions, but itgenerally takes longer.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Symmetry detection
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls symmetry detection. A value of -1 corresponds to an automaticsetting. Other options are off (0), conservative (1), or aggressive (2).
Symmetry can impact a number of different parts of the algorithm,including presolve, the MIP tree search, and the LP solution process.Default settings are quite effective, so changing the value of thisparameter rarely produces a significant benefit.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Thread limit
Type:int
Default value:0
Minimum value:0
Maximum value:1024
The ThreadLimit parameter is aconfiguration parameter foran environment which can be used to limit the number of threads used.This limit is enforced for all optimization calls based on thisenvironment. The default value of 0 implies no limit.
If a thread limit is set, trying to set theThreadsparameter above this limit will display a warning and not change thevalue of the parameter.
You must set the ThreadLimit parameter through either agurobi.envfile (usingThreadLimit=limit) or anempty environment. Changing the parameter afterthe environment has been created will result in an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Thread count
Type:int
Default value:0
Minimum value:-1
Maximum value:1024
Controls the number of threads to apply to parallel algorithms(concurrent LP, parallel barrier, parallel MIP, etc.). The default valueof 0 is an automatic setting. It will generally use as many threads asthere are virtual processors. The number of virtual processors mayexceed the number of cores due to hyperthreading or other similarhardware features.
While you will generally get the best performance by using all availablecores in your machine, there are a few exceptions. One is of course whenyou are sharing a machine with other jobs. In this case, you shouldselect a thread count that doesn’t oversubscribe the machine.
We have also found that certain classes of MIP models benefit fromreducing the thread count, often all the way down to one thread.Starting multiple threads introduces contention for machine resources.For classes of models where the first solution found by the MIP solveris almost always optimal, and that solution isn’t found at the root, itis often better to allow a single thread to explore the search treeuncontested.
Another situation where reducing the thread count can be helpful is whenmemory is tight. Each thread can consume a significant amount of memory.
We’ve made the pragmatic choice to impose a soft limit of 32 threads forthe automatic setting (0), because usually, Gurobi’s algorithms do notbenefit from higher thread counts. Actually, higher thread counts may evenhurt performance, because this will often saturate the memory system. Ifyour machine has more virtual processors, and you find that using morethreads increases performance, you should feel free to set the parameter toa larger value. Alternatively, you can use the value -1 to indicate thatGurobi should use all available virtual processors, even if the machine hasmore than 32.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Time limit
Type:double
Default value:Infinity
Minimum value:0
Maximum value:Infinity
Limits the total time expended (in seconds). Optimization returns with aTIME_LIMIT status if the limit is exceeded.
Note that optimization may not stop immediately upon hitting the timelimit. It will stop after performing the required additionalcomputations of the attributes associated with the terminatedoptimization. As a result, theRuntime attribute may belarger than the specified TimeLimit upon completion, and repeating theoptimization with a TimeLimit set to the Runtime attribute of thestopped optimization may result in additional computations and a largerattribute value.
This parameter iscallback settable. It can be changed from within a callbackwhen thewhere value isPRESOLVED,SIMPLEX,MIP,MIPSOL,MIPNODE,BARRIER, orMULTIOBJ (see theCallback Codes section for moreinformation). How to do that for the different APIs is illustratedhere. In case of a remoteserver, the change of a parameter from within acallback may not be taken into account immediately.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Name of your token server
Type:string
Default value:""
When using a token license, set this parameter to the name of the tokenserver. You can refer to the server using its name or its IP address.
You can provide a comma-separated list of token servers to increaserobustness. If the first server in the list doesn’t respond, the secondwill be tried, etc.
You must set this parameter through either agurobi.lic file (usingTOKENSERVER=server) or anempty environment.Changing the parameter after your environment has been created will haveno effect.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Port for token server
Type:int
Default value:41954
Minimum value:0
Maximum value:65536
Port to use when connecting to the Gurobi token server. You should onlychange this if your network administrator tells you to.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Comma-separated list of base parameter settings
Type:string
Default value:""
A list of parameter files (e.g.,base1.prm,base2.prm) that definesettings that should be tried first during the tuning process, in theorder they are given. Default parameter settings will also be tried, butafter the settings provided in these files. You can include an emptyparameter file in the list if you would like default settings to betried earlier.It is also possible to provide one parameterfile with several parameter settings, refer toPRM Format for more details.
Note
Command-line only (grbtune)
Enables a tuning cleanup phase
Type:double
Default value:0.0
Minimum value:0.0
Maximum value:1.0
Enables a cleanup phase at the end of tuning. The parameter indicatesthe percentage of total tuning time to devote to this phase, with a goalof reducing the number of parameter changes required to achieve the besttuning result.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Tuning criterion
Type:int
Default value:-1
Minimum value:-1
Maximum value:3
Modifies the tuning criterion for the tuning tool. The primary tuningcriterion is always to minimize the runtime required to find a provenoptimal solution. However, for MIP models that don’t solve to optimalitywithin the specified time limit, a secondary criterion is needed. Setthis parameter to 1 to use the optimality gap as the secondarycriterion. Choose a value of 2 to use the objective of the best feasiblesolution found. Choose a value of 3 to use the best objective bound.Choose 0 to ignore the secondary criterion and focus entirely onminimizing the time to find a proven optimal solution. The default valueof -1 chooses automatically.
Note that values 1 and 3 are unsupported formulti-objective problems.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Dynamic distributed tuning job count
Type:int
Default value:0
Minimum value:-1
Maximum value:MAXINT
Enables distributed parallel tuning, which can significantly increasethe performance of the tuning tool. A value ofn causes the tuningtool to use a dynamic set of up ton workers in parallel. Theseworkers are used for a limited amount of time and afterwards potentiallyreleased so that they are available for other remote jobs. A value of-1 allows the solver to use an unlimited number of workers. Notethat this parameter can be combined withTuneJobs to geta static set of workers and a dynamic set of workers for distributedtuning. You can use theWorkerPool parameter to providea distributed worker cluster.
Note that distributed tuning is most effective when the worker machineshave similar performance. Distributed tuning doesn’t attempt tonormalize performance by server, so it can incorrectly attribute a boostin performance to a parameter change when the associated setting istried on a worker that is significantly faster than the others.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Comma-separated list of base parameter settings
Type:string
Default value:""
A list of parameter files (e.g.,ignore1.prm,ignore2.prm) that definesettings that should be ignored during the tuning process. When a parametersetting is ignored, the tuning algorithm will not try that particularcombination of parameters and values. It may still try combinations ofparameters that are a subset or a superset of the specified values. You caninclude an empty parameter file in the list if you would like defaultsettings to be ignored.It is also possible to provide one parameterfile with several parameter settings, refer toPRM Format for more details.
Note
Command-line only (grbtune)
Permanent distributed tuning job count
Type:int
Default value:0
Minimum value:0
Maximum value:MAXINT
Enables distributed parallel tuning, which can significantly increasethe performance of the tuning tool. A value ofn causes the tuningtool to use a static set of up ton workers in parallel. Suchworkers are kept for the whole tuning run. Note that this parameter canbe combined withTuneDynamicJobs to get a static set ofworkers and a dynamic set of workers for distributed tuning. You can usetheWorkerPool parameter to provide a distributed workercluster.
Note that distributed tuning is most effective when the worker machineshave similar performance. Distributed tuning doesn’t attempt tonormalize performance by server, so it can incorrectly attribute a boostin performance to a parameter change when the associated setting istried on a worker that is significantly faster than the others.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Method for aggregating tuning results
Type:int
Default value:-1
Minimum value:-1
Maximum value:1
A single tuning run typically produces multiple timing results for eachcandidate parameter set, either as a result of performing multipletrials, or tuning multiple models, or both.This parameter controls how these results are aggregated into a singlemeasure. The default setting (-1) chooses the aggregation automatically;setting 0 computes the average of all individual results; setting 1takes the maximum.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Tuning output level
Type:int
Default value:2
Minimum value:0
Maximum value:3
Controls the amount of output produced by the tuning tool. Level 0produces no output; level 1 produces tuning summary output only when anew best parameter set is found; level 2 produces tuning summary outputfor each parameter set that is tried; level 3 produces tuning summaryoutput, plus detailed solver output, for each parameter set tried.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Comma-separated list of JSON files containing parameters with theirproperties the tuner should consider.
Type:string
Default value:""
A list of JSON files (e.g.,params1.json,params2.json) that defineparameters and their properties the tuner should use. If none (default) aregiven, the tuner uses a predefined list of parameters.
The JSON format is illustrated with the following example which requeststhe parametersHeuristics andNoRelHeurWorkto be considered during tuning.
{"Heuristics":{"min":0.0,"max":1.0,"weight":50,},"NoRelHeurWork":{"weight":100,"values":[100,1000,2000],"valueweights":[10,20,40]}}
All parameter properties are optional:
min Minimum value to be taken for the parameter. If not specified theminimum value of the parameter is taken.
max Maximum value to be taken for the parameter. If not specifiedthe maximum value of the parameter is taken.
weight The likelihood that parameter is selected to be changed
values A list of values the parameter can take. If not given, anyvalue within the feasible range of parameter values can be considered.
weightvalues The likelihood for each value from thevalues listto be selected. If not given, all values in thevalues list have thesame probability.
Note
Command-line only (grbtune)
Number of improved parameter sets returned
Type:int
Default value:-1
Minimum value:-2
Maximum value:MAXINT
The tuning tool often finds multiple parameter sets that improve overthe baseline settings. This parameter controls how many of these setsshould be retained when tuning is complete. A non-negative valueindicates how many sets should be retained. The default value (-1)retains the efficient frontier of parameter sets. That is, it retainsthe best set for one changed parameter, the best for two changedparameters, etc. Sets that aren’t on the efficient frontier arediscarded. If you interested in all the sets, use value -2 for theparameter.
Note that the first set in the results is always the set of parameterswhich was used for the first solve, the baseline settings. This setserves as the base for any improvement. So if you are interested in thebest tuned set of parameters you need to request at least 2 tuneresults. The first one (with index 0) will be the baseline setting andthe second one (with index 1) will be the best set found during tuning.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
A target gap to be reached
Type:double
Default value:0
Minimum value:0
Maximum value:Infinity
A target gap to be reached. As soon as the tuner has found parametersettings that allow Gurobi to reach the target gap for the givenmodel(s), it stops trying to improve parameter settings further.Instead, the tuner switches into the cleanup phase (seeTuneCleanup parameter).
This parameter only applies if no other secondary tuning criterionthan MIPGap is set, i.e.,TuneCriterion isat its default value or 1.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
A target runtime in seconds to be reached
Type:double
Default value:0.005
Minimum value:0
Maximum value:Infinity
A target runtime in seconds to be reached. As soon as the tuner hasfound parameter settings that allow Gurobi to solve the model(s) withinthe target runtime, it stops trying to improve parameter settingsfurther. Instead, the tuner switches into the cleanup phase (seeTuneCleanup parameter).
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Tuning tool time limit
Type:double
Default value:86400
Minimum value:0
Maximum value:Infinity
Limits total tuning runtime (in seconds). The default value is 86400 seconds, i.e., 24 hours.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Perform multiple runs on each parameter set to limit the effect ofrandom noise
Type:int
Default value:0
Minimum value:0
Maximum value:MAXINT
Performance on a MIP model can sometimes experience significantvariations due to random effects. As a result, the tuning tool mayreturn parameter sets that improve on the baseline only due torandomness. This parameter allows you to perform multiple solves foreach parameter set, using differentSeed values foreach, in order to reduce the influence of randomness on the results. Thedefault value of 0 indicates an automatic choice that depends on modelcharacteristics.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Use model file names as model names
Type:int
Default value:0
Minimum value:0
Maximum value:1
During tuning, each model is referred to using a name (e.g., whendisplaying progress information for that model). By default, the modelname comes from the contents of the model file. If this parameter is setto 1 before callinggrbtune, tuning will refer to a model using thename of the model file instead. This can be helpful when several modelsbeing tuned have the same (or no) names.
Note
Command-line only (grbtune)
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Changes the behavior of lazy updates
Type:int
Default value:1
Minimum value:0
Maximum value:1
Determines how newly added variables and linear constraints are handled.The default setting (1) allows you to use new variables and constraintsimmediately for building or modifying the model. A setting of 0 requiresyou to callupdate before these can be used.
Since the vast majority of programs never query Gurobi for details aboutthe optimization models they build, the default setting typicallyremoves the need to callupdate, or even be aware of the details ofourlazy update approach for handling model modifications. However,these details will show through when you try to query modified modelinformation.
In the Gurobi interface, model modifications (bound changes, right-hand sidechanges, objective changes, etc.) are placed in a queue. These queuedmodifications are applied to the model at three times: when you callupdate, when you calloptimize, or when you callwrite to writethe model to disk. When you query information about the model, the result willdepend on bothwhether that information was modified andwhen it wasmodified. In particular, no matter what setting ofUpdateModeyou use, if the modification is sitting in the queue, you’ll get the resultfrom before the modification.
To expand on this a bit, all attribute modifications are actually placedin a queue. This includes attributes that may not traditionally beviewed as being part of the model, including things like variablebranching priorities, constraint basis statuses, etc. Querying thevalues of these attributes will return their previous values ifsubsequent modifications are still in the queue.
The only potential benefit to changing the parameter to 0 is that inunusual cases this setting may allow simplex to make more aggressive useof warm-start information after a model modification.
If you want to change this parameter, you need to set it as soon as youcreate your Gurobi environment.
Note that you still need to callupdate to modify an attribute on anSOS constraint, quadratic constraint, or general constraint.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
User name for Remote Services
Type:string
Default value:""
Identify the user connecting to the Remote Services Manager.
You can provide either a username andpassword, or anaccess ID and asecret key, to authenticate yourconnection to a Cluster Manager.
You can set this parameter through either agurobi.lic file (usingUSERNAME=YOUR_USERNAME) or anempty environment. Changing the parameter afteryour environment has been started will result in an error.
Note
Cluster Manager only
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Branch variable selection strategy
Type:int
Default value:-1
Minimum value:-1
Maximum value:3
Controls the branch variable selection strategy. The default -1 settingmakes an automatic choice, depending on problem characteristics.Available alternatives are Pseudo Reduced Cost Branching (0), PseudoShadow Price Branching (1), Maximum Infeasibility Branching (2), andStrong Branching (3).
Changing the value of this parameter rarely produces a significantbenefit.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Web License Service access ID
Type:string
Default value:""
When using a WLS license, set this parameter to the access ID for yourlicense. You can retrieve this string from your account on theGurobi Web License Manager site.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Web License Service configuration
Type:string
Default value:""
When using a WLS On Demand license, this parameter can be used tospecify which configuration to use. If not specified, the configurationused will be the default configuration specified for that license.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Web License Service proxy
Type:string
Default value:""
Comma separated list of addresses of the WLS proxies to connect to.When using a WLS On Demand license, this parameter can be used tospecify the URLs to which Gurobi will connect to report usage. Thedefault value (an empty string) is equivalent tohttp://localhost:61099.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Web License Service secret
Type:string
Default value:""
When using a WLS license, set this parameter to the secret key for yourlicense. You can retrieve this string from your account on theGurobi Web License Manager site.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Web License Service token
Type:string
Default value:""
If you are using a WLS license and have retrieved your own token throughthe WLS REST API, use this parameter to pass that token to the library.If you do this, you don’t need to set any other WLS-related parameters.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Web License Service token duration
Type:int
Default value:0
Minimum value:0
Maximum value:MAXINT
When using a WLS license, this parameter can be used to adjust thelifespan (in minutes) of a token. A token enables Gurobi to run on thatclient for the life of the token. Gurobi will automatically request anew token if the current one expires, but it won’t notify the WLS serverif it completes its work before the current token expires. A shorterlifespan is better for short-lived usage. A longer lifespan is betterfor environments where the network connection to the WLS server isunreliable.
The default value of 0 means ‘automatic’, and is currently equal to 5minutes. This value may change in the future. The WLS server will capthe chosen value automatically to be at least 5 minutes and no morethan 60 minutes. This behavior may change in the future as well.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Web License Service token refresh interval
Type:double
Default value:0.9
Minimum value:0.0
Maximum value:1.0
The value specifies the fraction of the token duration after which atoken refresh is triggered. So, for example, if the token duration is 30minutes and WLSTokenRefresh is set to 0.6, the token will be refreshedevery 18 minutes. The minimum refresh interval is 4 minutes.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Distributed worker password
Type:string
Default value:""
When using a distributed algorithm (distributed MIP, distributedconcurrent, or distributed tuning), this parameter allows you to specifythe password for the distributed worker cluster provided in theWorkerPool parameter.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Distributed worker cluster (for distributed algorithms)
Type:string
Default value:""
When using a distributed algorithm (distributed MIP, distributedconcurrent, or distributed tuning), this parameter allows you to specifya Remote Services cluster that will provide distributed workers. Youshould also specify the access password for that cluster, if there isone, in theWorkerPassword parameter. Note that youdon’t need to set either of these parameters if your job is running on aCompute Server node and you want to use the same cluster for thedistributed workers.
You can provide a comma-separated list of machines for added robustness.If the first node in the list is unavailable, the client will attempt tocontact the second node, etc.
To give an example, if you have a Remote Services cluster that uses port61000 on a pair of machines namedserver1 andserver2, you couldsetWorkerPool to"server1:61000" or"server1:61000,server2:61000".
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Work limit
Type:double
Default value:Infinity
Minimum value:0
Maximum value:Infinity
Limits the total work expended (in work units). Optimization returnswith aWORK_LIMIT status if the limit is exceeded.
In contrast to theTimeLimit, work limits aredeterministic. This means that on the same hardware and with the sameparameter and attribute settings, a work limit will stop theoptimization of a given model at the exact same point every time. Onework unit corresponds very roughly to one second on a single thread, butthis greatly depends on the hardware on which Gurobi is running and themodel that is being solved.
Note that optimization may not stop immediately upon hitting the worklimit. It will stop when the optimization is next in a deterministicstate, and it will then perform the required additional computations ofthe attributes associated with the terminated optimization. As a result,theWork attribute may be larger than the specified WorkLimitupon completion, and repeating the optimization with a WorkLimit set tothe Work attribute of the stopped optimization may result in additionalcomputations and a larger attribute value.
This parameter iscallback settable. It can be changed from within a callbackwhen thewhere value isPRESOLVED,SIMPLEX,MIP,MIPSOL,MIPNODE,BARRIER, orMULTIOBJ (see theCallback Codes section for moreinformation). How to do that for the different APIs is illustratedhere. In case of a remoteserver, the change of a parameter from within acallback may not be taken into account immediately.
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Zero-half cut generation
Type:int
Default value:-1
Minimum value:-1
Maximum value:2
Controls zero-half cut generation. Use 0 to disable these cuts, 1 formoderate cut generation, or 2 for aggressive cut generation. The default-1 value chooses automatically. Overrides theCutsparameter.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Zero-objective heuristic
Type:int
Default value:-1
Minimum value:-1
Maximum value:MAXINT
Number of nodes to explore in the zero objective heuristic.
This heuristic is quite expensive, and generally produces poor qualitysolutions. You should generally only use it if other means, includingexploration of the tree with default settings, fail to produce afeasible solution.
One important note about integer-valuedparameters: while the maximum value that can be stored in a signedinteger is\(2^{31}-1\), we use a MAXINT value of 2,000,000,000.Attempting to set an integer parameter to a value larger than thismaximum will produce an error.
Note
Only affects mixed integer programming (MIP) models
For examples of how to query or modify parameter values from ourdifferent APIs, refer to ourParameter Examples.
Help and Feedback