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

Public Member Functions

 __init__ (self, *args, **kwargs)
 
 name (self)
 
 SetInteger (self, integer)
 
 integer (self)
 
 solution_value (self)
 
 index (self)
 
 lb (self)
 
 ub (self)
 
 SetBounds (self, lb, ub)
 
 reduced_cost (self)
 
 basis_status (self)
 
 branching_priority (self)
 
 SetBranchingPriority (self, priority)
 
 __str__ (self)
 
 __repr__ (self)
 
 __getattr__ (self, name)
 
 SolutionValue (self)
 
 Integer (self)
 
 Lb (self)
 
 Ub (self)
 
 SetLb (self, x)
 
 SetUb (self, x)
 
 ReducedCost (self)
 

Properties

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

Detailed Description

 The class for variables of a Mathematical Programming (MP) model.

Definition at line 647 of file pywraplp.py.

Constructor & Destructor Documentation

◆ __init__()

ortools.linear_solver.pywraplp.Variable.__init__ ( self,
* args,
** kwargs )

Definition at line 652 of file pywraplp.py.

Member Function Documentation

◆ __getattr__()

ortools.linear_solver.pywraplp.Variable.__getattr__ ( self,
name )

Definition at line 731 of file pywraplp.py.

◆ __repr__()

ortools.linear_solver.pywraplp.Variable.__repr__ ( self)

Definition at line 728 of file pywraplp.py.

◆ __str__()

ortools.linear_solver.pywraplp.Variable.__str__ ( self)

Definition at line 725 of file pywraplp.py.

◆ basis_status()

ortools.linear_solver.pywraplp.Variable.basis_status ( self)
    Advanced usage: returns the basis status of the variable in the current
    solution (only available for continuous problems).

    See also: MPSolver::BasisStatus.

Definition at line 700 of file pywraplp.py.

◆ branching_priority()

ortools.linear_solver.pywraplp.Variable.branching_priority ( self)
    Advanced usage: Certain MIP solvers (e.g. Gurobi or SCIP) allow you to set
    a per-variable priority for determining which variable to branch on.

    A value of 0 is treated as default, and is equivalent to not setting the
    branching priority. The solver looks first to branch on fractional
    variables in higher priority levels. As of 2019-05, only Gurobi and SCIP
    support setting branching priority; all other solvers will simply ignore
    this annotation.

Definition at line 709 of file pywraplp.py.

◆ index()

ortools.linear_solver.pywraplp.Variable.index ( self)
 Returns the index of the variable in the MPSolver::variables_.

Definition at line 677 of file pywraplp.py.

◆ Integer()

ortools.linear_solver.pywraplp.Variable.Integer ( self)

Definition at line 738 of file pywraplp.py.

◆ integer()

ortools.linear_solver.pywraplp.Variable.integer ( self)
 Returns the integrality requirement of the variable.

Definition at line 663 of file pywraplp.py.

◆ Lb()

ortools.linear_solver.pywraplp.Variable.Lb ( self)

Definition at line 741 of file pywraplp.py.

◆ lb()

ortools.linear_solver.pywraplp.Variable.lb ( self)
 Returns the lower bound.

Definition at line 681 of file pywraplp.py.

◆ name()

ortools.linear_solver.pywraplp.Variable.name ( self)
 Returns the name of the variable.

Definition at line 655 of file pywraplp.py.

◆ reduced_cost()

ortools.linear_solver.pywraplp.Variable.reduced_cost ( self)
    Advanced usage: returns the reduced cost of the variable in the current
    solution (only available for continuous problems).

Definition at line 693 of file pywraplp.py.

◆ ReducedCost()

ortools.linear_solver.pywraplp.Variable.ReducedCost ( self)

Definition at line 753 of file pywraplp.py.

◆ SetBounds()

ortools.linear_solver.pywraplp.Variable.SetBounds ( self,
lb,
ub )
 Sets both the lower and upper bounds.

Definition at line 689 of file pywraplp.py.

◆ SetBranchingPriority()

ortools.linear_solver.pywraplp.Variable.SetBranchingPriority ( self,
priority )

Definition at line 722 of file pywraplp.py.

◆ SetInteger()

ortools.linear_solver.pywraplp.Variable.SetInteger ( self,
integer )
 Sets the integrality requirement of the variable.

Definition at line 659 of file pywraplp.py.

◆ SetLb()

ortools.linear_solver.pywraplp.Variable.SetLb ( self,
x )

Definition at line 747 of file pywraplp.py.

◆ SetUb()

ortools.linear_solver.pywraplp.Variable.SetUb ( self,
x )

Definition at line 750 of file pywraplp.py.

◆ solution_value()

ortools.linear_solver.pywraplp.Variable.solution_value ( self)
    Returns the value of the variable in the current solution.

    If the variable is integer, then the value will always be an integer (the
    underlying solver handles floating-point values only, but this function
    automatically rounds it to the nearest integer; see: man 3 round).

Definition at line 667 of file pywraplp.py.

◆ SolutionValue()

ortools.linear_solver.pywraplp.Variable.SolutionValue ( self)

Definition at line 735 of file pywraplp.py.

◆ Ub()

ortools.linear_solver.pywraplp.Variable.Ub ( self)

Definition at line 744 of file pywraplp.py.

◆ ub()

ortools.linear_solver.pywraplp.Variable.ub ( self)
 Returns the upper bound.

Definition at line 685 of file pywraplp.py.

Property Documentation

◆ thisown

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

Definition at line 650 of file pywraplp.py.


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