Constraint¶

class Constraint¶

Methods

__init__

__init__

is_satisfied

is_satisfied

Attributes

conditional

conditional property

label

label property

penalty

penalty property

weight

weight property

__add__(self, arg: Constraint, /) ConstraintList¶

__add__

パラメータ:

arg (Constraint) --

戻り値の型:

ConstraintList

__eq__(self, arg: Constraint, /) bool¶

__eq__

パラメータ:

arg (Constraint) --

戻り値の型:

bool

__imul__(self, arg: float, /) Constraint¶

__imul__

パラメータ:

arg (float) --

戻り値の型:

Constraint

__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__

Overloading:

1. __init__(self, left: amplify.Poly, bounds: tuple[Optional[float], Optional[float]], penalty: amplify.Poly, label: str = '') -> None

Args:
  • left (amplify.Poly):

  • bounds (tuple[Optional[float], Optional[float]]):

  • penalty (amplify.Poly):

  • label (str): Defaults to ''.

2. __init__(self, left: amplify.Poly, eq: float, penalty: amplify.Poly, label: str = '') -> None

Args:
  • left (amplify.Poly):

  • eq (float):

  • penalty (amplify.Poly):

  • label (str): Defaults to ''.

3. __init__(self, left: amplify.Poly, le: float, penalty: amplify.Poly, label: str = '') -> None

Args:
  • left (amplify.Poly):

  • le (float):

  • penalty (amplify.Poly):

  • label (str): Defaults to ''.

4. __init__(self, left: amplify.Poly, ge: float, penalty: amplify.Poly, label: str = '') -> None

Args:
  • left (amplify.Poly):

  • ge (float):

  • penalty (amplify.Poly):

  • label (str): Defaults to ''.

__itruediv__(self, arg: float, /) Constraint¶

__itruediv__

パラメータ:

arg (float) --

戻り値の型:

Constraint

__mul__(self, arg: float, /) Constraint¶

__mul__

パラメータ:

arg (float) --

戻り値の型:

Constraint

__ne__(self, arg: Constraint, /) bool¶

__ne__

パラメータ:

arg (Constraint) --

戻り値の型:

bool

__radd__(self, arg: int, /) Constraint¶

__radd__

パラメータ:

arg (int) --

戻り値の型:

Constraint

__repr__(self) str¶

__repr__

戻り値の型:

str

__rmul__(self, arg: float, /) Constraint¶

__rmul__

パラメータ:

arg (float) --

戻り値の型:

Constraint

__str__(self) str¶

__str__

戻り値の型:

str

__truediv__(self, arg: float, /) Constraint¶

__truediv__

パラメータ:

arg (float) --

戻り値の型:

Constraint

is_satisfied(self, values: Values) bool¶
is_satisfied(self, mapping: dict[Poly, float | int]) bool

is_satisfied

Overloading:

1. is_satisfied(self, values: amplify.Values) -> bool

Args:
  • values (amplify.Values):

Returns:

bool:

2. is_satisfied(self, mapping: dict[amplify.Poly, Union[float, int]]) -> bool

Args:
  • mapping (dict[amplify.Poly, Union[float, int]]):

Returns:

bool:

property conditional¶

conditional property

戻り値の型:

tuple[Poly, str, Union[float, tuple[float, float]]]

property label¶

label property

戻り値の型:

str

property penalty¶

penalty property

戻り値の型:

Poly

property weight¶

weight property

戻り値の型:

float