126
X-Machines for Agent-Based Modeling: FLAME Perspectives
6.2 Modeling Multiple Shopper Behaviors
A simple shop/customer model can be used to depict five different kinds
of customers with different abilities, to study their behavior on the market.
The agent description is as follows:
Agent - Shops. The shop agent sets new selling price of goods and posts
to the message board. The customers would then buy these goods and,
depending on the profit made by the shop, it would either raise or reduce
the selling price in the next iteration. The shop keeps track of the income
it receives after selling goods.
Agent - Customers. There are five different kinds of customers:
• Random shoppers (Type A): This type of customer will buy from
any shop on random, without any previous knowledge.
• Customers who go to a favorite shop (Type B): These customers
depend on old values while buying from one shop. If they are satisfied from the shop, they will go to the same shops to buy, else they
choose another shop randomly.
• Customers who go to favorite shops of others (Type C): These
customers depend on messages being posted by other customers.
They then choose those shops and buy from those.
• Shoplifters (Type D): These customers are shoplifters who choose
from any one shop and shoplift products.
• Customers who only buy from cheap shops (Type E): These customers will sort the shop list to find the cheapest shops and then
buy from it.
The algorithm of the model during the simulation is:
1. Shop checks profits, sets good’s selling prices and posts message ‘open
for business’. The customers calculate their wages and add these to their
savings.
2. Customers then spend their savings, buying goods based on the shop
price, stock message, and send updated stock message to shops.
3. Shops collect profits and add income on sold goods.
Based on the model description above, functions are as follows:
Function - Shop 1:
• Check the amount of stock sold in last iteration.
• If the stock sold is more that 5, increase the selling price by a
random amount; else reduce it, check price does not go below zero.
Précédent

- 155/329

Suivant