NullNet#
- class NullNet(n_people=None, **kwargs)[source]#
Bases:
NetworkA convenience class for a network of size n that only has self-connections with a weight of 0. This network can be useful for debugging purposes or as a placeholder network during development for conditions that require more complex network mechanisms.
Guarantees there’s one (1) contact per agent (themselves), and that their connection weight is zero.
For an empty network (ie, no edges) use >> import starsim as ss >> import networkx as nx >> empty_net_static = ss.StaticNet(nx.empty_graph) >> empty_net_rand = ss.RandomNet(n_contacts=0)
Attributes
betaRelative transmission on each network edge
membersReturn sorted array of all members
nowShortcut to self.t.now()
p1The first half of a network edge (person 1)
p2The second half of a network edge (person 2)
statesReturn a flat list of all states
statesdictReturn a flat dictionary (objdict) of all states
tiGet the current module timestep
timevecShortcut to self.t.timevec
Methods