Skip to content

Commit

Permalink
Update src/systems/diffeqs/abstractodesystem.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Jul 18, 2024
1 parent c4463b3 commit c193782
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/systems/diffeqs/abstractodesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c193782

Please sign in to comment.