when creating a ContactNetwork object via from_networkx_graph all attributes are now passed on; the syntax hasn't changed:
network = ContactNetwork.from_networkx_graph(graph)
# with regards to user network creation:
user_network = network.build_user_network_using(SomeGraphBuilder())
when running a simulation for synthetic data, the user network should be updated accordingly; hence, a new method is implemented:
for time in time_span:
network = epidemic_simulator.run(network)
user_network.update_from(network)
# other stuff with user_network
The second feature hasn't been tested properly yet because there's currently no example in master that utilizes user networks. Once this is merged into master and then into paper-examples, we can test it.
This PR deals with two issues:
ContactNetwork
object viafrom_networkx_graph
all attributes are now passed on; the syntax hasn't changed:The second feature hasn't been tested properly yet because there's currently no example in
master
that utilizes user networks. Once this is merged intomaster
and then intopaper-examples
, we can test it.