How are epidemic models simulated in case of mobility? 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 InfectionRate as 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)

 A: It depends on what you mean by "mobile" - and how you wish to simulate it. It sounds like you're trying for a purely agent based approach.
I assume by "B" you're actually referring to a parameter that is usually "Beta". If that's the case, know that Beta isn't actually a single probability. It is usually formulated as follows:
beta = -k log(1-c), where k is the average number of contacts per unit time, and c is the probability of successful transmission (Keeling and Rohani, 2008). Most models that don't assume homogeneous mixing - like the ones you are currently talking about - don't bother with beta, and just directly estimate k and c, and compute whether or not an individual has been infected from that (i.e. Did node come in contact with an infected node? If yes, was transmission successful? If yes, node is infected). Note that you can tinker with these numbers until you get an estimated beta that is equal to the beta of your compartmental model, but because of stochasticity, it will never be quite the same.
