Closed chapuisk closed 1 month ago
I don't know if it's really a bug or just a normal result. The problem comes from the fact that g is not a spatialized graph, so we can't use spatial operators on it and so asking for g's topology returns a non-spatial topology (not with geometries) which doesn't work with neighbors_of(topology...). On the other hand, the neighbors_of graph operator works on all graph types.
You can easily correct the error in the model by changing: g <-graph([]); p g <- spatial_graph([]);
The question is how to improve this? With a more explicit error message? Something else?
@ptaillandier now i understand. Imho, spatial graph should be the default, i.e. don't have to go through an operator to specify it. That means we could have an operator to "unspatialize" a graph, but is it usefull anyway? Because non spatial graph means non agent graph... May be it is necessary for performance issue, more or less like grid and fields. Otherwise i dont see the point to having both.
Non-spatial graphs are interesting when you just need a graph structure for example for argumentation graphs for which nodes represent arguments. The notion of "location" does not make sense in this case.
Le mar. 2 avr. 2024 à 14:12, Kevin Chapuis @.***> a écrit :
@ptaillandier https://github.com/ptaillandier now i understand. Imho, spatial graph should be the default, i.e. don't have to go through an operator to specify it. That means we could have an operator to "unspatialize" a graph, but is it usefull anyway? Because non spatial graph means non agent graph... May be it is necessary for performance issue, more or less like grid and fields. Otherwise i dont see the point to having both.
— Reply to this email directly, view it on GitHub https://github.com/gama-platform/gama/issues/138#issuecomment-2031237610, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALPWHLW7S3NYXEJGWCPQYTY3JK7RAVCNFSM6AAAAABFFZK3ASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZRGIZTONRRGA . You are receiving this because you were mentioned.Message ID: @.***>
Describe the bug Trying to get neighbors at distance
n
of an agent within a graph raises an exception.To Reproduce Steps to reproduce the behavior: Copy past the model below
Expected behavior return same results with both neighbors_of calls! Note that the same happens with the neighbors_at operator using graph topology
Desktop (please complete the following information):