8.2. Parameters

The following examples shows how to obtain parameters by five languages.

Python

# pname = param name, ptype = param type,  pval = current value, pmin = the minimum value that can be set, pmax = the maximum value that can be set, pdef = default value
pname, ptype, pval, pmin, pmax, pdef = self.m.getParamInfo('MaxTime')
pname, ptype, pval, pmin, pmax, pdef = self.m.getParamInfo('MaxTime?')

Java

// Get int param
env.get(MDO.IntParam.NumThreads);
// Get double param
model.get(MDO.DoubleParam.MaxTime);

CPP

// Get int param
env.get(MDO_IntParam_NumThreads);
// Get double param
model.get(MDO_DoubleParam_MaxTime);

C

// Get int param
int numt;
MDOgetintparam(env, "NumThreads", &numt);
// Get double param
double maxtime;
MDOgetdblparam(m, "MaxTime", &maxtime);

C#

// Get int param
env.Get(MDO.IntParam.NumThreads);
// Get double param
model.Get(MDO.DoubleParam.MaxTime);

The following examples shows how to modify parameters by five languages

Python

env.setParam("MaxTime", 10)
env.setParam("MaxTim*", 10)
env.setParam("MaxTim?", 10)

Java

// Set int param
env.set(MDO.IntParam.NumThreads, 5);
// Set double param
model.set(MDO.DoubleParam.MaxTime, 45.2);

CPP

// Set int param
env.set(MDO_IntParam_NumThreads, 5);
// Set double param
model.set(MDO_DoubleParam_MaxTime, 45.2);

C

// Set int param
MDOsetintparam(env, "NumThreads", 2);
// Set double param
MDOsetdblparam(m, "MaxTime", 34.2);

C#

// Set int param
env.Set(MDO.IntParam.NumThreads, 2);
// Set double param
model.Set(MDO.DoubleParam.MaxTime, 42.5);

8.2.1. Int parameters

Dualization

Set whether to dualize the model

EnableNetworkFlow

Set whether to enable the network simplex method

EnableStochasticLP

Set whether to detect Stochastic Linear Programming problem structure

IPM/MaxIterations

Set the maximum number of iterations in the interior point method

LogToConsole

Enables or disables console logging

MIP/AllowDualPresolve

Specify whether to enable dual presolve methods in MIP

MIP/AutoConfiguration

Specify whether to enable automatical configuration for MIP

MIP/DetectDisconnectedComponents

Specify whether to enable disconnected component strategy in MIP

MIP/EnableLazyConstr

Incorperating lazy constraints in the MILP solving process

MIP/LevelCuts

Control the level of aggression of cut module, the larger the value, the more aggressive

MIP/LevelHeurs

Control the level of aggression of heuristic module, the larger the value, the more aggressive

MIP/LevelProbing

Control the level of aggression of probing module, the larger the value, the more aggressive

MIP/LevelStrong

Control the level of aggression of strong-branching module, the larger the value, the more aggressive

MIP/LevelSubmip

Control the level of aggression of submip module, the larger the value, the more aggressive

MIP/MaxNodes

Set maximum node limit in MIP

MIP/MaxSols

Set the maximum solution limit in MIP

MIP/MaxStallingNodes

Set the maximum allowed stalling nodes

MIP/RootParallelism

Set the maximum number of concurrent threads allowed by the root node in MIP

MIP/SolutionNumber

Set the index of suboptimal solution to get

MIP/SolutionPoolSize

Set the maximum number of solutions to be stored for obtaining in MIP

Method

Set the selected optimization method

NumThreads

Set the number of threads used

NumericFocus

Set the efforts spent on detecting and handling numerical issues that may occur

OutputFlag

Enables or disables solver output

PostScaling

Set the method of post scaling used

Presolve

Set whether to enable the presolver method

SPX/ColumnGeneration

Set whether to use column generation in the simplex method

SPX/CrashStart

Set whether to use the initial basis solution generation method in the simplex method

SPX/DualPricing

Setting the dual pricing strategy in the simplex method

SPX/MaxIterations

Set the maximum number of iterations in the simplex method

SPX/PrimalPricing

Setting the primal pricing strategy in the simplex method

SolutionTarget

Set the target of solution in LP problem

8.2.1.1. Dualization

Set whether to dualize the model

  • Type: int

  • Default: -1

  • Min: -1

  • Max: 1

-1

The solver determines whether to perform dualization

0

Disables model dualization

1

Enables model dualization

8.2.1.2. EnableNetworkFlow

Set whether to enable the network simplex method

  • Type: int

  • Default: 0

  • Min: 0

  • Max: 1

0

Disables the network simplex method

1

Enables the network simplex method

8.2.1.3. EnableStochasticLP

Set whether to detect Stochastic Linear Programming problem structure

  • Type: int

  • Default: 1

  • Min: 0

  • Max: 1

0

Disables detection

1

Enables detection

8.2.1.4. IPM/MaxIterations

Set the maximum number of iterations in the interior point method

  • Type: int

  • Default: 400

  • Min: 0

  • Max: 2147483647

8.2.1.5. LogToConsole

Enables or disables console logging. Use OutputFlag to shut off all logging.

  • Type: int

  • Default: 1

  • Min: 0

  • Max: 1

0

Disables solver output to console.

1

Enables solver output to console.

8.2.1.6. MIP/AllowDualPresolve

Specify whether to enable dual presolve methods in MIP

  • Type: int

  • Default: 1

  • Min: 0

  • Max: 1

0

Disables dual presolve

1

Enables dual presolve

8.2.1.7. MIP/AutoConfiguration

Specify whether to enable automatical configuration for MIP

  • Type: int

  • Default: 1

  • Min: 0

  • Max: 1

0

Disables automatical configuration

1

Enables automatical configuration

8.2.1.8. MIP/DetectDisconnectedComponents

Specify whether to enable disconnected component strategy in MIP

  • Type: int

  • Default: 1

  • Min: 0

  • Max: 1

0

Disables disconnected component strategy

1

Enables disconnected component strategy

8.2.1.9. MIP/EnableLazyConstr

Incorperating lazy constraints in the MILP solving process. If this option is activated, lazy constraint callbacks are invoked whenever a MILP solution is found. The generated lazy constraints are used by the solver to reduce the solution space. Note that some techniques, for instance, dual presolving reductions, are disabled under this option to avoid conflict with lazy constraints

  • Type: int

  • Default: 0

  • Min: 0

  • Max: 1

0

automatic choice, disable lazy constraints

1

enable lazy constraints

8.2.1.10. MIP/LevelCuts

Control the level of aggression of cut module, the larger the value, the more aggressive.

  • Type: int

  • Default: -1

  • Min: -1

  • Max: 1

-1

Let the solver determines its value

>= 0

The level of aggression

8.2.1.11. MIP/LevelHeurs

Control the level of aggression of heuristic module, the larger the value, the more aggressive.

  • Type: int

  • Default: -1

  • Min: -1

  • Max: 2

-1

Let the solver determines its value

>= 0

The level of aggression

8.2.1.12. MIP/LevelProbing

Control the level of aggression of probing module, the larger the value, the more aggressive.

  • Type: int

  • Default: -1

  • Min: -1

  • Max: 3

-1

Let the solver determines its value

>= 0

The level of aggression

8.2.1.13. MIP/LevelStrong

Control the level of aggression of strong-branching module, the larger the value, the more aggressive.

  • Type: int

  • Default: -1

  • Min: -1

  • Max: 5

-1

Let the solver determines its value

>= 0

The level of aggression

8.2.1.14. MIP/LevelSubmip

Control the level of aggression of submip module, the larger the value, the more aggressive.

  • Type: int

  • Default: -1

  • Min: -1

  • Max: 3

-1

Let the solver determines its value

>= 0

The level of aggression

8.2.1.15. MIP/MaxNodes

Set maximum node limit in MIP

  • Type: int

  • Default: 2147483647

  • Min: 0

  • Max: 2147483647

8.2.1.16. MIP/MaxSols

Set the maximum solution limit in MIP

  • Type: int

  • Default: 2147483647

  • Min: 1

  • Max: 2147483647

8.2.1.17. MIP/MaxStallingNodes

Set the maximum allowed stalling nodes

  • Type: int

  • Default: 2147483647

  • Min: 0

  • Max: 2147483647

8.2.1.18. MIP/RootParallelism

Set the maximum number of concurrent threads allowed by the root node in MIP

  • Type: int

  • Default: 8

  • Min: 1

  • Max: 256

8.2.1.19. MIP/SolutionNumber

Set the index of suboptimal solution to get. After parameter set, access attribute Xn to retrieve corresponding suboptimal solution.

  • Type: int

  • Default: 0

  • Min: 0

  • Max: 65536

8.2.1.20. MIP/SolutionPoolSize

Set the maximum number of solutions to be stored for obtaining in MIP

  • Type: int

  • Default: 0

  • Min: 0

  • Max: 65536

8.2.1.21. Method

Set the selected optimization method

  • Type: int

  • Default: -1

  • Min: -2

  • Max: 2

-2

The multi-thread simplex method is used

-1

The solver determines the method (concurrent optimization)

0

The primal simplex method is used

1

The dual simplex method is used

2

The IPM is used

8.2.1.22. NumThreads

Set the number of threads used

  • Type: int

  • Default: 0

  • Min: 0

  • Max: 2147483647

0

The solver determines how many threads will be used.

>0

The maximum number of threads allowed

8.2.1.23. NumericFocus

Set the efforts spent on detecting and handling numerical issues that may occur when solving continuous problems.

  • Type: int

  • Default: 0

  • Min: 0

  • Max: 2

0

Automatic choice, slightly preference of speed

1

strong focus on numerical accuracy

2

mild focus on numerical accuracy

Set the efforts spent on detecting and handling numerical issues that may occur when solving mixed integer linear problems.

  • Type: int

  • Default: 0

  • Min: 0

  • Max: 3

0

Automatic choice, slightly preference of speed

1

mild focus on numerical accuracy

2

medium focus on numerical accuracy

3

strong focus on numerical accuracy

8.2.1.24. OutputFlag

Enables or disables solver output. Use LogFile and LogToConsole for finer-grain control.

  • Type: int

  • Default: 1

  • Min: 0

  • Max: 1

0

Disables solver output.

1

Enables solver output.

8.2.1.25. PostScaling

Set the method of post scaling used.

  • Type: int

  • Default: -1

  • Min: -1

  • Max: 3

-1

Let solver decides.

0

Disable scaling method.

1

The Curtis-Reid scaling method is used.

2

The Equilibration scaling method is used.

3

The Geometric scaling method is used.

8.2.1.26. Presolve

Set whether to enable the presolver method

  • Type: int

  • Default: -1

  • Min: -1

  • Max: 2

-1

The solver determines the level

0

Disables all presolve methods

1

Enables a moderate presolve method

2

Enables a strong presolve method

8.2.1.27. SPX/ColumnGeneration

Set whether to use column generation in the simplex method

  • Type: int

  • Default: -1

  • Min: -1

  • Max: 1

-1

The solver determines whether to use column generation

0

Disables column generation

1

Enables column generation

8.2.1.28. SPX/CrashStart

Set whether to use the initial basis solution generation method in the simplex method

  • Type: int

  • Default: -1

  • Min: -1

  • Max: 1

-1

The solver determines whether to use initial basic solution generation

0

Uses the fundamental initial basic solution generation

1

Uses the advanced initial basic solution generation

8.2.1.29. SPX/DualPricing

Setting the dual pricing strategy in the simplex method

  • Type: int

  • Default: -1

  • Min: -1

  • Max: 1

-1

The solver determines the strategy

0

The steepest-edge pricing strategy is used

1

The approximate steepest-edge pricing strategy is used

8.2.1.30. SPX/MaxIterations

Set the maximum number of iterations in the simplex method

  • Type: int

  • Default: 2147483647

  • Min: 0

  • Max: 2147483647

8.2.1.31. SPX/PrimalPricing

Setting the primal pricing strategy in the simplex method

  • Type: int

  • Default: -1

  • Min: -1

  • Max: 2

-1

The solver determines the strategy

0

The steepest-edge pricing strategy is used

1

The approximate steepest-edge pricing strategy is used

2

The partial pricing strategy is used

8.2.1.32. SolutionTarget

Set the target of solution in LP problem

  • Type: int

  • Default: 0

  • Min: 0

  • Max: 1

0

enable crossover (default)

1

disable crossove

8.2.2. Double parameters

IPM/DualTolerance

Set the dual relative feasibility tolerance in the interior point method

IPM/GapTolerance

Set the dual relative gap tolerance in the interior point method

IPM/PrimalTolerance

Set the primal relative feasibility tolerance in the interior point method

MIP/Cutoff

Set the objective cutoff to avoid finding solutions worse than this value in MIP

MIP/GapAbs

Set absolute gap allowed for a MIP model

MIP/GapRel

Set relative gap allowed for a MIP model

MIP/IntegerTolerance

Set the integer judgment precision in MIP solution

MIP/LinearizationBigM

Set the largest coefficient for reformulated the non-linear functions in MIP

MIP/ObjectiveTolerance

Set the objective value comparison accuracy in MIP solution

MaxTime

Set the maximum solve time

SPX/DualTolerance

Set the dual feasibility tolerance for the simplex method

SPX/PrimalTolerance

Set the primal feasibility tolerance for the simplex method

8.2.2.1. IPM/DualTolerance

Set the dual relative feasibility tolerance in the interior point method

  • Type: double

  • Default: 1e-08

  • Min: 1e-12

  • Max: 0.1

8.2.2.2. IPM/GapTolerance

Set the dual relative gap tolerance in the interior point method

  • Type: double

  • Default: 1e-08

  • Min: 1e-12

  • Max: 0.1

8.2.2.3. IPM/PrimalTolerance

Set the primal relative feasibility tolerance in the interior point method

  • Type: double

  • Default: 1e-08

  • Min: 1e-12

  • Max: 0.1

8.2.2.4. MIP/Cutoff

Set the objective cutoff to avoid finding solutions worse than this value in MIP

  • Type: double

  • Default: 1.7976931348623157e+308

  • Min: -1.7976931348623157e+308

  • Max: 1.7976931348623157e+308

8.2.2.5. MIP/GapAbs

Set absolute gap allowed for a MIP model

  • Type: double

  • Default: 1e-06

  • Min: 0.0

  • Max: 1.7976931348623157e+308

8.2.2.6. MIP/GapRel

Set relative gap allowed for a MIP model

  • Type: double

  • Default: 0.0001

  • Min: 0.0

  • Max: 1.7976931348623157e+308

8.2.2.7. MIP/IntegerTolerance

Set the integer judgment precision in MIP solution

  • Type: double

  • Default: 1e-06

  • Min: 1e-09

  • Max: 0.01

8.2.2.8. MIP/LinearizationBigM

Set the largest coefficient for reformulated the non-linear functions in MIP

  • Type: double

  • Default: 100000000.0

  • Min: 0.0

  • Max: 10000000000.0

8.2.2.9. MIP/ObjectiveTolerance

Set the objective value comparison accuracy in MIP solution

  • Type: double

  • Default: 1e-06

  • Min: 1e-09

  • Max: 0.01

8.2.2.10. MaxTime

Set the maximum solve time

  • Type: double

  • Default: 1.7976931348623157e+308

  • Min: 0.0

  • Max: 1.7976931348623157e+308

0

No solving time limit

>0

Set solving time limit in seconds

8.2.2.11. SPX/DualTolerance

Set the dual feasibility tolerance for the simplex method

  • Type: double

  • Default: 1e-06

  • Min: 1e-09

  • Max: 0.001

8.2.2.12. SPX/PrimalTolerance

Set the primal feasibility tolerance for the simplex method

  • Type: double

  • Default: 1e-06

  • Min: 1e-09

  • Max: 0.001

8.2.3. String parameters

LogFile

Determines the name of the MindOpt log file

8.2.3.1. LogFile

Determines the name of the MindOpt log file. Modifying this parameter closes the current log file and opens the specified file. Use an empty string for no log file. Use OutputFlag to shut off all logging.

  • Type: string

  • Default: ‘’