Items

Item Base Class

class econsimulacra.items.base.Item(item_id, item_name, config=None)[source]

Bases: object

Item class. Generated by the environment.

See also

econsimulacra.envs.base.Environment._generate_items

Parameters:
get_price()[source]

Get the price of the item.

Returns:

The price of the item.

Return type:

float

set_price(price, set_by=None)[source]

Set the price of the item.

Parameters:
  • price (float) – The new price of the item.

  • set_by (int, optional) – The agent id who set the price. Defaults to None.

Return type:

None