powered by
Fixed delay
sd_fixed_delay(var, time, delay, init, .memory)
A number.
A string that indicates the delayed variable.
A number that indicates current simulation time.
A number that indicates the delay time.
A number that indicates the function's output value of at the start of the simulation.
A data frame that keeps past values of delayed variables.
.memory <- data.frame(time = 3, inflow = 3) rownames(.memory) <- 3 sd_fixed_delay("inflow", 5, 2, 0, .memory)
Run the code above in your browser using DataLab