Learn R Programming

cvasi (version 1.3.1)

sequence: Sequence of scenarios

Description

A sequence of scenarios is treated as a single scenario and each scenario is simulated one after the other. If scenario n in a sequence was simulated, scenario n+1 will start off in the model state where n had ended. Scenario sequences can be used to e.g. implement changes in model parameters over time.

Arguments

Value

an S4 object of type ScenarioSequence

Details

Requirements

All scenarios in a sequence must fulfill the following requirements:

  • All scenarios must have identical state variables

  • The output times of all scenarios must represent a continuous time series without gaps or overlaps

Limitations

Only simulation of sequences are supported, at the moment. Effects and effect profiles (EPx values) cannot be derived, yet.

Examples

Run this code
# create two scenarios that need to be simulated one after the other
scen1 <- minnow_it %>% set_times(0:3)
scen2 <- minnow_it %>% set_times(3:6) %>% set_param(c(kd=0))

# create a sequence and assign scenarios
sq <- sequence(list(scen1, scen2))

# simulate the sequence

simulate(sq)

Run the code above in your browser using DataLab