Calculates the marginal utilities of the goods in question on the basis of the entered quantities. Many utility functions, including the CES function, are such that the quantities of all goods are necessary to calculate the marginal utility of any good. Subclasses are required to implement this method.
Parameters
quantities — dict{str:num}, required
Current quantities of goods. If the utility function was registered with the same set of goods as the model (see
Goods.add()
),agent.stocks
can be passed straight into this function.
Return Value — dict{str:num}
A dict with the marginal utility for each good.
Notes and Examples