simList-accessors-events: Simulation event lists

eventsR Documentation

Simulation event lists

Description

Accessor functions for the events and completed slots of a simList object. These path functions will extract the values that were provided to the simInit function in the path argument.

Usage

events(sim, unit)

## S4 method for signature 'simList,character'
events(sim, unit)

## S4 method for signature 'simList,missing'
events(sim, unit)

events(sim) <- value

## S4 replacement method for signature 'simList'
events(sim) <- value

conditionalEvents(sim, unit)

## S4 method for signature 'simList,character'
conditionalEvents(sim, unit)

## S4 method for signature 'simList,missing'
conditionalEvents(sim, unit)

current(sim, unit)

## S4 method for signature 'simList,character'
current(sim, unit)

## S4 method for signature 'simList,missing'
current(sim, unit)

current(sim) <- value

## S4 replacement method for signature 'simList'
current(sim) <- value

completed(sim, unit, times = TRUE)

## S4 method for signature 'simList,character'
completed(sim, unit, times = TRUE)

## S4 method for signature 'simList,missing'
completed(sim, unit, times = TRUE)

completed(sim) <- value

## S4 replacement method for signature 'simList'
completed(sim) <- value

Arguments

sim

A simList object from which to extract element(s) or in which to replace element(s).

unit

Character. One of the time units used in SpaDES.

value

The object to be stored at the slot.

times

Logical. Should this function report the clockTime.

Details

By default, the event lists are shown when the simList object is printed, thus most users will not require direct use of these methods.

events Scheduled simulation events (the event queue).
completed Completed simulation events.

Currently, only get and set methods are defined. Subset methods are not.

Value

Returns or sets the value of the slot from the simList object.

Note

Each event is represented by a data.table() row consisting of:

  • eventTime: The time the event is to occur.

  • moduleName: The module from which the event is taken.

  • eventType: A character string for the programmer-defined event type.

See Also

SpaDES.core-package, specifically the section 1.2.6 on Simulation event queues.

Other functions to access elements of a 'simList' object: .addDepends(), checkpointFile(), envir(), globals(), inputs(), modules(), objs(), packages(), params(), paths(), progressInterval(), times()


SpaDES.core documentation built on June 22, 2024, 10:32 a.m.