Skip to contents

check_symbolic_ad_allowed(sys) errors when the system's metadata has an entry SymbolicADDisallowed, whose value (a string) explains why symbolic Jacobians and similar derivatives are not available.

Usage

check_symbolic_ad_allowed(sys)

Arguments

sys

A System.

Value

Invisibly TRUE; errors otherwise.

Examples

sys <- System(list(), t_nounits, name = "s",
              metadata = list(symbolic_ad_disallowed = "it wraps a black box"))
try(check_symbolic_ad_allowed(sys))
#> Error : System s does not support symbolic automatic differentiation. it wraps a black box