Class MPSolverParameters


  • public class MPSolverParameters
    extends java.lang.Object
    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.
    • Field Detail

      • swigCMemOwn

        protected transient boolean swigCMemOwn
    • Constructor Detail

      • MPSolverParameters

        protected MPSolverParameters​(long cPtr,
                                     boolean cMemoryOwn)
      • MPSolverParameters

        public MPSolverParameters()
        The constructor sets all parameters to their default value.
    • Method Detail

      • finalize

        protected void finalize()
        Overrides:
        finalize in class java.lang.Object
      • delete

        public void delete()
      • getKDefaultRelativeMipGap

        public static double getKDefaultRelativeMipGap()
      • getKDefaultPrimalTolerance

        public static double getKDefaultPrimalTolerance()
      • getKDefaultDualTolerance

        public static double getKDefaultDualTolerance()