aea.helpers.preference_
representations.base
Preference representation helpers.
logarithmic_
utility
def logarithmic_utility(utility_params_by_good_id: Dict[str, float],
quantities_by_good_id: Dict[str, int],
quantity_shift: int = 100) -> float
Compute agent's utility given her utility function params and a good bundle.
Arguments:
utility_params_by_good_id
: utility params by good identifierquantities_by_good_id
: quantities by good identifierquantity_shift
: a non-negative factor to shift the quantities in the utility function (to ensure the natural logarithm can be used on the entire range of quantities)
Returns:
utility value
linear_
utility
def linear_utility(exchange_params_by_currency_id: Dict[str, float],
balance_by_currency_id: Dict[str, int]) -> float
Compute agent's utility given her utility function params and a good bundle.
Arguments:
exchange_params_by_currency_id
: exchange params by currencybalance_by_currency_id
: balance by currency
Returns:
utility value