Parameters
Parameters control the operation of the Cardinal Optimizer. They can be modified before the optimization begins. Each parameter has its own dfault value and value range. Before starting the solution, user can set the parameters to different values, so as to put forward specific requirements on the solution algorithm and solution process. Obviously, the default settings can also be maintained.
According to the task performed by the solver COPT and the optimization problem solved, it can be divided into different types of parameters.
This chapter will introduce the parameters constants provided by COPT and their meanings.
Limits and tolerances
Name |
Type |
Description |
|---|---|---|
Double |
Time limit of the optimization |
|
Double |
Time limit if a primal feasible solution has been found |
|
Integer |
Node limit of the optimization |
|
Integer |
Iteration limit of barrier method |
|
Integer |
Iteration limit for the nonlinear solver |
|
Integer |
Iteration limit for solving NLP problem(s) within the MIP solver |
|
Double |
Input matrix coefficient tolerance |
|
Double |
The feasibility tolerance |
|
Double |
The tolerance for dual solutions and reduced cost |
|
Double |
The integrality tolerance for variables |
|
Double |
The PDLP tolerance. |
|
Double |
The NLP tolerance |
|
Double |
The relative gap of optimization |
|
Double |
The absolute gap of optimization |
TimeLimitDouble parameter.
Time limit of the optimization.
Default: 1e20
Minimal: 0
Maximal: 1e20
SolTimeLimitDouble parameter.
Time limit if a primal feasible solution has been found.
Default: 1e20
Minimal: 0
Maximal: 1e20
NodeLimitInteger parameter.
Node limit of the optimization.
Default: -1 (Choose automatically)
Minimal: -1 (Choose automatically)
Maximal:
INT_MAX
BarIterLimitInteger parameter.
Iteration limit of barrier method.
Default: 500
Minimal: 0
Maximal:
INT_MAX
NLPIterLimitInteger parameter.
Iteration limit for the nonlinear solver.
Default: 1e4
Minimum: 0
Maximum:
INT_MAX
MipNLPIterLimitInteger parameter.
Iteration limit for solving NLP problem(s) within the MIP solver.
Default: 100
Minimal: -1 (no limit)
Maximal:
INT_MAX
MatrixTolDouble parameter.
Input matrix coefficient tolerance.
Default: 1e-10
Minimal: 0
Maximal: 1e-7
FeasTolDouble parameter.
The feasibility tolerance.
Default: 1e-6
Minimal: 1e-9.
Maximal: 1e-4
DualTolDouble parameter.
The tolerance for dual solutions and reduced cost.
Default: 1e-6
Minimal: 1e-9
Maximal: 1e-4
IntTolDouble parameter.
The integrality tolerance for variables.
Default: 1e-6
Minimal: 1e-9
Maximal: 1e-1
PDLPTolDouble parameter.
The PDLP tolerance.
Default: 1e-6
Minimal: 1e-12
Maximal: 1e-4
NLPTolDouble parameter.
The NLP tolerance.
Default: 1e-8
Minimum: 1e-13
Maximum: 1e-3
RelGapDouble parameter.
The relative gap of optimization.
Default: 1e-4
Minimal: 0
Maximal:
DBL_MAX
AbsGapDouble parameter.
The absolute gap of optimization.
Default: 1e-6
Minimal: 0
Maximal:
DBL_MAX
Presolving and scaling
Name |
Type |
Description |
|---|---|---|
Integer |
Level of presolving before solving a model |
|
Integer |
Whether to perform scaling before solving a problem |
|
Integer |
Whether to dualize a problem before solving it |
PresolveInteger parameter.
Level of presolving before solving a model.
Default: -1
Possible values:
-1: Choose automatically.
0: Off.
1: Fast.
2: Normal.
3: Aggressive.
4: No Limitations, continues until the model cannot be modified (may be very time-consuming).
ScalingInteger parameter.
Whether to perform scaling before solving a problem.
Default: -1
Possible values:
-1: Choose automatically.
0: No scaling.
1: Apply scaling.
DualizeInteger parameter.
Whether to dualize a problem before solving it.
Default: -1
Possible values:
-1: Choose automatically.
0: No dualizing.
1: Dualizing the problem.
Other parameters
LoggingInteger parameter.
Whether to print optimization logs.
Default: 1
Possible values:
0: No optimization logs.
1: Print optimization logs.
LogLevelInteger parameter.
Controls the level of detail in the optimization logs.
Default: 2
Possible values:
2: Print basic optimization logs.
3: Print memory usage information in addition to basic optimization logs (for MIP problems).
LogToConsoleInteger parameter.
Whether to print optimization logs to console.
Default: 1
Possible values:
0: No optimization logs to console.
1: Print optimization logs to console.
Methods for accessing and setting parameters
In different programming interfaces, the ways to access and set parameters are slightly different. For details, please refer to the corresponding chapters for each programming language API:
C++ API: C++ API Reference: Parameters
C# API: C# API Reference: Parameters
Java API: Java API Reference: Parameters
Python API: Python API Reference: Parameters