8.2. Parameters¶
The following examples shows how to obtain parameters by four 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.set(MDO.IntParam.NumThreads, 5); // 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); The following examples shows how to modify parameters by four languages Pythonenv.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 double maxtime; MDOsetdblparam(m, “MaxTime”, 34.2);
8.2.1. Int parameters¶
Set whether to dualize the model
Set whether to enable the network simplex method
Set whether to detect Stochastic Linear Programming problem structure
Set the maximum number of iterations in the interior point method
Specify whether to enable dual presolve methods in MIP
Specify whether to enable automatical configuration for MIP
Specify whether to enable disconnected component strategy in MIP
Set maximum node limit in MIP
Set the maximum solution limit in MIP
Set the maximum allowed stalling nodes
Set the maximum number of concurrent threads allowed by the root node in MIP
Set the maximum number of solutions to be stored for obtaining in MIP
Set the selected optimization method
Set the number of threads used
Set whether to enable the presolver method
Set whether to use column generation in the simplex method
Set whether to use the initial basis solution generation method in the simplex method
Setting the dual pricing strategy in the simplex method
Set the maximum number of iterations in the simplex method
Setting the primal pricing strategy in the simplex method
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: 0
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. 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.6. 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.7. 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.8. MIP/MaxNodes¶
Set maximum node limit in MIP
Type: int
Default: 2147483647
Min: 0
Max: 2147483647
8.2.1.9. MIP/MaxSols¶
Set the maximum solution limit in MIP
Type: int
Default: 2147483647
Min: 1
Max: 2147483647
8.2.1.10. MIP/MaxStallingNodes¶
Set the maximum allowed stalling nodes
Type: int
Default: 2147483647
Min: 0
Max: 2147483647
8.2.1.11. 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.12. 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.13. Method¶
Set the selected optimization method
Type: int
Default: -1
Min: -2
Max: 2
-2
The multi-thread simplex method is used
-1
he 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.14. NumThreads¶
Set the number of threads used
Type: int
Default: 0
Min: 0
Max: 2147483647
0
All cores of physical CPUs
>0
The maximum number of threads allowed
8.2.1.15. 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.16. 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.17. 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.18. 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.19. SPX/MaxIterations¶
Set the maximum number of iterations in the simplex method
Type: int
Default: 2147483647
Min: 0
Max: 2147483647
8.2.1.20. 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.21. 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¶
Set the dual relative feasibility tolerance in the interior point method
Sets the dual relative gap tolerance in the interior point method
Set the primal relative feasibility tolerance in the interior point method
Set the objective cutoff to avoid finding solutions worse than this value in MIP
Set absolute gap allowed for a MIP model
Set relative gap allowed for a MIP model
Set the integer judgment precision in MIP solution
Set the largest coefficient for reformulated the non-linear functions in MIP
Set the objective value comparison accuracy in MIP solution
Set the maximum solve time
Set the dual feasibility tolerance for the simplex method
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¶
Sets 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