utility_range

negmas.utilities.utility_range(ufun: negmas.utilities.UtilityFunction, issues: Optional[List[negmas.outcomes.Issue]] = None, outcomes: Optional[Collection[Union[negmas.outcomes.OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]]]] = None, infeasible_cutoff: Optional[float] = None, return_outcomes=False, max_n_outcomes=1000, ami: Optional[negmas.common.AgentMechanismInterface] = None)Union[Tuple[Union[negmas.helpers.Distribution, float], Union[negmas.helpers.Distribution, float]], Tuple[Union[negmas.helpers.Distribution, float], Union[negmas.helpers.Distribution, float], Union[negmas.outcomes.OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]], Union[negmas.outcomes.OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]]]][source]

Finds the range of the given utility function for the given outcomes

Parameters
  • ufun – The utility function

  • issues – List of issues (optional)

  • outcomes – A collection of outcomes (optional)

  • infeasible_cutoff – A value under which any utility is considered infeasible and is not used in calculation

  • return_outcomes – If true, returns an outcome with the min and another with the max utility

  • max_n_outcomes – the maximum number of outcomes to try sampling (if sampling is used and outcomes are not given)

  • ami – Optional AMI to use (if not given the internal AMI can be used)

Returns

Minumum utility, maximum utility (and if return_outcomes, an outcome at each)