Constraint¶
- class Constraint¶
Methods
__init__
is_satisfied
Attributes
conditional property
label property
penalty property
weight property
- __add__(self, arg: Constraint, /) ConstraintList ¶
__add__
- パラメータ:
arg (Constraint)
- 戻り値の型:
- __imul__(self, arg: float, /) Constraint ¶
__imul__
- パラメータ:
arg (float)
- 戻り値の型:
- __init__(self, left: Poly, bounds: tuple[float | None, float | None], penalty: Poly, label: str = '') None ¶
- __init__(self, left: Poly, eq: float, penalty: Poly, label: str = '') None
- __init__(self, left: Poly, le: float, penalty: Poly, label: str = '') None
- __init__(self, left: Poly, ge: float, penalty: Poly, label: str = '') None
__init__
Overload 1.
- Args:
left (amplify.Poly)
bounds (tuple[float | None, float | None])
penalty (amplify.Poly)
label (str): Defaults to
''
.
Overload 2.
- Args:
left (amplify.Poly)
eq (float)
penalty (amplify.Poly)
label (str): Defaults to
''
.
Overload 3.
- Args:
left (amplify.Poly)
le (float)
penalty (amplify.Poly)
label (str): Defaults to
''
.
Overload 4.
- Args:
left (amplify.Poly)
ge (float)
penalty (amplify.Poly)
label (str): Defaults to
''
.
- __itruediv__(self, arg: float, /) Constraint ¶
__itruediv__
- パラメータ:
arg (float)
- 戻り値の型:
- __mul__(self, arg: float, /) Constraint ¶
__mul__
- パラメータ:
arg (float)
- 戻り値の型:
- __radd__(self, arg: int, /) Constraint ¶
__radd__
- パラメータ:
arg (int)
- 戻り値の型:
- __rmul__(self, arg: float, /) Constraint ¶
__rmul__
- パラメータ:
arg (float)
- 戻り値の型:
- __truediv__(self, arg: float, /) Constraint ¶
__truediv__
- パラメータ:
arg (float)
- 戻り値の型:
- is_satisfied(self, values: Values) bool ¶
- is_satisfied( ) bool
is_satisfied
Overload 1.
- Args:
values (amplify.Values)
- Returns:
bool:
Overload 2.
- Args:
mapping (collections.abc.Mapping[amplify.Poly, float | int] | collections.abc.Mapping[amplify.Variable, float | int])
- Returns:
bool:
- property conditional¶
conditional property