![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Data structures for linear and quadratic constraints. In contrast to BoundedLinearExpression and related structures, there is no offset inside the inequality. This is not part of the MathOpt public API, do not depend on it externally.
Classes | |
class | NormalizedLinearInequality |
class | NormalizedQuadraticInequality |
Functions | |
TypeError | _bool_error () |
NormalizedLinearInequality | _normalize_bounded_linear_expression (variables.BoundedLinearTypes bounded_expr) |
NormalizedLinearInequality | as_normalized_linear_inequality (Optional[Union[bool, variables.BoundedLinearTypes]] bounded_expr=None, *, Optional[float] lb=None, Optional[float] ub=None, Optional[variables.LinearTypes] expr=None) |
NormalizedQuadraticInequality | _normalize_bounded_quadratic_expression (Union[variables.BoundedQuadraticTypes, variables.BoundedLinearTypes] bounded_expr) |
NormalizedQuadraticInequality | as_normalized_quadratic_inequality (Optional[Union[bool, variables.BoundedLinearTypes, variables.BoundedQuadraticTypes]] bounded_expr=None, *, Optional[float] lb=None, Optional[float] ub=None, Optional[variables.QuadraticTypes] expr=None) |
Variables | |
tuple | _BoundedLinearExpressions |
tuple | _BoundedQuadraticExpressions |
tuple | _BoundedExpressions |
|
protected |
Definition at line 51 of file normalized_inequality.py.
|
protected |
Converts a bounded linear expression into a NormalizedLinearInequality.
Definition at line 96 of file normalized_inequality.py.
|
protected |
Converts a bounded quadratic expression into a NormalizedQuadraticInequality.
Definition at line 210 of file normalized_inequality.py.
NormalizedLinearInequality ortools.math_opt.python.normalized_inequality.as_normalized_linear_inequality | ( | Optional[Union[bool, variables.BoundedLinearTypes]] | bounded_expr = None, |
* | , | ||
Optional[float] | lb = None, | ||
Optional[float] | ub = None, | ||
Optional[variables.LinearTypes] | expr = None ) |
Builds a NormalizedLinearInequality. If bounded_expr is not None, then all other arguments must be None. If expr has a nonzero offset, it will be subtracted from both lb and ub. When bounded_expr is unset and a named argument is unset, we use the defaults: * lb: -math.inf * ub: math.inf * expr: 0 Args: bounded_expr: a linear inequality describing the constraint. lb: The lower bound when bounded_expr is None. ub: The upper bound if bounded_expr is None. expr: The expression when bounded_expr is None. Returns: A NormalizedLinearInequality representing the linear constraint.
Definition at line 125 of file normalized_inequality.py.
NormalizedQuadraticInequality ortools.math_opt.python.normalized_inequality.as_normalized_quadratic_inequality | ( | Optional[ Union[bool, variables.BoundedLinearTypes, variables.BoundedQuadraticTypes] ] | bounded_expr = None, |
* | , | ||
Optional[float] | lb = None, | ||
Optional[float] | ub = None, | ||
Optional[variables.QuadraticTypes] | expr = None ) |
Builds a NormalizedLinearInequality. If bounded_expr is not None, then all other arguments must be None. If expr has a nonzero offset, it will be subtracted from both lb and ub. When bounded_expr is unset and a named argument is unset, we use the defaults: * lb: -math.inf * ub: math.inf * expr: 0 Args: bounded_expr: a quadratic inequality describing the constraint. lb: The lower bound when bounded_expr is None. ub: The upper bound if bounded_expr is None. expr: The expression when bounded_expr is None. Returns: A NormalizedLinearInequality representing the linear constraint.
Definition at line 242 of file normalized_inequality.py.
|
protected |
Definition at line 44 of file normalized_inequality.py.
|
protected |
Definition at line 29 of file normalized_inequality.py.
|
protected |
Definition at line 35 of file normalized_inequality.py.