
Gurobi Optimizer Reference Manual
Version 6.0, Copyright © 2014, Gurobi Optimization, Inc.

This is the reference manual for the GurobiTM Optimizer. It contains documentation for the following Gurobi language interfaces:
The Gurobi interactive shell is also documented in the Python section.
This document also includes information on our Distributed Parallel Algorithms, which allow you to use multiple machines to achieve higher performance, and on Gurobi Compute Server, which allows you to offload Gurobi computations from a set of client machines onto one or more servers.
Additional Resources
You can consult the Gurobi Quick Start for a high-level overview of the Gurobi Optimizer, or the Gurobi Example Tour for a quick tour of the examples provided with the Gurobi distribution.
Getting Help
If you have a question that is not answered in this document, you can
post it to the Gurobi Google
Group. If you have a
current maintenance contract with us, you can send your question to
support@gurobi.com
.
- C API Overview
- C API Details
- Environment Creation and Destruction
- Model Creation and Modification
- GRBloadmodel
- GRBnewmodel
- GRBcopymodel
- GRBaddconstr
- GRBaddconstrs
- GRBaddqconstr
- GRBaddqpterms
- GRBaddrangeconstr
- GRBaddrangeconstrs
- GRBaddsos
- GRBaddvar
- GRBaddvars
- GRBchgcoeffs
- GRBdelconstrs
- GRBdelq
- GRBdelqconstrs
- GRBdelsos
- GRBdelvars
- GRBsetpwlobj
- GRBupdatemodel
- GRBfreemodel
- GRBXaddconstrs
- GRBXaddrangeconstrs
- GRBXaddvars
- GRBXchgcoeffs
- GRBXloadmodel
- Model Solution
- Model Queries
- Input/Output
- Attribute Management
- GRBgetattrinfo
- GRBgetintattr
- GRBsetintattr
- GRBgetintattrelement
- GRBsetintattrelement
- GRBgetintattrarray
- GRBsetintattrarray
- GRBgetintattrlist
- GRBsetintattrlist
- GRBgetdblattr
- GRBsetdblattr
- GRBgetdblattrelement
- GRBsetdblattrelement
- GRBgetdblattrarray
- GRBsetdblattrarray
- GRBgetdblattrlist
- GRBsetdblattrlist
- GRBgetcharattrelement
- GRBsetcharattrelement
- GRBgetcharattrarray
- GRBsetcharattrarray
- GRBgetcharattrlist
- GRBsetcharattrlist
- GRBgetstrattr
- GRBsetstrattr
- GRBgetstrattrelement
- GRBsetstrattrelement
- GRBgetstrattrarray
- GRBsetstrattrarray
- GRBgetstrattrlist
- GRBsetstrattrlist
- Parameter Management and Tuning
- Monitoring Progress - Logging and Callbacks
- Modifying Solver Behavior - Callbacks
- Error Handling
- Advanced simplex routines
- C++ API Overview
- C++ API Details
- GRBEnv
- GRBModel
- GRBModel()
- GRBModel::addConstr()
- GRBModel::addConstrs()
- GRBModel::addQConstr()
- GRBModel::addRange()
- GRBModel::addRanges()
- GRBModel::addSOS()
- GRBModel::addVar()
- GRBModel::addVars()
- GRBModel::chgCoeff()
- GRBModel::chgCoeffs()
- GRBModel::computeIIS()
- GRBModel::discardConcurrentEnvs()
- GRBModel::feasRelax()
- GRBModel::fixedModel()
- GRBModel::get()
- GRBModel::getCoeff()
- GRBModel::getCol()
- GRBModel::getConcurrentEnv()
- GRBModel::getConstrByName()
- GRBModel::getConstrs()
- GRBModel::getEnv()
- GRBModel::getObjective()
- GRBModel::getPWLObj()
- GRBModel::getQConstr()
- GRBModel::getQConstrs()
- GRBModel::getRow()
- GRBModel::getSOS()
- GRBModel::getSOSs()
- GRBModel::getTuneResult()
- GRBModel::getVarByName()
- GRBModel::getVars()
- GRBModel::optimize()
- GRBModel::optimizeasync()
- GRBModel::presolve()
- GRBModel::read()
- GRBModel::remove()
- GRBModel::reset()
- GRBModel::setCallback()
- GRBModel::set()
- GRBModel::setObjective()
- GRBModel::setPWLObj()
- GRBModel::sync()
- GRBModel::terminate()
- GRBModel::tune()
- GRBModel::update()
- GRBModel::write()
- GRBVar
- GRBConstr
- GRBQConstr
- GRBSOS
- GRBExpr
- GRBLinExpr
- GRBLinExpr()
- GRBLinExpr::addTerms()
- GRBLinExpr::clear()
- GRBLinExpr::getConstant()
- GRBLinExpr::getCoeff()
- GRBLinExpr::getValue()
- GRBLinExpr::getVar()
- GRBLinExpr::operator=
- GRBLinExpr::operator+
- GRBLinExpr::operator-
- GRBLinExpr::operator+=
- GRBLinExpr::operator-=
- GRBLinExpr::operator*=
- GRBLinExpr::remove()
- GRBLinExpr::size()
- GRBQuadExpr
- GRBQuadExpr()
- GRBQuadExpr::addTerm()
- GRBQuadExpr::addTerms()
- GRBQuadExpr::clear()
- GRBQuadExpr::getCoeff()
- GRBQuadExpr::getLinExpr()
- GRBQuadExpr::getValue()
- GRBQuadExpr::getVar1()
- GRBQuadExpr::getVar2()
- GRBQuadExpr::operator=
- GRBQuadExpr::operator+
- GRBQuadExpr::operator-
- GRBQuadExpr::operator+=
- GRBQuadExpr::operator-=
- GRBQuadExpr::operator*=
- GRBQuadExpr::remove()
- GRBQuadExpr::size()
- GRBTempConstr
- GRBColumn
- GRBCallback
- GRBException
- Non-Member Functions
- Attribute Enums
- Parameter Enums
- Java API Overview
- Java API Details
- GRBEnv
- GRBModel
- GRBModel()
- GRBModel.addConstr()
- GRBModel.addConstrs()
- GRBModel.addQConstr()
- GRBModel.addRange()
- GRBModel.addRanges()
- GRBModel.addSOS()
- GRBModel.addVar()
- GRBModel.addVars()
- GRBModel.chgCoeff()
- GRBModel.chgCoeffs()
- GRBModel.computeIIS()
- GRBModel.discardConcurrentEnvs()
- GRBModel.dispose()
- GRBModel.feasRelax()
- GRBModel.fixedModel()
- GRBModel.get()
- GRBModel.getCoeff()
- GRBModel.getCol()
- GRBModel.getConcurrentEnv()
- GRBModel.getConstrByName()
- GRBModel.getConstrs()
- GRBModel.getEnv()
- GRBModel.getObjective()
- GRBModel.getPWLObj()
- GRBModel.getQConstr()
- GRBModel.getQConstrs()
- GRBModel.getRow()
- GRBModel.getSOS()
- GRBModel.getSOSs()
- GRBModel.getTuneResult()
- GRBModel.getVarByName()
- GRBModel.getVars()
- GRBModel.optimize()
- GRBModel.presolve()
- GRBModel.read()
- GRBModel.remove()
- GRBModel.reset()
- GRBModel.setCallback()
- GRBModel.set()
- GRBModel.setObjective()
- GRBModel.setPWLObj()
- GRBModel.terminate()
- GRBModel.tune()
- GRBModel.update()
- GRBModel.write()
- GRBVar
- GRBConstr
- GRBQConstr
- GRBSOS
- GRBExpr
- GRBLinExpr
- GRBQuadExpr
- GRBColumn
- GRBCallback
- GRBException
- GRB
- .NET API Overview
- .NET API Details
- GRBEnv
- GRBModel
- GRBModel()
- GRBModel.AddConstr()
- GRBModel.AddConstrs()
- GRBModel.AddQConstr()
- GRBModel.AddRange()
- GRBModel.AddRanges()
- GRBModel.AddSOS()
- GRBModel.AddVar()
- GRBModel.AddVars()
- GRBModel.ChgCoeff()
- GRBModel.ChgCoeffs()
- GRBModel.ComputeIIS()
- GRBModel.DiscardConcurrentEnvs()
- GRBModel.Dispose()
- GRBModel.FeasRelax()
- GRBModel.FixedModel()
- GRBModel.Get()
- GRBModel.GetCoeff()
- GRBModel.GetCol()
- GRBModel.GetConcurrentEnv()
- GRBModel.GetConstrByName()
- GRBModel.GetConstrs()
- GRBModel.GetEnv()
- GRBModel.GetObjective()
- GRBModel.GetPWLObj()
- GRBModel.GetQConstr()
- GRBModel.GetQConstrs()
- GRBModel.GetRow()
- GRBModel.GetSOS()
- GRBModel.GetSOSs()
- GRBModel.GetTuneResult()
- GRBModel.GetVarByName()
- GRBModel.GetVars()
- GRBModel.Optimize()
- GRBModel.Presolve()
- GRBModel.Read()
- GRBModel.Remove()
- GRBModel.Reset()
- GRBModel.SetCallback()
- GRBModel.Set()
- GRBModel.SetObjective()
- GRBModel.SetPWLObj()
- GRBModel.Terminate()
- GRBModel.Tune()
- GRBModel.Update()
- GRBModel.Write()
- GRBVar
- GRBConstr
- GRBQConstr
- GRBSOS
- GRBExpr
- GRBLinExpr
- GRBQuadExpr
- GRBTempConstr
- GRBColumn
- Overloaded Operators
- GRBCallback
- GRBException
- GRB
- Python API Overview
- Python API Details
- Global Functions
- Model
- Model()
- Model.addConstr()
- Model.addQConstr()
- Model.addRange()
- Model.addSOS()
- Model.addVar()
- Model.chgCoeff()
- Model.computeIIS()
- Model.copy()
- Model.discardConcurrentEnvs()
- Model.feasRelaxS()
- Model.feasRelax()
- Model.fixed()
- Model.getAttr()
- Model.getCoeff()
- Model.getCol()
- Model.getConcurrentEnv()
- Model.getConstrByName()
- Model.getConstrs()
- Model.getObjective()
- Model.getPWLObj()
- Model.getQConstrs()
- Model.getParamInfo()
- Model.getQCRow()
- Model.getRow()
- Model.getSOS()
- Model.getTuneResult()
- Model.getVarByName()
- Model.getVars()
- Model.message()
- Model.optimize()
- Model.presolve()
- Model.printAttr()
- Model.printQuality()
- Model.printStats()
- Model.cbCut()
- Model.cbGet()
- Model.cbGetNodeRel()
- Model.cbGetSolution()
- Model.cbLazy()
- Model.cbSetSolution()
- Model.read()
- Model.relax()
- Model.remove()
- Model.reset()
- Model.setAttr()
- Model.setObjective()
- Model.setPWLObj()
- Model.setParam()
- Model.terminate()
- Model.tune()
- Model.update()
- Model.write()
- Var
- Constr
- QConstr
- SOS
- LinExpr
- QuadExpr
- TempConstr
- Column
- Callbacks
- GurobiError
- Env
- GRB
- tuplelist
- MATLAB API Overview
- Solving models with the Gurobi MATLAB interface
- Reading and writing models with the Gurobi MATLAB interface
- Setting up the Gurobi MATLAB interface
- R API Overview
- Attributes
- Model Attributes
- NumConstrs
- NumVars
- NumSOS
- NumQConstrs
- NumNZs
- NumQNZs
- NumQCNZs
- NumIntVars
- NumBinVars
- NumPWLObjVars
- ModelName
- ModelSense
- ObjCon
- ObjVal
- ObjBound
- ObjBoundC
- MIPGap
- Runtime
- Status
- SolCount
- IterCount
- BarIterCount
- NodeCount
- IsMIP
- IsQP
- IsQCP
- IISMinimal
- MaxCoeff
- MinCoeff
- MaxBound
- MinBound
- MaxObjCoeff
- MinObjCoeff
- MaxRHS
- MinRHS
- Kappa
- KappaExact
- FarkasProof
- TuneResultCount
- Variable Attributes
- Linear Constraint Attributes
- SOS Attributes
- Quadratic Constraint Attributes
- Quality Attributes
- BoundVio
- BoundSVio
- BoundVioIndex
- BoundSVioIndex
- BoundVioSum
- BoundSVioSum
- ConstrVio
- ConstrSVio
- ConstrVioIndex
- ConstrSVioIndex
- ConstrVioSum
- ConstrSVioSum
- ConstrResidual
- ConstrSResidual
- ConstrResidualIndex
- ConstrSResidualIndex
- ConstrResidualSum
- ConstrSResidualSum
- DualVio
- DualSVio
- DualVioIndex
- DualSVioIndex
- DualVioSum
- DualSVioSum
- DualResidual
- DualSResidual
- DualResidualIndex
- DualSResidualIndex
- DualResidualSum
- DualSResidualSum
- ComplVio
- ComplVioIndex
- ComplVioSum
- IntVio
- IntVioIndex
- IntVioSum
- Attribute Examples
- Model Attributes
- Parameters
- Parameter Guidelines
- Parameter Descriptions
- AggFill
- Aggregate
- BarConvTol
- BarCorrectors
- BarHomogeneous
- BarOrder
- BarQCPConvTol
- BarIterLimit
- BranchDir
- CliqueCuts
- ConcurrentJobs
- ConcurrentMIP
- ConcurrentSettings
- CoverCuts
- Crossover
- CrossoverBasis
- Cutoff
- CutAggPasses
- CutPasses
- Cuts
- Disconnected
- DisplayInterval
- DistributedMIPJobs
- DualReductions
- FeasibilityTol
- FeasRelaxBigM
- FlowCoverCuts
- FlowPathCuts
- GomoryPasses
- GUBCoverCuts
- Heuristics
- IISMethod
- ImpliedCuts
- ImproveStartGap
- ImproveStartNodes
- ImproveStartTime
- InfUnbdInfo
- InputFile
- IntFeasTol
- IterationLimit
- LazyConstraints
- LogFile
- LogToConsole
- MarkowitzTol
- Method
- MinRelNodes
- MIPFocus
- MIPGap
- MIPGapAbs
- MIPSepCuts
- MIQCPMethod
- MIRCuts
- ModKCuts
- NetworkCuts
- NodefileDir
- NodefileStart
- NodeLimit
- NodeMethod
- NormAdjust
- NumericFocus
- ObjScale
- OptimalityTol
- OutputFlag
- PerturbValue
- PreCrush
- PreDepRow
- PreDual
- PrePasses
- PreQLinearize
- Presolve
- PreSOS1BigM
- PreSOS2BigM
- PreSparsify
- PSDTol
- PumpPasses
- QCPDual
- Quad
- ResultFile
- RINS
- ScaleFlag
- Seed
- Sifting
- SiftMethod
- SimplexPricing
- SolutionLimit
- SolutionNumber
- SubMIPCuts
- SubMIPNodes
- Symmetry
- Threads
- TimeLimit
- TuneJobs
- TuneOutput
- TuneResults
- TuneTimeLimit
- TuneTrials
- VarBranch
- WorkerPassword
- WorkerPool
- ZeroHalfCuts
- ZeroObjNodes
- Parameter Examples
- Optimization Status Codes
- Callback Codes
- Error Codes
- Model File Formats
- MPS format
- REW format
- LP format
- RLP format
- ILP format
- MST format
- ORD format
- BAS format
- SOL format
- PRM format
- Logging
- Gurobi Command-Line Tool
- Concurrent Optimizer
- Parameter Tuning Tool
- Gurobi Remote Services
- Distributed Parallel Algorithms
- Configuring a Distributed Worker Pool
- Writing Your Own Distributed Algorithms
- Distributed Algorithm Considerations
- Gurobi Compute Server