The dict
-like container class for adding, storing, and removing goods. This container is stored in model.goods
and can be accessed there, but should not be instantiated by user code.
Initialization Parameters
model — Helipad, required
The model object.
Methods
Click a method name for more detailed documentation.
add( name, color, endowment, … )
Registers a good that model agents can carry or trade. Agents will keep track of stocks of the good in the
dict
-likeagent.stocks
. Quantities of a good can be accessed withagent.stocks[good]
, and properties of the good with a two-argument index, e.g.agent.stocks[good, 'property']
.clear( )
Clears all added data from the container.
remove( name, fname, removeall )
Removes data stored at a certain key.
Object Properties
money — str
The good serving as a numeraire. This property is set by the
money
parameter ofGoods.add()
. The value of this property corresponds to a key of themodel.goods
property.Initial value: None
nonmonetary — dict
The subset of the
model.goods
dict, minus the money good.Initial value: {}
Static Properties
multi — bool
Whether the
dict
values should store a function, or a list of functions. This is a static property and should be changed only by subclassingfuncStore
.Initial value: False
Notes and Examples