-
Notifications
You must be signed in to change notification settings - Fork 948
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
Clean up HexSingleGrid(HexGrid) andHexGrid #1847
Comments
Hi, the motivation to make Grid private was mainly due to the fact that only SingleGrid and MultiGrid should be used. For the same reasoning the HexGrid should have been splitted in two versions. To keep retrocompatibility though a simple subclassing trick was used so that to make HexGrid still usable. But when 2.0 was released, the HexGrid class could have been dropped |
Ah also, |
I am revisiting to try to wrap this up. |
We should check this aligns / not disrupts with the efforts in |
@quaquel can we add a HexGrid elegantly to the cell space? And maybe a triangle space also while we’re at it? |
HexGrids are already implemented! Triangulars should be doable pretty easy, depending on the coordinate system |
A that’s nice! Maybe I will take a shot at the triangular grids soon. What would we think of deprecating the current HexGrids in favor of the Cell space? On other thing is visualization of all this. Can we do that in a scalable way? |
I wouldn't do that until cell_space is out of experimental. |
* remove deprecated HexGrid class closes #1847 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Discussed in #1827
Originally posted by jackiekazil October 2, 2023
Why is the HexSingleGrid subclassed from HexGrid and HexGrid has nothing in it?
I was reading through the code and confused by this -- because it is also visible in the docs. Wondering if there was logical reason or if someone remembered why? I was thinking we should get rid of HexGrid or make it private.
See the following two lines -
mesa/mesa/space.py
Line 742 in b2f642f
mesa/mesa/space.py
Line 768 in b2f642f
The text was updated successfully, but these errors were encountered: