C++ Reference: class MPSolverParameters

This documentation is automatically generated.



This class stores parameter settings for LP and MIP solvers. Some parameters are marked as advanced: do not change their values unless you know what you are doing!

For developers: how to add a new parameter:
   - Add the new Foo parameter in the DoubleParam or IntegerParam enum.
   - If it is a categorical param, add a FooValues enum.
   - Decide if the wrapper should define a default value for it: yes if it controls the properties of the solution (example: tolerances) or if it consistently improves performance, no otherwise. If yes, define kDefaultFoo.
   - Add a foo_value_ member and, if no default value is defined, a foo_is_default_ member.
   - Add code to handle Foo in Set...Param, Reset...Param, Get...Param, Reset and the constructor.
   - In class MPSolverInterface, add a virtual method SetFoo, add it to SetCommonParameters or SetMIPParameters, and implement it for each solver. Sometimes, parameters need to be implemented differently, see for example the INCREMENTALITY implementation.
   - Add a test in linear_solver_test.cc.


TODO(user): store the parameter values in a protocol buffer instead. We need to figure out how to deal with the subtleties of the default values.

Method
GetDoubleParam

Return type: double

Arguments: MPSolverParameters::DoubleParam param

Returns the value of a double parameter.

GetIntegerParam

Return type: int

Arguments: MPSolverParameters::IntegerParam param

Returns the value of an integer parameter.

MPSolverParameters

The constructor sets all parameters to their default value.

Reset

Return type: void

Sets all parameters to their default value.

ResetDoubleParam

Return type: void

Arguments: MPSolverParameters::DoubleParam param

Sets a double parameter to its default value (default value defined in MPSolverParameters if it exists, otherwise the default value defined in the underlying solver).

ResetIntegerParam

Return type: void

Arguments: MPSolverParameters::IntegerParam param

Sets an integer parameter to its default value (default value defined in MPSolverParameters if it exists, otherwise the default value defined in the underlying solver).

SetDoubleParam

Return type: void

Arguments: MPSolverParameters::DoubleParam param, double value

Sets a double parameter to a specific value.

SetIntegerParam

Return type: void

Arguments: MPSolverParameters::IntegerParam param, int value

Sets a integer parameter to a specific value.