-
Notifications
You must be signed in to change notification settings - Fork 0
Model
Mesa, an Agent-Based Modeling Framework is a powerful tool used in various industries to create simulations of real-world scenarios to predict how agents respond when placed in a specific environment bounded by rules. An agent can be represented by an individual, specific groups of people, or even organizations, that all respond differently when placed in the same environment.
One example is the boltzmann_wealth_model which illustrates using a simple example of agents exchanging wealth, how this framework functions. All agents start with the same amount of money. Every step, each agent with one unit of money or more gives one unit of wealth to another random agent. As the model runs, the distribution of wealth among agents goes from being perfectly uniform (all agents have the same starting wealth), to highly skewed -- a small number have high wealth, more have none at all.
In our context of pricing optimization, we aim to find the optimal ticket price that maximizes revenue.
-
Environment: Market for tourist attractions in Singapore
-
Agents: Visitors to these attractions, further segmented into students, adults, and seniors
-
Agents' attributes:
- Accessibility: How convenient is it for the agent to visit the attraction, in terms of their mobility
- Leisure Time: How much free time can the agent spare to visit the attraction
- Max Price: What is the maximum price the agent is willing to pay for a ticket
- Expected Satisfaction: What is the level of satisfaction an agent can expect to get if he visits the attraction
- Price Sensitivity: How influential are price changes on the agent's decision to purchase the ticket (similar to Price Elasticity of Demand)
- Word-of-mouth: How influential is word-of-mouth on the agent's decision to purchase the ticket
For each agent, we simulated their preferences using the above attributes as well as some assumptions, including but not limited to:
- Students are generally more price sensitive
- Adults are assumed to have less leisure time
- Seniors typically have a higher chance of having mobility issues
This function uses the value of each agent's attributes to determine whether the agent will purchase the ticket. This function also took into account the competitor prices, together with the agent's price sensitivity.
Additionally, this function ensures that ticket prices remain competitive in the market by considering competitor prices and adjusting accordingly to find the optimal ticket price.
Our model simulation accepts two user-defined inputs:
- Number of Visitors: This represents the anticipated total number of potential customers for the offered product/service.
- Initial Ticket Price: This allows users to define a starting point for the pricing simulation.
Execute the model using a HTTP request to the API by clicking the "Run Simulation" button.
The result is a dynamic grid model, showing the decision-making process of individual agents (representing potential customers) over several iterations (typically 10). Each iteration evaluates a different price point, with colors indicating whether agents purchase tickets at that price (green) or not (red). Hovering over grid points reveals details like the agent's purchase status.
The grid starts all red in step 0, showing no purchases initially, and gradually shows the convergence of agents' decisions over iterations.
Following the grid display is a summary of the following:
- Optimized Ticket Price
- Expected Passengers
- Expected Revenue
- Tickets Purchased Breakdown
- Tickets Not Purchased Breakdown
and a list of competitor pricing references.
To test our model, we explored various methods such as:
-
Unit Testing:
- Agent Attributes: Check that each demographic agent (adults, seniors, children) has the correct attributes initialized.
- Utility Calculation: Verify that utility calculations for each agent are accurate based on the given weights and attributes.
-
Integration Testing:
- Market Dynamics: Simulate various market conditions and check if the model reacts appropriately by adjusting ticket prices and demand. Ensure that simulated prices are reasonable.
-
Load Testing:
- Scalability: Test the model's performance under different loads (e.g., varying numbers of agents) to ensure scalability.
-
Robustness Testing:
- Edge Cases: Test the model with extreme values or edge cases for agent attributes to ensure robustness.
We used these methods to ensure that the results generated from our model is feasible and applicable for various market conditions.