Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Hotelling Law example (projectmesa#120)
* Add hotelling-law project * Added team details * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * changed import statements * fixing imports with ruff * fixing recognizing hotelling_law module by tests * fixing imports for recognizing hotelling_law module by tests * fixing imports for recognizing hotelling_law module by tests * fixing import sequence with ruff * refactored code inline with other examples -fixing review comments 1. The self.can_move check is redundant here, because it's already done in self.move 2. model.agents is the new API, and is simpler. 3. The whole function can be simplified to return np.mean(model.agents.get("price")). 4. The intermediate variables are not necessary, because the docstring is already sufficiently descriptive. 5. added tests for slope * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * - fixing feedback comment * - fixing import * - processing feedback comment * - processing feedback comment * - processing feedback comments. integrating mesa3.0 experimental UI * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing lint and import sort issues * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * processing feedback * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Readme.md * adopted project structure with other examples, removed relative imports and changed test for variance as for hotelling law variance need not decrease depends on factors * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added consumer preferences, market share dynamics to have changes in pricing and location. Removed old implementation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing lint * updated dependencies as per feedback * chore: fixing dependencies * chore: removing profile tests --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: umashankar-xebia <umashankar.ankuri@xebia.com>
- Loading branch information