trajectory: Create a Trajectory

Description Usage Arguments Value See Also Examples

View source: R/trajectory-methods.R

Description

This method initialises a trajectory object, which comprises a chain of activities that can be attached to a generator. See below for a complete list of available activities by category.

Usage

1
trajectory(name = "anonymous", verbose = FALSE)

Arguments

name

the name of the trajectory.

verbose

enable showing additional information.

Value

Returns an environment that represents the trajectory.

See Also

Available activities by category:

Manage trajectories:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## create an empty trajectory
x <- trajectory("my trajectory")
x

## add some activities by chaining them
x <- x %>%
  log_("here I am!") %>%
  timeout(5) %>%
  log_("leaving!")
x

## join trajectories
x <- join(x, x)

## extract and replace
x[c(3, 4)] <- x[2]
x

r-simmer/simmer documentation built on Sept. 10, 2018, 5:29 p.m.