Reference 〉 Class
funcStore

Goods(modelHelipad)

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-like agent.stocks. Quantities of a good can be accessed with agent.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 of Goods.add(). The value of this property corresponds to a key of the model.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 subclassing funcStore.

    Initial value: False

Notes and Examples

  1. Contribute a Note

    Your email address will not be published. Required fields are marked *

    You may use limited HTML for formatting. Please embed blocks of code in <pre><code> </code></pre> tags.

History