Learn R Programming

SimInf (version 5.1.0)

SimInf_events-class: Class "SimInf_events"

Description

Class to handle the scheduled events

Arguments

Slots

E

Each row corresponds to one compartment in the model. The non-zero entries in a column indicates the compartments to include in an event. For the exit, internal transfer and external transfer events, a non-zero entry indicate the compartments to sample individuals from. For the enter event, all individuals enter first non-zero compartment. Sparse matrix of object class "'>dgCMatrix".

N

Each row represents one compartment in the model and the values determine how to move sampled individuals in internal transfer and external transfer events.

event

Type of event: 0) exit, 1) enter, 2) internal transfer, and 3) external transfer. Other values are reserved for future event types and not supported by the current default core solver. Integer vector.

time

Time for the event. Integer vector.

node

The node that the event operates on. Also the source node for an external transfer event. Integer vector. 1 <= node[i] <= Number of nodes.

dest

The destination node for an external transfer event. Should be 0 for the other event types. Integer vector. dest[i] >= 0.

n

The number of individuals affected by the event. Integer vector. n[i] >= 0.

proportion

If n[i] equals zero, the number of individuals affected by event[i] is calculated by summing the number of individuls with proportion[i]. Numeric vector. 0 <= proportion[i] <= 1.

select

The column j in the event matrix E that determines the compartments that the event operates on. Integer vector.

shift

The column k in the shift matrix N that determines how individuals in internal transfer and external transfer events are shifted to enter another compartment. Should be 0 for the other event types. Integer vector.