Java API Reference#
This section documents the Gurobi Java interface. This manual begins with a quick overview of the classes exposed in the interface and the most important methods on those classes. It then continues with a comprehensive presentation of all of the available classes and methods.
If you prefer Javadoc format, documentation for the Gurobi Java interface is
also available in file gurobi-javadoc.jar
. Javadoc format is particularly
helpful when used from an integrated development environment like Eclipse.
Please consult the documentation for your IDE for information on how to import
Javadoc files.
If you are new to the Gurobi Optimizer, we suggest that you start with the Getting Started Knowledge Base article for general information. This also includes Tutorials for the different Gurobi APIs. Additionally, our Example Tour provides concrete examples of how to use the classes and methods described here. We will point to sections or examples of this tour whenever it fits in this overview.
You will find instructions on how to install the Gurobi Java interface in the Gurobi Java API installation guide.
Contents
- Overview
- Environments
- Models
- Solving a Model
- Multiple Solutions, Objectives, and Scenarios
- Infeasible Models
- Querying and Modifying Attributes
- Additional Model Modification Information
- Lazy Updates
- Managing Parameters
- Memory Management
- Native Code
- Monitoring Progress - Logging and Callbacks
- Modifying Solver Behavior - Callbacks
- Batch Optimization
- Error Handling
- GRBEnv
GRBEnv
GRBEnv.GRBEnv
GRBEnv.GRBEnv
GRBEnv.GRBEnv
GRBEnv.dispose
GRBEnv.get
GRBEnv.get
GRBEnv.get
GRBEnv.getErrorMsg
GRBEnv.getParamInfo
GRBEnv.getParamInfo
GRBEnv.getParamInfo
GRBEnv.message
GRBEnv.readParams
GRBEnv.release
GRBEnv.resetParams
GRBEnv.set
GRBEnv.set
GRBEnv.set
GRBEnv.set
GRBEnv.setLogCallback
GRBEnv.start
GRBEnv.writeParams
- GRBModel
GRBModel
GRBModel.GRBModel
GRBModel.GRBModel
GRBModel.GRBModel
GRBModel.GRBModel
GRBModel.addConstr
GRBModel.addConstr
GRBModel.addConstr
GRBModel.addConstr
GRBModel.addConstr
GRBModel.addConstr
GRBModel.addConstr
GRBModel.addConstr
GRBModel.addConstrs
GRBModel.addConstrs
GRBModel.addConstrs
GRBModel.addGenConstrMax
GRBModel.addGenConstrMin
GRBModel.addGenConstrAbs
GRBModel.addGenConstrAnd
GRBModel.addGenConstrOr
GRBModel.addGenConstrNorm
GRBModel.addGenConstrNL
GRBModel.addGenConstrIndicator
GRBModel.addGenConstrPWL
GRBModel.addGenConstrPoly
GRBModel.addGenConstrExp
GRBModel.addGenConstrExpA
GRBModel.addGenConstrLog
GRBModel.addGenConstrLogA
GRBModel.addGenConstrLogistic
GRBModel.addGenConstrPow
GRBModel.addGenConstrSin
GRBModel.addGenConstrCos
GRBModel.addGenConstrTan
GRBModel.addQConstr
GRBModel.addQConstr
GRBModel.addQConstr
GRBModel.addQConstr
GRBModel.addQConstr
GRBModel.addQConstr
GRBModel.addQConstr
GRBModel.addRange
GRBModel.addRanges
GRBModel.addSOS
GRBModel.addVar
GRBModel.addVar
GRBModel.addVar
GRBModel.addVars
GRBModel.addVars
GRBModel.addVars
GRBModel.addVars
GRBModel.chgCoeff
GRBModel.chgCoeffs
GRBModel.computeIIS
GRBModel.discardConcurrentEnvs
GRBModel.discardMultiobjEnvs
GRBModel.dispose
GRBModel.feasRelax
GRBModel.feasRelax
GRBModel.fixedModel
GRBModel.convertToFixed
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.get
GRBModel.getCoeff
GRBModel.getCol
GRBModel.getConcurrentEnv
GRBModel.getConstrByName
GRBModel.getConstrs
GRBModel.getGenConstrMax
GRBModel.getGenConstrMin
GRBModel.getGenConstrAbs
GRBModel.getGenConstrAnd
GRBModel.getGenConstrOr
GRBModel.getGenConstrNorm
GRBModel.getGenConstrNL
GRBModel.getGenConstrIndicator
GRBModel.getGenConstrPWL
GRBModel.getGenConstrPoly
GRBModel.getGenConstrExp
GRBModel.getGenConstrExpA
GRBModel.getGenConstrLog
GRBModel.getGenConstrLogA
GRBModel.getGenConstrLogistic
GRBModel.getGenConstrPow
GRBModel.getGenConstrSin
GRBModel.getGenConstrCos
GRBModel.getGenConstrTan
GRBModel.getGenConstrs
GRBModel.getJSONSolution
GRBModel.getMultiobjEnv
GRBModel.getObjective
GRBModel.getObjective
GRBModel.getPWLObj
GRBModel.getQCRow
GRBModel.getQConstrs
GRBModel.getRow
GRBModel.getSOS
GRBModel.getSOSs
GRBModel.getTuneResult
GRBModel.getVarByName
GRBModel.getVars
GRBModel.optimize
GRBModel.optimizeasync
GRBModel.optimizeBatch
GRBModel.presolve
GRBModel.read
GRBModel.remove
GRBModel.remove
GRBModel.remove
GRBModel.remove
GRBModel.remove
GRBModel.reset
GRBModel.reset
GRBModel.setCallback
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.set
GRBModel.setLogCallback
GRBModel.setObjective
GRBModel.setObjective
GRBModel.setObjectiveN
GRBModel.setPWLObj
GRBModel.singleScenarioModel
GRBModel.sync
GRBModel.terminate
GRBModel.tune
GRBModel.update
GRBModel.write
- GRBVar
- GRBConstr
- GRBQConstr
- GRBSOS
- GRBGenConstr
- GRBExpr
- GRBLinExpr
GRBLinExpr
GRBLinExpr.GRBLinExpr
GRBLinExpr.GRBLinExpr
GRBLinExpr.add
GRBLinExpr.addConstant
GRBLinExpr.addTerm
GRBLinExpr.addTerms
GRBLinExpr.addTerms
GRBLinExpr.clear
GRBLinExpr.getConstant
GRBLinExpr.getCoeff
GRBLinExpr.getValue
GRBLinExpr.getVar
GRBLinExpr.multAdd
GRBLinExpr.remove
GRBLinExpr.remove
GRBLinExpr.size
- GRBQuadExpr
GRBQuadExpr
GRBQuadExpr.GRBQuadExpr
GRBQuadExpr.GRBQuadExpr
GRBQuadExpr.GRBQuadExpr
GRBQuadExpr.add
GRBQuadExpr.add
GRBQuadExpr.addConstant
GRBQuadExpr.addTerm
GRBQuadExpr.addTerm
GRBQuadExpr.addTerms
GRBQuadExpr.addTerms
GRBQuadExpr.addTerms
GRBQuadExpr.addTerms
GRBQuadExpr.clear
GRBQuadExpr.getCoeff
GRBQuadExpr.getLinExpr
GRBQuadExpr.getValue
GRBQuadExpr.getVar1
GRBQuadExpr.getVar2
GRBQuadExpr.multAdd
GRBQuadExpr.multAdd
GRBQuadExpr.remove
GRBQuadExpr.remove
GRBQuadExpr.size
- GRBColumn
- GRBCallback
GRBCallback
GRBCallback.GRBCallback
GRBCallback.abort
GRBCallback.addCut
GRBCallback.addLazy
GRBCallback.getDoubleInfo
GRBCallback.getIntInfo
GRBCallback.getNodeRel
GRBCallback.getNodeRel
GRBCallback.getNodeRel
GRBCallback.getSolution
GRBCallback.getSolution
GRBCallback.getSolution
GRBCallback.getStringInfo
GRBCallback.proceed
GRBCallback.set
GRBCallback.set
GRBCallback.set
GRBCallback.setSolution
GRBCallback.setSolution
GRBCallback.stopOneMultiObj
GRBCallback.useSolution
- GRBException
- GRBBatch
- GRB