set_network: Set Network State During netsim Simulation

View source: R/get.R

set_networkR Documentation

Set Network State During netsim Simulation

Description

This function updates the netsim_dat object given a network representing the current state of the simulation.

Usage

set_network(x, ...)

## S3 method for class 'netsim_dat'
set_network(x, network = 1L, nw, ...)

Arguments

x

a netsim_dat object

network

the index of the network to set on x

nw

the value of the network to set on x

Details

If running tergmLite simulation, this function updates x$el[[network]] and (if tergmLite.track.duration is TRUE for the network index network) the network attributes "time" and "lasttoggle" in x$net_attr[[network]]. If not running tergmLite simulation, this function updates the networkDynamic object stored in x$nw[[network]]. The input nw should be of class networkLite when running tergmLite simulation, and of class networkDynamic when not running tergmLite simulation.

Value

the netsim_dat object with the network state updated


EpiModel documentation built on July 9, 2023, 5:21 p.m.