-
Notifications
You must be signed in to change notification settings - Fork 4
Module: ContactNetworkGenerator
Niema Moshiri edited this page Apr 28, 2017
·
45 revisions
The ContactNetworkGenerator module creates an edge list representing the input contact network (either by reading it from file or generating it). See the source code to see what is defined by the abstract class.
-
ContactNetworkGenerator_BarabasiAlbert
- Implements the ContactNetworkGenerator using the Barabási-Albert (BA) model
- Under the BA model, a graph of n nodes is grown by attaching new nodes each with m edges that are preferentially attached to existing nodes with high degree
- The resulting graphs are undirected
- The contact network that was generated is written to a file named
contact_network.txt
in the user-specified output directory - Requirements:
- Config Parameters:
-
num_cn_nodes
: Desired number of nodes in the contact network (n) -
num_edges_from_new
: The number of edges that are attached from new nodes to existing nodes (m) -
out_dir
: The simulation's output directory
-
- Implements the ContactNetworkGenerator using the Barabási-Albert (BA) model
-
ContactNetworkGenerator_Barbell
- Implements the ContactNetworkGenerator using the Barbell Graph
- Two identical complete graphs K{m1} form the left and right bells and are connected by a path P{m2}.
- The resulting graphs are undirected
- The contact network that was generated is written to a file named
contact_network.txt
in the user-specified output directory - Requirements:
- Config Parameters:
-
barbell_m1
: The m1 parameter of the Barbell Graph -
barbell_m2
: The m2 parameter of the Barbell Graph -
out_dir
: The simulation's output directory
-
- Implements the ContactNetworkGenerator using the Barbell Graph
-
ContactNetworkGenerator_Caveman
- Implements the ContactNetworkGenerator using the Caveman Graph
- The resulting graphs are undirected
- The contact network that was generated is written to a file named
contact_network.txt
in the user-specified output directory - Requirements:
- Config Parameters:
-
cave_num_cliques
: Number of cliques -
cave_clique_size
: Number of nodes in each clique -
out_dir
: The simulation's output directory
-
- Implements the ContactNetworkGenerator using the Caveman Graph
-
ContactNetworkGenerator_CavemanConnected
- Implements the ContactNetworkGenerator using the Connected Caveman Graph
- The resulting graphs are undirected
- The contact network that was generated is written to a file named
contact_network.txt
in the user-specified output directory - Requirements:
- Config Parameters:
-
cave_num_cliques
: Number of cliques -
cave_clique_size
: Number of nodes in each clique -
out_dir
: The simulation's output directory
-
- Implements the ContactNetworkGenerator using the Connected Caveman Graph
-
ContactNetworkGenerator_CavemanRelaxed
- Implements the ContactNetworkGenerator using the Relaxed Caveman Graph
- The resulting graphs are undirected
- The contact network that was generated is written to a file named
contact_network.txt
in the user-specified output directory - Requirements:
- Config Parameters:
-
cave_num_cliques
: Number of cliques -
cave_clique_size
: Number of nodes in each clique -
cave_prob
: Probability of rewiring each edge -
out_dir
: The simulation's output directory
-
- Implements the ContactNetworkGenerator using the Relaxed Caveman Graph
-
ContactNetworkGenerator_Complete
- Implements the ContactNetworkGenerator using the Complete Graph
- The resulting graphs are undirected
- The contact network that was generated is written to a file named
contact_network.txt
in the user-specified output directory - Requirements:
- Config Parameters:
-
num_cn_nodes
: Desired number of nodes in the contact network -
out_dir
: The simulation's output directory
-
- Implements the ContactNetworkGenerator using the Complete Graph
-
ContactNetworkGenerator_ErdosRenyi
- Implements the ContactNetworkGenerator using the Erdős–Rényi (ER) model
- Under the ER model, each of the possible n(n-1)/2 undirected or n(n-1) directed edges is chosen with a probability p
- The contact network that was generated is written to a file named
contact_network.txt
in the user-specified output directory - Requirements:
- Config Parameters:
-
num_cn_nodes
: Desired number of nodes in the contact network -
er_prob
: The ER model probability p -
d_or_u
: "d" if you want directed edges, or "u" if you want undirected edges -
out_dir
: The simulation's output directory
-
- Implements the ContactNetworkGenerator using the Erdős–Rényi (ER) model
-
ContactNetworkGenerator_File
- Implements the ContactNetworkGenerator module such that the contact network edge list is read from file
- Requirements:
- None
- Config Parameters:
-
contact_network_file
: Full path to the file storing the contact network, represented in the FAVITES Contact Network File Format.
-
-
ContactNetworkGenerator_PANGEA
- Wrapper for PANGEA.HIV.sim
- Requirements:
- PANGEA.HIV.sim
- Must use ContactNetwork_PANGEA module
- Must use ContactNetworkEdge_PANGEA module
- Must use ContactNetworkNode_PANGEA module
- Must use NodeEvolution_PANGEA module
- Must use NodeSample_PANGEA module
- Must use SeedSelection_PANGEA module
- Must use SeedSequence_PANGEA module
- Must use SequenceEvolution_PANGEA module
- Must use SourceSample_PANGEA module
- Must use TransmissionNodeSample_PANGEA module
- Must use TransmissionTimeSample_PANGEA module
- Config Parameters
-
Rscript_path
: The path to yourRscript
executable (or simplyRscript
if it is in yourPATH
variable) -
pangea_yr.start
: See PANGEA.HIV.sim help (""
for default) -
pangea_yr.end
: See PANGEA.HIV.sim help (""
for default) -
pangea_seed
: See PANGEA.HIV.sim help (""
for default) -
pangea_s.INC.recent
: See PANGEA.HIV.sim help (""
for default) -
pangea_s.INC.recent.len
: See PANGEA.HIV.sim help (""
for default) -
pangea_s.PREV.min
: See PANGEA.HIV.sim help (""
for default) -
pangea_s.PREV.max
: See PANGEA.HIV.sim help (""
for default) -
pangea_s.PREV.base
: See PANGEA.HIV.sim help (""
for default) -
pangea_s.INTERVENTION.start
: See PANGEA.HIV.sim help (""
for default) -
pangea_s.INTERVENTION.mul
: See PANGEA.HIV.sim help (""
for default) -
pangea_s.ARCHIVAL.n
: See PANGEA.HIV.sim help (""
for default) -
pangea_s.MODEL
: See PANGEA.HIV.sim help (""
for default) -
pangea_s.PREV.max.n
: See PANGEA.HIV.sim help (""
for default) -
pangea_s.INTERVENTION.prop
: See PANGEA.HIV.sim help (""
for default) -
pangea_epi.model
: See PANGEA.HIV.sim help (""
for default) -
pangea_epi.acute
: See PANGEA.HIV.sim help (""
for default) -
pangea_epi.intervention
: See PANGEA.HIV.sim help (""
for default) -
pangea_epi.dt
: See PANGEA.HIV.sim help (""
for default) -
pangea_epi.import
: See PANGEA.HIV.sim help (""
for default) -
pangea_root.edge.fixed
: See PANGEA.HIV.sim help (""
for default) -
pangea_v.N0tau
: See PANGEA.HIV.sim help (""
for default) -
pangea_v.r
: See PANGEA.HIV.sim help (""
for default) -
pangea_v.T50
: See PANGEA.HIV.sim help (""
for default) -
pangea_wher.mu
: See PANGEA.HIV.sim help (""
for default) -
pangea_wher.sigma
: See PANGEA.HIV.sim help (""
for default) -
pangea_bwerm.mu
: See PANGEA.HIV.sim help (""
for default) -
pangea_bwerm.sigma
: See PANGEA.HIV.sim help (""
for default) -
pangea_er.gamma
: See PANGEA.HIV.sim help (""
for default) -
pangea_er.gtr
: See PANGEA.HIV.sim help (""
for default) -
pangea_sp.prop.of.sexactive
: See PANGEA.HIV.sim help (""
for default) -
pangea_report.prop.recent
: See PANGEA.HIV.sim help (""
for default) -
pangea_dbg.GTRparam
: See PANGEA.HIV.sim help (""
for default) -
pangea_dbg.rER
: See PANGEA.HIV.sim help (""
for default) -
pangea_index.starttime.mode
: See PANGEA.HIV.sim help (""
for default) -
pangea_startseq.mode
: See PANGEA.HIV.sim help (""
for default) -
pangea_seqtime.mode
: See PANGEA.HIV.sim help (""
for default)
-
-
ContactNetworkGenerator_RandomNumsNodeEdge
- Implements the ContactNetworkGenerator by creating a user-specified number of nodes and then randomly placing a user-specified number of edges on the graph (via the uniform distribution)
- The contact network that was generated is written to a file named
contact_network.txt
in the user-specified output directory - Requirements:
- None
- Config Parameters:
-
num_cn_nodes
: Desired number of nodes in the contact network -
num_cn_edges
: Desired number of edges in the contact network -
d_or_u
: "d" if you want directed edges, or "u" if you want undirected edges -
out_dir
: The simulation's output directory
-
-
ContactNetworkGenerator_WattsStrogatz
- Implements the ContactNetworkGenerator using the Watts-Strogatz (WS) model
- The algorithm behind the WS model is as follows:
- Create a ring over n nodes
- Each node in the ring is connected with its k nearest neighbors (k-1 neighbors if k is odd)
- Shortcuts are created by replacing some edges as follows:
- For each edge (u,v) in the underlying "n-ring with k nearest neighbors":
- With probability p, replace it with a new edge (u,w) with a uniformly random choice of existing node w
- For each edge (u,v) in the underlying "n-ring with k nearest neighbors":
- The resulting graphs are undirected
- The algorithm behind the WS model is as follows:
- The contact network that was generated is written to a file named
contact_network.txt
in the user-specified output directory - Requirements:
- Config Parameters:
-
num_cn_nodes
: Desired number of nodes in the contact network (n) -
ws_k
: Each node is connected to k nearest neighbors in ring topology -
ws_prob
: The probability of rewiring each edge (p) -
out_dir
: The simulation's output directory
-
- Implements the ContactNetworkGenerator using the Watts-Strogatz (WS) model
Niema Moshiri & Siavash Mirarab 2016