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

Table 18 Limits and tolerances parameters

Name

Type

Description

TimeLimit

Double

Time limit of the optimization

SolTimeLimit

Double

Time limit if a primal feasible solution has been found

NodeLimit

Integer

Node limit of the optimization

BarIterLimit

Integer

Iteration limit of barrier method

NLPIterLimit

Integer

Iteration limit for the nonlinear solver

MipNLPIterLimit

Integer

Iteration limit for solving NLP problem(s) within the MIP solver

MatrixTol

Double

Input matrix coefficient tolerance

FeasTol

Double

The feasibility tolerance

DualTol

Double

The tolerance for dual solutions and reduced cost

IntTol

Double

The integrality tolerance for variables

PDLPTol

Double

The PDLP tolerance.

NLPTol

Double

The NLP tolerance

RelGap

Double

The relative gap of optimization

AbsGap

Double

The absolute gap of optimization

  • TimeLimit

    Double parameter.

    Time limit of the optimization.

    Default: 1e20

    Minimal: 0

    Maximal: 1e20

  • SolTimeLimit

    Double parameter.

    Time limit if a primal feasible solution has been found.

    Default: 1e20

    Minimal: 0

    Maximal: 1e20

  • NodeLimit

    Integer parameter.

    Node limit of the optimization.

    Default: -1 (Choose automatically)

    Minimal: -1 (Choose automatically)

    Maximal: INT_MAX

  • BarIterLimit

    Integer parameter.

    Iteration limit of barrier method.

    Default: 500

    Minimal: 0

    Maximal: INT_MAX

  • NLPIterLimit

    Integer parameter.

    Iteration limit for the nonlinear solver.

    Default: 1e4

    Minimum: 0

    Maximum: INT_MAX

  • MipNLPIterLimit

    Integer parameter.

    Iteration limit for solving NLP problem(s) within the MIP solver.

    Default: 100

    Minimal: -1 (no limit)

    Maximal: INT_MAX

  • MatrixTol

    Double parameter.

    Input matrix coefficient tolerance.

    Default: 1e-10

    Minimal: 0

    Maximal: 1e-7

  • FeasTol

    Double parameter.

    The feasibility tolerance.

    Default: 1e-6

    Minimal: 1e-9.

    Maximal: 1e-4

  • DualTol

    Double parameter.

    The tolerance for dual solutions and reduced cost.

    Default: 1e-6

    Minimal: 1e-9

    Maximal: 1e-4

  • IntTol

    Double parameter.

    The integrality tolerance for variables.

    Default: 1e-6

    Minimal: 1e-9

    Maximal: 1e-1

  • PDLPTol

    Double parameter.

    The PDLP tolerance.

    Default: 1e-6

    Minimal: 1e-12

    Maximal: 1e-4

  • NLPTol

    Double parameter.

    The NLP tolerance.

    Default: 1e-8

    Minimum: 1e-13

    Maximum: 1e-3

  • RelGap

    Double parameter.

    The relative gap of optimization.

    Default: 1e-4

    Minimal: 0

    Maximal: DBL_MAX

  • AbsGap

    Double parameter.

    The absolute gap of optimization.

    Default: 1e-6

    Minimal: 0

    Maximal: DBL_MAX

Presolving and scaling

Table 19 Presolving and scaling parameters

Name

Type

Description

Presolve

Integer

Level of presolving before solving a model

Scaling

Integer

Whether to perform scaling before solving a problem

Dualize

Integer

Whether to dualize a problem before solving it

  • Presolve

    Integer 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).

  • Scaling

    Integer parameter.

    Whether to perform scaling before solving a problem.

    Default: -1

    Possible values:

    -1: Choose automatically.

    0: No scaling.

    1: Apply scaling.

  • Dualize

    Integer 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

  • Logging

    Integer parameter.

    Whether to print optimization logs.

    Default: 1

    Possible values:

    0: No optimization logs.

    1: Print optimization logs.

  • LogLevel

    Integer 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).

  • LogToConsole

    Integer 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: