AlchemistSimulator / Alchemist

Alchemist: an extensible simulator for pervasive computing
Other
39 stars 45 forks source link

Asymmetric LinkingRules #793

Open aPlacuzzi opened 3 years ago

aPlacuzzi commented 3 years ago

When a node is removed, all the nodes in its neighbourhood are notified of this event and remove it from their neighbourhood. With an asymmetric linkingRule policy a node (N) can have the node to remove (NR) in its neighbourhood, but N could not be in the neighbourhood of NR. So, N continues to believe that NR is its neighbour. If this happens and N changes position, the neighbourhoods are updated, and also the NR neighbourhood is updated, but it doesn't exist anymore and AbstractEnironment.getNeighborhood throw the IllegalArgumentException.

DanySK commented 3 years ago

The problem here is currently unavoidable: Alchemist requires LinkingRules to be bi-directional. I'm converting this issue to a call for asymmetric neighborhoods: fixing the issue reported would break the simulator, as the engine and its dependency management system assumes an undirected graph.