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

Multiple neighborhoods #139

Open
rafaqz opened this issue Apr 1, 2021 · 1 comment
Open

Multiple neighborhoods #139

rafaqz opened this issue Apr 1, 2021 · 1 comment

Comments

@rafaqz
Copy link
Member

rafaqz commented Apr 1, 2021

The assumption that the first grid gets the neighborhood is going to break sooner or later. We might want to use multiple neighborhoods overlayed, or get neighbors from an aux grid.

If in e.g. a disperasal model we had heterogeneous carrying capacity, and want to drive dispersal by a response to population pressure, we could have an aux neighbood driving dispersal pressure in source cells as a simple elementwise multiplication of the population neighborhhod raised to some power. That would probably simd and be very fast.

This needs an abstraction of the kernel stepping to aux grids, and application of OffsetArrays.jl to the where needed, making sure that DimensionalData.

Then NeighboohoodRule will need to have another type parameter N which can be a single grid or a Tuple.

@rafaqz
Copy link
Member Author

rafaqz commented Apr 1, 2021

Of course for that example you could also use a SetNeighboohoodRule... the real case is when you also need to use suitability to choose the destination - and you are stuck needing to read a neighboorhood one way or another.

SetNeighborhoodRule can also have neighborhood data loaded from grids or aux in a similar way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant