project: Calculate the trajectories of a network model

View source: R/ui_projection-simulation.R

projectR Documentation

Calculate the trajectories of a network model

Description

Calculate the trajectories of a network model

Usage

project(
  nm,
  dt = NULL,
  grid_size = NULL,
  at = NULL,
  end = NULL,
  flows = "no",
  cached_ts = NULL,
  cached_ee = NULL
)

Arguments

nm

A networkModel object.

dt, grid_size

Either the time step size for trajectory calculations (dt) or the number of points for the calculation (grid_size) can be provided. If none is provided, then a default grid size of 256 steps is used.

at

Optional, vector of time values at which the trajectory must be evaluated.

end

Time value for end point. If not provided, the last observation or event is used.

flows

Return flow values? The default is "no" and no flows are calculated. Other values are "total" (total flows summed up from beginning to end timepoint), "average" (average flows per time unit, equal to total flows divided by the projection duration), and "per_dt" (detailled flow values are returned for each interval dt of the projection).

cached_ts, cached_ee

Used for optimization by other functions, not for use by the package user.

Value

A network model object with a "trajectory" column.

Examples

m <- aquarium_mod
m <- set_params(m, sample_params(m))
z <- project(m)
z <- project(m, flows = "per_dt")
z <- project(m, flows = "total")
z <- project(m, flows = "average")


isotracer documentation built on Sept. 22, 2023, 1:07 a.m.