Skip to content
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

Make connections in experiment cell space named #2060 #features #2061

Closed
wants to merge 1 commit into from

Conversation

Abhijit1102
Copy link

The proposed feature resolves the limitation in the current representation of cell connections. By replacing the existing list of connections with a dictionary containing named connections, the code enables more expressive and flexible movement over the cell space. Specifically, this change allows for easy retrieval of neighboring cells in different directions, such as left, right, top, or bottom in the context of a von Neumann grid. The enhanced structure opens the door to straightforward expression of various movements and relationships within the cell space.

self.connections: dict[str, Cell] = {}

@EwoutH EwoutH added experimental Release notes label enhancement Release notes label labels Feb 28, 2024
@EwoutH
Copy link
Member

EwoutH commented Feb 28, 2024

Thanks for the PR! I assume this is still a work in process? If so, could you mark the PR as draft?

When finished, this should close #2060 right?

@quaquel
Copy link
Member

quaquel commented Feb 28, 2024

As indicated in #2060, the real issue is with OrthogonalMooreGrid, OrthogonalVonNeumannGrid, and HexGrid and specifically in _connect_single_cell2d, assuming we first address this for 2-dimensional grids. This PR, so far, does not address the code there (which is also, in part, why the builds are failing).

@@ -24,7 +24,7 @@ class Cell:

__slots__ = [
"coordinate",
"_connections",
"connections",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the choice to keep connections "private" was deliberate because many of the inner workings of discrete space classes rely on it. So, I would not change it here unless there are good reasons for it.

@Corvince
Copy link
Contributor

Corvince commented Mar 6, 2024

Honestly this PR looks very much AI-generated. Sorry if I am wrong about this @Abhijit1102 , but if there isn't any further progress soon I will close this PR (but feel free to open another one if this was a genuine first version)

@quaquel quaquel closed this Mar 12, 2024
@Abhijit1102 Abhijit1102 deleted the connections branch March 15, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Release notes label experimental Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants