Hi,
If all that the sensors are doing is gathering information about the nodes, then the simplest is to just create data collectors instead of putting this logic on the nodes themselves. Data collecting really is basically a simultaneous sensing step.
The second simplest is to not use a scheduler at all.
You could just do something like define a data-gathering method in the node Class like get_data(), and then something like:
nodes = []
n = Node()
self.schedule.add(n)
nodes.append(n)
....
def step(self):
self.datacollector.collect(self)
self.schedule.step()
for node in nodes:
node.get_data()
In order to do a random step followed by a simultaneous step, you'd need three stages defined for each node:
- an infection stage which would run the infection
- a staging stage which would calculate and store the results from the sensing method
- an activation stage which would move the results from the staging stage into the instance attribute where you want to store them
Good luck!,
Jeremy