I don't know whether this is a pure statistics, math or programming question so kindly let me know if there is a better place to post this question.
I am trying to implement the SIS epidemic model when the nodes have mobility. I understand how to perform this simulation in an analytical fashion. However, things get rather confusing when nodes are mobile.
The model assumes that each node can infect any node and hence the equations are valid. But when nodes are mobile, each node is not able to infect every other node (the other node might not be within the range) and has to explicity send a message to a node that is susceptible in order to infect it. In that case, give an infection rate
B, how do I simulate this when the nodes are mobile?
Currently, the way I am doing this is in the following way:
def Controller(): for i in range(1,100): randNum = getRand() if (randNum <= InfectionRate): neighbors = getNeighbors(i) ScheduleTransmission(getCurrentTime(), i, neighbors) Schedule(getCurrentTime() + 1, Controller)
My problem is that I am not understanding if the infection rate can now be captured through a single value (which was previously
B). If not, how does one analyze this scenario? Do I set the
B/numNodes so that the overall probability will be
B? Any suggestions?
UPDATE: Back calculating Beta and improved infection strategy
def Controller(): for i in range(1,100): neighbors = getNeighbors(i) k = len(neighbors) for j in neighbors: beta = -k log(1-c) if (beta <= InfectionThreshold): ScheduleTransmission(getCurrentTime(), i, j) Schedule(getCurrentTime() + 1, Controller)