Parameters
Introduces parameters as a means to control optimizers in the Java API.
Parameters are manipulated by means of IloCplex.setParam.
For example:
cplex.setParam(IloCplex.BooleanParam.PreInd, false);
sets the Boolean parameter PreInd to false,
instructing CPLEX not to apply presolve before solving the problem.
Integer parameters often indicate a choice from a numbered
list of possibilities, rather than a quantity. For example, the class
IloCplex.PrimalPricing defines
constants with the integer parameters shown in Table 1 for
better maintainability of the code.| Integer Parameter | Constant in class IloCplex.PrimalPricing |
|---|---|
0 |
IloCplex.PrimalPricing.Auto |
1 |
IloCplex.PrimalPricing.Devex |
2 |
IloCplex.PrimalPricing.Steep |
3 |
IloCplex.PrimalPricing.SteepQStart |
4 |
IloCplex.PrimalPricing.Full |
Thus, the suggested method for setting steepest-edge pricing for use with the primal simplex algorithm looks like this:
cplex.setParam(IloCplex.IntParam.PPriInd,
IloCplex.PrimalPricing.Steep);
Table 2 gives
an overview of the classes defining constants for parameters.
| Class | For use with parameters: |
|---|---|
IloCplex.Algorithm |
IloCplex.IntParam.RootAlg IloCplex.IntParam.NodeAlg |
IloCplex.MIPEmphasis |
IloCplex.IntParam.MIPEmphasis |
IloCplex.VariableSelect |
IloCplex.IntParam.VarSel |
IloCplex.NodeSelect |
IloCplex.IntParam.NodeSel |
IloCplex.DualPricing |
IloCplex.IntParam.DPriInd |
IloCplex.PrimalPricing |
IloCplex.IntParam.PPriInd |
Parameters can be queried with method IloCplex.getParam and
reset to their default settings with method IloCplex.setDefaults.
The minimum and maximum value to which an integer or double parameter
can be set is queried with methods IloCplex.getMin and IloCplex.getMax,
respectively. The default value of a parameter is obtained with IloCplex.getDefault .