-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate Hotelling Law Extension into Mesa Examples #120
Merged
Merged
Changes from 27 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
1f6e5a0
Add hotelling-law project
aumashankar 6b5b412
Added team details
aumashankar 4daccfc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 486413a
changed import statements
aumashankar a68b9fb
fixing imports with ruff
aumashankar e629285
fixing recognizing hotelling_law module by tests
aumashankar 69099bf
fixing imports for recognizing hotelling_law module by tests
aumashankar 0a94531
fixing imports for recognizing hotelling_law module by tests
aumashankar 9bd62d8
fixing import sequence with ruff
aumashankar e377041
refactored code inline with other examples
aumashankar 30fe6f7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 911a63e
- fixing feedback comment
aumashankar e853d89
- fixing import
aumashankar da73a74
- processing feedback comment
aumashankar 245c763
- processing feedback comment
aumashankar bad1087
- processing feedback comments. integrating mesa3.0 experimental UI
aumashankar 887c2df
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5954403
fixing lint and import sort issues
aumashankar 8556ce4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 46cec2c
processing feedback
aumashankar e1251fe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3fafddc
Update Readme.md
aumashankar 04d3eed
adopted project structure with other examples, removed relative impor…
b8af9e2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a816a8e
Added consumer preferences, market share dynamics to have changes in …
d7d0de4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3621d06
fixing lint
04fc1d3
updated dependencies as per feedback
8e39a89
chore: fixing dependencies
532b7bb
chore: removing profile tests
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Hotelling's Law Mesa Simulation | ||
|
||
## Overview | ||
|
||
This project is an agent-based model implemented using the Mesa framework in Python. It simulates market dynamics based on Hotelling's Law, exploring the behavior of stores in a competitive market environment. Stores adjust their prices and locations if it's increases market share to maximize revenue, providing insights into the effects of competition and customer behavior on market outcomes. | ||
|
||
## Hotelling's Law | ||
|
||
Hotelling's Law is an economic theory that predicts competitors in a market will end up in a state of minimum differentiation, often referred to as the "principle of minimum differentiation" or "Hotelling's linear city model". This model explores how businesses choose their location in relation to competitors and how this affects pricing and consumer choice. | ||
|
||
## Installation | ||
|
||
To run this simulation, you will need Python 3.x and the following Python libraries: | ||
|
||
- mesa | ||
- solara | ||
- pandas | ||
- matplotlib | ||
- numpy | ||
- scipy | ||
- jupyter | ||
|
||
You can install all required libraries by running: | ||
|
||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
|
||
## Project Structure | ||
|
||
```plaintext | ||
mesa-examples/ | ||
└── examples/ | ||
└── hotelling_law/ | ||
├── hotelling_law/ | ||
│ ├── __init__.py | ||
│ ├── model.py | ||
│ └── agents.py | ||
├── __init__.py | ||
├── app.py | ||
├── cprofile_test.py | ||
├── Readme.md | ||
├── requirements.txt | ||
└── tests.py | ||
``` | ||
|
||
## Running the Simulation | ||
|
||
To start the simulation, navigate to the project directory and execute the following command: | ||
|
||
```bash | ||
solara run app.py | ||
``` | ||
|
||
# Project Details | ||
|
||
### Professor: [Vipin P. Veetil](https://www.vipinveetil.com/) | ||
### Indian Institute of Management, Kozhikode | ||
|
||
### Project by | ||
|
||
| Group 8 | | | | ||
|-|---------------------------|---------------| | ||
| Name | Email Id | Roll No | | ||
| Amrita Tripathy | amrita15d@iimk.edu.in | EPGP-15D-010 | | ||
| Anirban Mondal | anirban15e@iimk.edu.in | EPGP-15E-006 | | ||
| Namita Das | namita15d@iimk.edu.in | EPGP-15D-046 | | ||
| Sandeep Shenoy | sandeep15c@iimk.edu.in | EPGP-15C-076 | | ||
| Sanjeeb Kumar Dhinda | sanjeeb15d@iimk.edu.in | EPGP-15D-074 | | ||
| Umashankar Ankuri | umashankar15d@iimk.edu.in | EPGP-15D-096 | | ||
| Vinayak Nair | vinayak15d@iimk.edu.in | EPGP-15D-102 | | ||
| Wayne Joseph Unger | wayne15d@iimk.edu.in | EPGP-15D-104 | | ||
|
||
|
||
### Hotelling Law Simulation - Visualization | ||
![plot](hotelling_law_sim.png) |
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jupyter
is not needed. Everything else is auto-installed when installingmesa
, except forscipy
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated requirements.txt and Readme.md
Thanks a lot for the review @rht