ComparisonConstraint

class negmas.elicitation.ComparisonConstraint(op: Union[str, Callable[[Union[negmas.helpers.Distribution, float], Union[negmas.helpers.Distribution, float]], bool]], full_range: Union[Sequence[Tuple[float, float]], Tuple[float, float]] = (0.0, 1.0), outcomes: Optional[List[Union[negmas.outcomes.OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]]]] = None)[source]

Bases: negmas.elicitation.MarginalNeutralConstraint

Constraints the utility of given two outcomes (must be exactly two) to satisfy the given operation (e.g. >, <)

Methods Summary

is_satisfied(ufun[, outcomes])

Whether or not the constraint is satisfied.

Methods Documentation

is_satisfied(ufun: negmas.utilities.UtilityFunction, outcomes: Optional[Iterable[Union[negmas.outcomes.OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]]]] = None)bool[source]

Whether or not the constraint is satisfied.