diff --git a/src/systems/diffeqs/abstractodesystem.jl b/src/systems/diffeqs/abstractodesystem.jl index c7cc7398a8..0aa1820ddb 100644 --- a/src/systems/diffeqs/abstractodesystem.jl +++ b/src/systems/diffeqs/abstractodesystem.jl @@ -1564,11 +1564,12 @@ function InitializationProblem{iip, specialize}(sys::AbstractODESystem, merge(todict(parammap), Dict(get_iv(sys) => t)) u0map = isempty(u0map) ? Dict() : todict(u0map) guesses = isempty(guesses) ? Dict() : todict(guesses) + defaults = defaults(isys) # Check that all unknowns have guesses # TODO: which, if any, unknowns should be excluded from this guess? for x in unknowns(isys) - x in keys(guesses) || throw(ArgumentError("Missing guess for $x.")) + x in keys(guesses) || x in keys(defaults) || throw(ArgumentError("Missing guess for $x.")) end u0map = merge(guesses, u0map)