Problems whose initialization failed
Source:R/initialization-problem.R
solve.InitializationFailure.RdWhen the initial conditions of a problem cannot be satisfied, the problem
constructor warns and marks the problem with the class
InitializationFailure. solve() on such a problem does not integrate:
it returns a solution holding the initial point with the return code
"InitialFailure", as the integrators of the SciML ecosystem do. Fix the
initial conditions (see analyze_initialization_jacobian()) and build or
remake() the problem again.
Usage
# S3 method for class 'InitializationFailure'
solve(a, b, ...)Examples
t <- t_nounits; D <- D_nounits
x <- Variable("x", t); y <- Variable("y", t)
sys <- mtkcompile(System(list(D(x) ~ -x + y, 0 ~ x^2 + y^2 - 1), t, name = "dae"))
prob <- suppressWarnings(ODEProblem(sys, list(x ~ 0.6, y ~ 0.5), c(0, 1)))
solve(prob)$retcode
#> [1] "InitialFailure"