Refactoring mesa.space
@adamamer20 已经在做这个了。
开始于 2024年1月10日。
评估
这个 Issue 还没有评估数据。
描述
Roadmap
- #39
- #40
- #41
- #34
- #35
- #36
- #37
- #38
- #47
Class Structure and Design
SpaceDF
- Base class for all spaces
- Defines a common interface for all spaces
- Stores agent positions in the
_agentsattribute in a DataFrame/GeoDataFrame. This approach avoids many missing values in the AgentSetDF and reduces confusion when multiple spaces of the same type are present (e.g., an agent in both a grid and in a social network) - TODO: Implement a
posproperty for AgentContainer that performs an instant join with the space_agentsDataFrame
MultiSpaceDF
- Stores the collection of spaces in a model, similar to AgentsDF
DiscreteSpaceDF
- Defines an interface for GridDF and NetworkDF
- Supports setting cell properties at both class level (setting an attribute of the class) and cell level (using the
set_cellsmethod) - In addition to
_agentsstores cell properties in the_cellsattribute in a DataFrame. The_cellsDataFrame explicitly stores only cells that have agents or have specific properties different from the class level
ContinousSpaceDF
- Stores agents in a GeoDataFrame (only geopandas in the future)
- Bridges mesa and mesa-geo
- All agents are geoagents and shapely objects
- Can be used as a continuous space in mesa without setting CRS, or as a geospace in mesa-geo by setting CRS
GridDF
- Implemented in both GridPolars and GridPandas versions
- Supports multiple dimensions
- The '_empty_grid' attribute stores the remaining capacity of the grid.
GeoGridDF
- Position in the class hierarchy still to be determined
- Is it possible to create a unique class or attempt to merge with GridDF? Probably not possible to merge as GridDF supports multiple dimensions, while shapely objects are limited to 2 dimensions.
- 主要语言
- Python
- 星标
- 44
- 派生
- 20
- 平均合并
- 1 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mesa/mesa-frames 的其他 Issue
-
bug triage
难度 3/5 1-2 天 新手友好度 35/100
mesa/mesa-frames#204 ·
-
难度 5/5 一周以上 新手友好度 25/100
mesa/mesa-frames#186 · 10 条评论 ·
-
feature triage
难度 3/5 1-2 天 新手友好度 45/100
mesa/mesa-frames#177 · 1 条评论 ·
-
[Bug]: Solving polars Deprecation warnings for `is_in`可能已有人在做 @adamamer20 于 430 天前认领。 未关闭bug good first issue maintenance Sprints!
mesa/mesa-frames#174 · 2 条评论 · 已指派 1 人 ·
-
[Enhancement] : agents selection in AgentsDf would be better if it returns agent_idx/name as key未关闭enhancement
难度 3/5 1-2 天 新手友好度 40/100
mesa/mesa-frames#162 · 1 条评论 ·
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
microsoft/onnxscript#3155 ·
维护者通常 4 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug docs severity:low
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
docs good first issue
难度 2/5 1-3 小时 新手友好度 76/100