Skip to content

Commit 0cd7d18

Browse files
committed
debug: printing of the DiffSolver name
1 parent 9888fe2 commit 0cd7d18

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/model/nonlinmodel.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ julia> f!(ẋ, x, u, _ , p) = (ẋ .= p*x .+ u; nothing);
152152
julia> h!(y, x, _ , _ ) = (y .= 0.1x; nothing);
153153
154154
julia> model1 = NonLinModel(f!, h!, 5.0, 1, 1, 1, p=-0.2) # continuous dynamics
155-
NonLinModel with a sample time Ts = 5.0 s, RungeKutta{4} solver and:
155+
NonLinModel with a sample time Ts = 5.0 s, RungeKutta(4) solver and:
156156
1 manipulated inputs u
157157
1 states x
158158
1 outputs y
@@ -307,5 +307,8 @@ h!(y0, model::NonLinModel, x0, d0, p) = model.h!(y0, x0, d0, p)
307307

308308
include("solver.jl")
309309

310-
detailstr(model::NonLinModel) = ", $(typeof(model.solver)) solver"
311-
detailstr(::NonLinModel{<:Real, <:EmptySolver}) = ", empty solver"
310+
function detailstr(model::NonLinModel{<:Real, <:RungeKutta{N}}) where N
311+
return ", $(nameof(typeof(model.solver)))($N) solver"
312+
end
313+
detailstr(::NonLinModel{<:Real, <:EmptySolver}) = ", empty solver"
314+
detailstr(::NonLinModel) = ""

0 commit comments

Comments
 (0)