Skip to content

Commit

Permalink
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion docs/src/tutorials/initialization.md
Original file line number Diff line number Diff line change
@@ -194,6 +194,13 @@ may not be analytically satisfiable!**. In our case here, if you sit down with a
long enough you will see that `λ = 0` is required for this equation, but since we chose
`λ = 1` we end up with a set of equations that are impossible to satisfy.

!!! note

If you would prefer to have an error instead of a warning in the context of non-fully
determined systems, pass the keyword argument `fully_determined = true` into the
problem constructor. Additionally, any warning about not being fully determined can
be supressed via passing `warn_initialize_determined = false`.

Check warning on line 202 in docs/src/tutorials/initialization.md

GitHub Actions / Spell Check with Typos

"supressed" should be "suppressed".

## Diving Deeper: Constructing the Initialization System

To get a better sense of the initialization system and to help debug it, you can construct
@@ -271,7 +278,7 @@ sol = solve(iprob)
```

!!! note

For more information on solving NonlinearProblems and NonlinearLeastSquaresProblems,
check out the [NonlinearSolve.jl tutorials!](https://docs.sciml.ai/NonlinearSolve/stable/tutorials/getting_started/).

4 changes: 2 additions & 2 deletions src/systems/diffeqs/abstractodesystem.jl
Original file line number Diff line number Diff line change
@@ -1556,10 +1556,10 @@ function InitializationProblem{iip, specialize}(sys::AbstractODESystem,
nunknown = length(unknowns(isys))

if warn_initialize_determined && neqs > nunknown
@warn "Initialization system is overdetermined. $neqs equations for $nunknown unknowns. Initialization will default to using least squares. To suppress this warning pass warn_initialize_determined = false."
@warn "Initialization system is overdetermined. $neqs equations for $nunknown unknowns. Initialization will default to using least squares. To suppress this warning pass warn_initialize_determined = false. To make this warning into an error, pass fully_determined = true"
end
if warn_initialize_determined && neqs < nunknown
@warn "Initialization system is underdetermined. $neqs equations for $nunknown unknowns. Initialization will default to using least squares. To suppress this warning pass warn_initialize_determined = false."
@warn "Initialization system is underdetermined. $neqs equations for $nunknown unknowns. Initialization will default to using least squares. To suppress this warning pass warn_initialize_determined = false. To make this warning into an error, pass fully_determined = true"
end

parammap = parammap isa DiffEqBase.NullParameters || isempty(parammap) ?

0 comments on commit 5fe46e6

Please sign in to comment.