Skip to content

Commit 80ece19

Browse files
handle no structural simplify
1 parent f62163a commit 80ece19

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/systems/diffeqs/abstractodesystem.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,16 +1528,15 @@ function InitializationProblem{iip, specialize}(sys::AbstractODESystem, u0map =
15281528
error("A completed system is required. Call `complete` or `structural_simplify` on the system before creating an `ODEProblem`")
15291529
end
15301530

1531-
if isempty(u0map)
1531+
if isempty(u0map) && get_initializesystem(sys) !== nothing
15321532
isys = get_initializesystem(sys)
1533+
elseif isempty(u0map) && get_initializesystem(sys) === nothing
1534+
isys = structural_simplify(generate_initializesystem(sys); fully_determined = false)
15331535
else
15341536
isys = structural_simplify(
15351537
generate_initializesystem(sys; u0map); fully_determined = false)
15361538
end
15371539

1538-
if equations(isys) === nothing
1539-
return NonlinearProblem(isys, guesses, parammap)
1540-
end
15411540
neqs = length(equations(isys))
15421541
nunknown = length(unknowns(isys))
15431542

0 commit comments

Comments
 (0)