tracked_attrs_set_ref: Snapshot Tracked Attributes at Step Start

View source: R/net.fn.track.attrs.R

tracked_attrs_set_refR Documentation

Snapshot Tracked Attributes at Step Start

Description

Captures the current values of all attributes listed in control$tracked.attributes and control$tracked.attributes.once along with their unique_ids. This snapshot is stored in dat$run$tracked_attrs_ref and used by tracked_attrs_record at the end of the step to compute deltas. On its first call (when dat$run$tracking_attrs is FALSE), records a full initial snapshot instead for the step at - 1L. Attributes that do not exist yet (e.g., created by a module on its first call) are left out of the snapshot and recorded in full at the end of the step in which they appear.

Usage

tracked_attrs_set_ref(dat)

Arguments

dat

Main netsim_dat object containing a networkDynamic object and other initialization information passed from netsim().

Value

The updated netsim_dat main list object.

See Also

tracked_attrs_record(), record_attr_history()


EpiModel documentation built on Oct. 16, 2026, 5:07 p.m.