Sets self.utility
to the value returned from self.calculate()
. The model.stocks
dict can be passed directly to this function.
Parameters
quantities — dict{str:num}, required
The quantities of the goods to be consumed. If the utility function was registered with the same set of goods as the model (see
model.addGood()
),agent.goods
can be passed straight into this function.
Return Value — num
The utility gained from consuming the quantities in question.
Notes and Examples