Skip to content

Commit 78afd3d

Browse files
forecaster allows tv updates
1 parent 79fa954 commit 78afd3d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: macpan2
22
Title: Fast and Flexible Compartmental Modelling
3-
Version: 1.16.2
3+
Version: 1.16.3
44
Authors@R: c(
55
person("Steve Walker", email="swalk@mcmaster.ca", role=c("cre", "aut")),
66
person("Weiguang Guan", role="aut"),

R/mp_forecaster.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ mp_more_steps = function(model, steps_to_add) {
3030
#' Typically this argument will be unused, because by default the data are
3131
#' stored in the `calibrator` unless you want to avoid making too many copies
3232
#' of the data.
33+
#' @param tv An optional replacement for the `tv` parameter in the
34+
#' \code{\link{mp_tmb_calibrator}} function.
3335
#' @param default An optional list of default model variables (e.g., parameters
3436
#' initial values of state variables) to override calibrated values.
3537
#'
3638
#' @export
3739
mp_forecaster = function(calibrator, forecast_period_time_steps
38-
, outputs = NULL, data = NULL, default = list()
40+
, outputs = NULL, data = NULL, tv = NULL, default = list()
3941
) {
4042
spec = mp_optimized_spec(calibrator, "original")
4143

@@ -72,11 +74,11 @@ mp_forecaster = function(calibrator, forecast_period_time_steps
7274
args$spec = spec
7375
if (!is.null(data)) args$data = data
7476
if (!is.null(outputs)) args$outputs = outputs
77+
if (!is.null(tv)) args$tv = tv
7578
if (is.null(args$time)) {
7679
args$time = calibrator$time_steps_obj$extended_time_arg(forecast_period_time_steps)
7780
} else {
7881
args$time = args$time$extend(forecast_period_time_steps)
7982
}
8083
do.call(mp_tmb_calibrator, args)
8184
}
82-

man/mp_forecaster.Rd

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)