## Automatically generated by odin 1.5.11 - do not edit
model_ <- R6::R6Class(
"odin_model",
cloneable = FALSE,
private = list(
ptr = NULL,
use_dde = NULL,
odin = NULL,
variable_order = NULL,
output_order = NULL,
n_out = NULL,
ynames = NULL,
interpolate_t = NULL,
cfuns = list(
rhs_dde = "model_rhs_dde",
rhs_desolve = "model_rhs_desolve",
initmod_desolve = "model_initmod_desolve",
output_dde = "model_output_dde"),
dll = "gonovax",
user = c("A0", "beta_t", "diag_rec", "enr", "epsilon", "eta_h_t",
"eta_l_t", "exr", "I0", "kappa", "mu", "notifiedprev", "nu",
"p", "psi", "q", "rho", "S0", "sigma", "T0", "tt", "u_d",
"u_pn", "u_s", "u_vbe", "U0", "vax_t", "vax_y", "vbe", "vea",
"ved", "vei", "ves", "vod", "vopn", "vos", "w", "wd", "willing",
"n_vax"),
## This is never called, but is used to ensure that R finds our
## symbols that we will use from the package; without this they
## cannot be found by dynamic lookup now that we use the package
## FFI registration system.
registration = function() {
if (FALSE) {
.C("model_rhs_dde", package = "gonovax")
.C("model_rhs_desolve", package = "gonovax")
.C("model_initmod_desolve", package = "gonovax")
.C("model_output_dde", package = "gonovax")
}
},
## This only does something in delay models
set_initial = function(t, y, use_dde) {
.Call("model_set_initial", private$ptr, t, y, use_dde,
PACKAGE= "gonovax")
},
update_metadata = function() {
meta <- .Call("model_metadata", private$ptr,
PACKAGE = "gonovax")
private$variable_order <- meta$variable_order
private$output_order <- meta$output_order
private$n_out <- meta$n_out
private$ynames <- private$odin$make_names(
private$variable_order, private$output_order, FALSE)
private$interpolate_t <- meta$interpolate_t
}
),
public = list(
initialize = function(..., user = list(...), use_dde = FALSE,
unused_user_action = NULL) {
private$odin <- asNamespace("odin")
private$ptr <- .Call("model_create", user, PACKAGE = "gonovax")
self$set_user(user = user, unused_user_action = unused_user_action)
private$use_dde <- use_dde
private$update_metadata()
},
ir = function() {
path_ir <- system.file("odin/model.json", mustWork = TRUE,
package = "gonovax")
json <- readLines(path_ir)
class(json) <- "json"
json
},
## Do we need to have the user-settable args here? It would be
## nice, but that's not super straightforward to do.
set_user = function(..., user = list(...), unused_user_action = NULL) {
private$odin$support_check_user(user, private$user, unused_user_action)
.Call("model_set_user", private$ptr, user, PACKAGE = "gonovax")
private$update_metadata()
},
## This might be time sensitive and, so we can avoid computing
## it. I wonder if that's an optimisation we should drop for now
## as it does not seem generally useful. This would bring us
## closer to the js version which requires that we always pass the
## time in.
initial = function(t) {
.Call("model_initial_conditions", private$ptr, t, PACKAGE = "gonovax")
},
rhs = function(t, y) {
.Call("model_rhs_r", private$ptr, t, y, PACKAGE = "gonovax")
},
deriv = function(t, y) {
self$rhs(t, y)
},
contents = function() {
.Call("model_contents", private$ptr, PACKAGE = "gonovax")
},
transform_variables = function(y) {
private$odin$support_transform_variables(y, private)
},
engine = function() {
"c"
},
run = function(t, y = NULL, ..., use_names = TRUE) {
private$odin$wrapper_run_ode(
self, private, t, y, ..., use_names = use_names)
}
))
model <- function(..., user = list(...), use_dde = FALSE,
unused_user_action = NULL) {
asNamespace("odin")$deprecated_constructor_call("model")
model_$new(user = user, use_dde = use_dde,
unused_user_action = unused_user_action)
}
class(model) <- "odin_generator"
attr(model, "generator") <- model_
model_trial_ <- R6::R6Class(
"odin_model",
cloneable = FALSE,
private = list(
ptr = NULL,
use_dde = NULL,
odin = NULL,
variable_order = NULL,
output_order = NULL,
n_out = NULL,
ynames = NULL,
interpolate_t = NULL,
cfuns = list(
rhs_dde = "model_trial_rhs_dde",
rhs_desolve = "model_trial_rhs_desolve",
initmod_desolve = "model_trial_initmod_desolve",
output_dde = "model_trial_output_dde"),
dll = "gonovax",
user = c("A0", "diag_rec_a", "diag_rec_s", "eta", "I0", "lambda", "mu",
"nu", "psi", "rho", "S0", "sigma", "T0", "U0", "vea", "ved",
"ves", "w", "n_vax"),
## This is never called, but is used to ensure that R finds our
## symbols that we will use from the package; without this they
## cannot be found by dynamic lookup now that we use the package
## FFI registration system.
registration = function() {
if (FALSE) {
.C("model_trial_rhs_dde", package = "gonovax")
.C("model_trial_rhs_desolve", package = "gonovax")
.C("model_trial_initmod_desolve", package = "gonovax")
.C("model_trial_output_dde", package = "gonovax")
}
},
## This only does something in delay models
set_initial = function(t, y, use_dde) {
.Call("model_trial_set_initial", private$ptr, t, y, use_dde,
PACKAGE= "gonovax")
},
update_metadata = function() {
meta <- .Call("model_trial_metadata", private$ptr,
PACKAGE = "gonovax")
private$variable_order <- meta$variable_order
private$output_order <- meta$output_order
private$n_out <- meta$n_out
private$ynames <- private$odin$make_names(
private$variable_order, private$output_order, FALSE)
private$interpolate_t <- meta$interpolate_t
}
),
public = list(
initialize = function(..., user = list(...), use_dde = FALSE,
unused_user_action = NULL) {
private$odin <- asNamespace("odin")
private$ptr <- .Call("model_trial_create", user, PACKAGE = "gonovax")
self$set_user(user = user, unused_user_action = unused_user_action)
private$use_dde <- use_dde
private$update_metadata()
},
ir = function() {
path_ir <- system.file("odin/model_trial.json", mustWork = TRUE,
package = "gonovax")
json <- readLines(path_ir)
class(json) <- "json"
json
},
## Do we need to have the user-settable args here? It would be
## nice, but that's not super straightforward to do.
set_user = function(..., user = list(...), unused_user_action = NULL) {
private$odin$support_check_user(user, private$user, unused_user_action)
.Call("model_trial_set_user", private$ptr, user, PACKAGE = "gonovax")
private$update_metadata()
},
## This might be time sensitive and, so we can avoid computing
## it. I wonder if that's an optimisation we should drop for now
## as it does not seem generally useful. This would bring us
## closer to the js version which requires that we always pass the
## time in.
initial = function(t) {
.Call("model_trial_initial_conditions", private$ptr, t, PACKAGE = "gonovax")
},
rhs = function(t, y) {
.Call("model_trial_rhs_r", private$ptr, t, y, PACKAGE = "gonovax")
},
deriv = function(t, y) {
self$rhs(t, y)
},
contents = function() {
.Call("model_trial_contents", private$ptr, PACKAGE = "gonovax")
},
transform_variables = function(y) {
private$odin$support_transform_variables(y, private)
},
engine = function() {
"c"
},
run = function(t, y = NULL, ..., use_names = TRUE) {
private$odin$wrapper_run_ode(
self, private, t, y, ..., use_names = use_names)
}
))
model_trial <- function(..., user = list(...), use_dde = FALSE,
unused_user_action = NULL) {
asNamespace("odin")$deprecated_constructor_call("model_trial")
model_trial_$new(user = user, use_dde = use_dde,
unused_user_action = unused_user_action)
}
class(model_trial) <- "odin_generator"
attr(model_trial, "generator") <- model_trial_
model_trial_stochastic_ <- R6::R6Class(
"odin_model",
cloneable = FALSE,
private = list(
ptr = NULL,
use_dde = NULL,
odin = NULL,
variable_order = NULL,
output_order = NULL,
n_out = NULL,
ynames = NULL,
interpolate_t = NULL,
cfuns = list(
rhs_dde = "model_trial_stochastic_rhs_dde"),
dll = "gonovax",
user = c("A0", "D", "diag_rec_a", "diag_rec_s", "eta", "I0", "lambda",
"mu", "nu", "psi", "rho", "S0", "sigma", "T0", "U0", "vea",
"ved", "ves", "w", "n_vax"),
## This is never called, but is used to ensure that R finds our
## symbols that we will use from the package; without this they
## cannot be found by dynamic lookup now that we use the package
## FFI registration system.
registration = function() {
if (FALSE) {
.C("model_trial_stochastic_rhs_dde", package = "gonovax")
}
},
## This only does something in delay models
set_initial = function(step, y, use_dde) {
.Call("model_trial_stochastic_set_initial", private$ptr, step, y, use_dde,
PACKAGE= "gonovax")
},
update_metadata = function() {
meta <- .Call("model_trial_stochastic_metadata", private$ptr,
PACKAGE = "gonovax")
private$variable_order <- meta$variable_order
private$output_order <- meta$output_order
private$n_out <- meta$n_out
private$ynames <- private$odin$make_names(
private$variable_order, private$output_order, TRUE)
private$interpolate_t <- meta$interpolate_t
}
),
public = list(
initialize = function(..., user = list(...), use_dde = FALSE,
unused_user_action = NULL) {
private$odin <- asNamespace("odin")
private$ptr <- .Call("model_trial_stochastic_create", user, PACKAGE = "gonovax")
self$set_user(user = user, unused_user_action = unused_user_action)
private$use_dde <- use_dde
private$update_metadata()
},
ir = function() {
path_ir <- system.file("odin/model_trial_stochastic.json", mustWork = TRUE,
package = "gonovax")
json <- readLines(path_ir)
class(json) <- "json"
json
},
## Do we need to have the user-settable args here? It would be
## nice, but that's not super straightforward to do.
set_user = function(..., user = list(...), unused_user_action = NULL) {
private$odin$support_check_user(user, private$user, unused_user_action)
.Call("model_trial_stochastic_set_user", private$ptr, user, PACKAGE = "gonovax")
private$update_metadata()
},
## This might be time sensitive and, so we can avoid computing
## it. I wonder if that's an optimisation we should drop for now
## as it does not seem generally useful. This would bring us
## closer to the js version which requires that we always pass the
## time in.
initial = function(step) {
.Call("model_trial_stochastic_initial_conditions", private$ptr, step, PACKAGE = "gonovax")
},
rhs = function(step, y) {
.Call("model_trial_stochastic_rhs_r", private$ptr, step, y, PACKAGE = "gonovax")
},
update = function(step, y) {
self$rhs(step, y)
},
contents = function() {
.Call("model_trial_stochastic_contents", private$ptr, PACKAGE = "gonovax")
},
transform_variables = function(y) {
private$odin$support_transform_variables(y, private)
},
engine = function() {
"c"
},
run = function(step, y = NULL, ..., use_names = TRUE) {
private$odin$wrapper_run_discrete(
self, private, step, y, ..., use_names = use_names)
}
))
model_trial_stochastic <- function(..., user = list(...), use_dde = FALSE,
unused_user_action = NULL) {
asNamespace("odin")$deprecated_constructor_call("model_trial_stochastic")
model_trial_stochastic_$new(user = user, use_dde = use_dde,
unused_user_action = unused_user_action)
}
class(model_trial_stochastic) <- "odin_generator"
attr(model_trial_stochastic, "generator") <- model_trial_stochastic_
model_withouthistory_ <- R6::R6Class(
"odin_model",
cloneable = FALSE,
private = list(
ptr = NULL,
use_dde = NULL,
odin = NULL,
variable_order = NULL,
output_order = NULL,
n_out = NULL,
ynames = NULL,
interpolate_t = NULL,
cfuns = list(
rhs_dde = "model_withouthistory_rhs_dde",
rhs_desolve = "model_withouthistory_rhs_desolve",
initmod_desolve = "model_withouthistory_initmod_desolve",
output_dde = "model_withouthistory_output_dde"),
dll = "gonovax",
user = c("A0", "beta_t", "enr", "epsilon", "eta_h_t", "eta_l_t", "exr",
"I0", "mu", "nu", "p", "psi", "q", "rho", "S0", "sigma", "T0",
"tt", "u", "u_vbe", "U0", "vax_t", "vax_y", "vbe", "vea", "ved",
"vei", "ves", "vod", "vos", "w", "willing", "n_vax"),
## This is never called, but is used to ensure that R finds our
## symbols that we will use from the package; without this they
## cannot be found by dynamic lookup now that we use the package
## FFI registration system.
registration = function() {
if (FALSE) {
.C("model_withouthistory_rhs_dde", package = "gonovax")
.C("model_withouthistory_rhs_desolve", package = "gonovax")
.C("model_withouthistory_initmod_desolve", package = "gonovax")
.C("model_withouthistory_output_dde", package = "gonovax")
}
},
## This only does something in delay models
set_initial = function(t, y, use_dde) {
.Call("model_withouthistory_set_initial", private$ptr, t, y, use_dde,
PACKAGE= "gonovax")
},
update_metadata = function() {
meta <- .Call("model_withouthistory_metadata", private$ptr,
PACKAGE = "gonovax")
private$variable_order <- meta$variable_order
private$output_order <- meta$output_order
private$n_out <- meta$n_out
private$ynames <- private$odin$make_names(
private$variable_order, private$output_order, FALSE)
private$interpolate_t <- meta$interpolate_t
}
),
public = list(
initialize = function(..., user = list(...), use_dde = FALSE,
unused_user_action = NULL) {
private$odin <- asNamespace("odin")
private$ptr <- .Call("model_withouthistory_create", user, PACKAGE = "gonovax")
self$set_user(user = user, unused_user_action = unused_user_action)
private$use_dde <- use_dde
private$update_metadata()
},
ir = function() {
path_ir <- system.file("odin/model_withouthistory.json", mustWork = TRUE,
package = "gonovax")
json <- readLines(path_ir)
class(json) <- "json"
json
},
## Do we need to have the user-settable args here? It would be
## nice, but that's not super straightforward to do.
set_user = function(..., user = list(...), unused_user_action = NULL) {
private$odin$support_check_user(user, private$user, unused_user_action)
.Call("model_withouthistory_set_user", private$ptr, user, PACKAGE = "gonovax")
private$update_metadata()
},
## This might be time sensitive and, so we can avoid computing
## it. I wonder if that's an optimisation we should drop for now
## as it does not seem generally useful. This would bring us
## closer to the js version which requires that we always pass the
## time in.
initial = function(t) {
.Call("model_withouthistory_initial_conditions", private$ptr, t, PACKAGE = "gonovax")
},
rhs = function(t, y) {
.Call("model_withouthistory_rhs_r", private$ptr, t, y, PACKAGE = "gonovax")
},
deriv = function(t, y) {
self$rhs(t, y)
},
contents = function() {
.Call("model_withouthistory_contents", private$ptr, PACKAGE = "gonovax")
},
transform_variables = function(y) {
private$odin$support_transform_variables(y, private)
},
engine = function() {
"c"
},
run = function(t, y = NULL, ..., use_names = TRUE) {
private$odin$wrapper_run_ode(
self, private, t, y, ..., use_names = use_names)
}
))
model_withouthistory <- function(..., user = list(...), use_dde = FALSE,
unused_user_action = NULL) {
asNamespace("odin")$deprecated_constructor_call("model_withouthistory")
model_withouthistory_$new(user = user, use_dde = use_dde,
unused_user_action = unused_user_action)
}
class(model_withouthistory) <- "odin_generator"
attr(model_withouthistory, "generator") <- model_withouthistory_
model_withoutPN_ <- R6::R6Class(
"odin_model",
cloneable = FALSE,
private = list(
ptr = NULL,
use_dde = NULL,
odin = NULL,
variable_order = NULL,
output_order = NULL,
n_out = NULL,
ynames = NULL,
interpolate_t = NULL,
cfuns = list(
rhs_dde = "model_withoutPN_rhs_dde",
rhs_desolve = "model_withoutPN_rhs_desolve",
initmod_desolve = "model_withoutPN_initmod_desolve",
output_dde = "model_withoutPN_output_dde"),
dll = "gonovax",
user = c("A0", "beta_t", "diag_rec", "enr", "epsilon", "eta_h_t",
"eta_l_t", "exr", "I0", "mu", "nu", "p", "psi", "q", "rho",
"S0", "sigma", "T0", "tt", "u_d", "u_s", "u_vbe", "U0", "vax_t",
"vax_y", "vbe", "vea", "ved", "vei", "ves", "vod", "vos", "w",
"wd", "willing", "n_vax"),
## This is never called, but is used to ensure that R finds our
## symbols that we will use from the package; without this they
## cannot be found by dynamic lookup now that we use the package
## FFI registration system.
registration = function() {
if (FALSE) {
.C("model_withoutPN_rhs_dde", package = "gonovax")
.C("model_withoutPN_rhs_desolve", package = "gonovax")
.C("model_withoutPN_initmod_desolve", package = "gonovax")
.C("model_withoutPN_output_dde", package = "gonovax")
}
},
## This only does something in delay models
set_initial = function(t, y, use_dde) {
.Call("model_withoutPN_set_initial", private$ptr, t, y, use_dde,
PACKAGE= "gonovax")
},
update_metadata = function() {
meta <- .Call("model_withoutPN_metadata", private$ptr,
PACKAGE = "gonovax")
private$variable_order <- meta$variable_order
private$output_order <- meta$output_order
private$n_out <- meta$n_out
private$ynames <- private$odin$make_names(
private$variable_order, private$output_order, FALSE)
private$interpolate_t <- meta$interpolate_t
}
),
public = list(
initialize = function(..., user = list(...), use_dde = FALSE,
unused_user_action = NULL) {
private$odin <- asNamespace("odin")
private$ptr <- .Call("model_withoutPN_create", user, PACKAGE = "gonovax")
self$set_user(user = user, unused_user_action = unused_user_action)
private$use_dde <- use_dde
private$update_metadata()
},
ir = function() {
path_ir <- system.file("odin/model_withoutPN.json", mustWork = TRUE,
package = "gonovax")
json <- readLines(path_ir)
class(json) <- "json"
json
},
## Do we need to have the user-settable args here? It would be
## nice, but that's not super straightforward to do.
set_user = function(..., user = list(...), unused_user_action = NULL) {
private$odin$support_check_user(user, private$user, unused_user_action)
.Call("model_withoutPN_set_user", private$ptr, user, PACKAGE = "gonovax")
private$update_metadata()
},
## This might be time sensitive and, so we can avoid computing
## it. I wonder if that's an optimisation we should drop for now
## as it does not seem generally useful. This would bring us
## closer to the js version which requires that we always pass the
## time in.
initial = function(t) {
.Call("model_withoutPN_initial_conditions", private$ptr, t, PACKAGE = "gonovax")
},
rhs = function(t, y) {
.Call("model_withoutPN_rhs_r", private$ptr, t, y, PACKAGE = "gonovax")
},
deriv = function(t, y) {
self$rhs(t, y)
},
contents = function() {
.Call("model_withoutPN_contents", private$ptr, PACKAGE = "gonovax")
},
transform_variables = function(y) {
private$odin$support_transform_variables(y, private)
},
engine = function() {
"c"
},
run = function(t, y = NULL, ..., use_names = TRUE) {
private$odin$wrapper_run_ode(
self, private, t, y, ..., use_names = use_names)
}
))
model_withoutPN <- function(..., user = list(...), use_dde = FALSE,
unused_user_action = NULL) {
asNamespace("odin")$deprecated_constructor_call("model_withoutPN")
model_withoutPN_$new(user = user, use_dde = use_dde,
unused_user_action = unused_user_action)
}
class(model_withoutPN) <- "odin_generator"
attr(model_withoutPN, "generator") <- model_withoutPN_
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.