Dear All,

I recently started looking into graph-tool because I was looking for a fast 
graph library to implement an SIR epidemic model. To my delight, I discovered 
that graph-tool has extremely fast epidemic models implemented already.

My issue is that I wish to study the effects of immunising/quarantining 
individuals on the overall spread of the disease and am looking for a way to 
extend graph-tool’s model to achieve this. In particular, I wish to be able to 
quarantine people for a fixed amount of time (or indefinitely in the case of 
immunisation).

Initially, I thought I would be able maintain who is quarantined (and for how 
long) with a vertex property map and filter the quarantined individuals out 
from the network using a vertex filter. However, I noticed that the 
iterate_sync() function, which iterates the model by one time step, seems to 
ignore vertex filters. In particular, if I filter out all infected individuals, 
it will still infect new people.

My second idea was to directly edit the vertex property maps that store the 
state of each individual in the graph (susceptible, infected and recovered), 
and introduce an additional ‘immunised’ state (with value 4, say). However, I 
have noticed that changing the values of instance.s and instance.s_copy does 
not seem to have any effect on iterate_sync(). In particular, if I mark 
everyone as susceptible and thus nobody as infected, it still infects new 
people in the next time step when I call iterate_sync(). So I am assuming that 
the state is also stored elsewhere?

Any pointers that might help me extend graph-tool’s SIR model to incorporate 
quarantining/immunising would be greatly appreciated. I have tried implementing 
my own model from scratch, but it is significantly slower.

Best regards,
Edwin
_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to