Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
ortools.linear_solver.pywraplp.MPSolverParameters Class Reference
Inheritance diagram for ortools.linear_solver.pywraplp.MPSolverParameters:

Public Member Functions

 __init__ (self)
 
 SetDoubleParam (self, param, value)
 
 SetIntegerParam (self, param, value)
 
 GetDoubleParam (self, param)
 
 GetIntegerParam (self, param)
 

Static Public Attributes

 RELATIVE_MIP_GAP = _pywraplp.MPSolverParameters_RELATIVE_MIP_GAP
 
 PRIMAL_TOLERANCE = _pywraplp.MPSolverParameters_PRIMAL_TOLERANCE
 
 DUAL_TOLERANCE = _pywraplp.MPSolverParameters_DUAL_TOLERANCE
 
 PRESOLVE = _pywraplp.MPSolverParameters_PRESOLVE
 
 LP_ALGORITHM = _pywraplp.MPSolverParameters_LP_ALGORITHM
 
 INCREMENTALITY = _pywraplp.MPSolverParameters_INCREMENTALITY
 
 SCALING = _pywraplp.MPSolverParameters_SCALING
 
 PRESOLVE_OFF = _pywraplp.MPSolverParameters_PRESOLVE_OFF
 
 PRESOLVE_ON = _pywraplp.MPSolverParameters_PRESOLVE_ON
 
 DUAL = _pywraplp.MPSolverParameters_DUAL
 
 PRIMAL = _pywraplp.MPSolverParameters_PRIMAL
 
 BARRIER = _pywraplp.MPSolverParameters_BARRIER
 
 INCREMENTALITY_OFF = _pywraplp.MPSolverParameters_INCREMENTALITY_OFF
 
 INCREMENTALITY_ON = _pywraplp.MPSolverParameters_INCREMENTALITY_ON
 
 SCALING_OFF = _pywraplp.MPSolverParameters_SCALING_OFF
 
 SCALING_ON = _pywraplp.MPSolverParameters_SCALING_ON
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Detailed Description

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.

Definition at line 868 of file pywraplp.py.

Constructor & Destructor Documentation

◆ __init__()

ortools.linear_solver.pywraplp.MPSolverParameters.__init__ ( self)
 The constructor sets all parameters to their default value.

Definition at line 939 of file pywraplp.py.

Member Function Documentation

◆ GetDoubleParam()

ortools.linear_solver.pywraplp.MPSolverParameters.GetDoubleParam ( self,
param )
 Returns the value of a double parameter.

Definition at line 951 of file pywraplp.py.

◆ GetIntegerParam()

ortools.linear_solver.pywraplp.MPSolverParameters.GetIntegerParam ( self,
param )
 Returns the value of an integer parameter.

Definition at line 955 of file pywraplp.py.

◆ SetDoubleParam()

ortools.linear_solver.pywraplp.MPSolverParameters.SetDoubleParam ( self,
param,
value )
 Sets a double parameter to a specific value.

Definition at line 943 of file pywraplp.py.

◆ SetIntegerParam()

ortools.linear_solver.pywraplp.MPSolverParameters.SetIntegerParam ( self,
param,
value )
 Sets a integer parameter to a specific value.

Definition at line 947 of file pywraplp.py.

Member Data Documentation

◆ BARRIER

ortools.linear_solver.pywraplp.MPSolverParameters.BARRIER = _pywraplp.MPSolverParameters_BARRIER
static

Definition at line 925 of file pywraplp.py.

◆ DUAL

ortools.linear_solver.pywraplp.MPSolverParameters.DUAL = _pywraplp.MPSolverParameters_DUAL
static

Definition at line 921 of file pywraplp.py.

◆ DUAL_TOLERANCE

ortools.linear_solver.pywraplp.MPSolverParameters.DUAL_TOLERANCE = _pywraplp.MPSolverParameters_DUAL_TOLERANCE
static

Definition at line 907 of file pywraplp.py.

◆ INCREMENTALITY

ortools.linear_solver.pywraplp.MPSolverParameters.INCREMENTALITY = _pywraplp.MPSolverParameters_INCREMENTALITY
static

Definition at line 913 of file pywraplp.py.

◆ INCREMENTALITY_OFF

ortools.linear_solver.pywraplp.MPSolverParameters.INCREMENTALITY_OFF = _pywraplp.MPSolverParameters_INCREMENTALITY_OFF
static

Definition at line 927 of file pywraplp.py.

◆ INCREMENTALITY_ON

ortools.linear_solver.pywraplp.MPSolverParameters.INCREMENTALITY_ON = _pywraplp.MPSolverParameters_INCREMENTALITY_ON
static

Definition at line 929 of file pywraplp.py.

◆ LP_ALGORITHM

ortools.linear_solver.pywraplp.MPSolverParameters.LP_ALGORITHM = _pywraplp.MPSolverParameters_LP_ALGORITHM
static

Definition at line 911 of file pywraplp.py.

◆ PRESOLVE

ortools.linear_solver.pywraplp.MPSolverParameters.PRESOLVE = _pywraplp.MPSolverParameters_PRESOLVE
static

Definition at line 909 of file pywraplp.py.

◆ PRESOLVE_OFF

ortools.linear_solver.pywraplp.MPSolverParameters.PRESOLVE_OFF = _pywraplp.MPSolverParameters_PRESOLVE_OFF
static

Definition at line 917 of file pywraplp.py.

◆ PRESOLVE_ON

ortools.linear_solver.pywraplp.MPSolverParameters.PRESOLVE_ON = _pywraplp.MPSolverParameters_PRESOLVE_ON
static

Definition at line 919 of file pywraplp.py.

◆ PRIMAL

ortools.linear_solver.pywraplp.MPSolverParameters.PRIMAL = _pywraplp.MPSolverParameters_PRIMAL
static

Definition at line 923 of file pywraplp.py.

◆ PRIMAL_TOLERANCE

ortools.linear_solver.pywraplp.MPSolverParameters.PRIMAL_TOLERANCE = _pywraplp.MPSolverParameters_PRIMAL_TOLERANCE
static

Definition at line 900 of file pywraplp.py.

◆ RELATIVE_MIP_GAP

ortools.linear_solver.pywraplp.MPSolverParameters.RELATIVE_MIP_GAP = _pywraplp.MPSolverParameters_RELATIVE_MIP_GAP
static

Definition at line 898 of file pywraplp.py.

◆ SCALING

ortools.linear_solver.pywraplp.MPSolverParameters.SCALING = _pywraplp.MPSolverParameters_SCALING
static

Definition at line 915 of file pywraplp.py.

◆ SCALING_OFF

ortools.linear_solver.pywraplp.MPSolverParameters.SCALING_OFF = _pywraplp.MPSolverParameters_SCALING_OFF
static

Definition at line 934 of file pywraplp.py.

◆ SCALING_ON

ortools.linear_solver.pywraplp.MPSolverParameters.SCALING_ON = _pywraplp.MPSolverParameters_SCALING_ON
static

Definition at line 936 of file pywraplp.py.

Property Documentation

◆ thisown

ortools.linear_solver.pywraplp.MPSolverParameters.thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

Definition at line 896 of file pywraplp.py.


The documentation for this class was generated from the following file: