From 8e17b4fb161f9c3c76f7f5ea3fe4f78844eccc1b Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Tue, 3 Dec 2024 22:45:27 +0530 Subject: [PATCH 1/2] fix: fix `CheckInit` error message --- src/initialization.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/initialization.jl b/src/initialization.jl index acf714c58..5b6f3219b 100644 --- a/src/initialization.jl +++ b/src/initialization.jl @@ -64,7 +64,7 @@ function Base.showerror(io::IO, e::CheckInitFailureError) normresid = $(e.normresid) > abstol = $(e.abstol)." ) - if isdae + if e.isdae print(io, " If you wish for the system to automatically change the algebraic variables to satisfy the algebraic constraints, please pass `initializealg = BrownBasicInit()` to solve (this option will require From a5b03758edd6df986e5b894ed419ca1be0630abd Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Tue, 3 Dec 2024 22:46:55 +0530 Subject: [PATCH 2/2] refactor: minor error message improvement --- src/initialization.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/initialization.jl b/src/initialization.jl index 5b6f3219b..7ec14b12d 100644 --- a/src/initialization.jl +++ b/src/initialization.jl @@ -69,7 +69,7 @@ function Base.showerror(io::IO, e::CheckInitFailureError) automatically change the algebraic variables to satisfy the algebraic constraints, please pass `initializealg = BrownBasicInit()` to solve (this option will require `using OrdinaryDiffEqNonlinearSolve`). If you wish to perform an initialization on the - complete u0, please pass initializealg = ShampineCollocationInit() to solve. Note that + complete u0, please pass `initializealg = ShampineCollocationInit()` to solve. Note that initialization can be a very difficult process for DAEs and in many cases can be numerically intractable without symbolic manipulation of the system. For an automated system that will generate numerically stable initializations, see ModelingToolkit.jl