Skip to content

Commit c576842

Browse files
committed
added: pretty-print hessian backend for NonLinMPC
1 parent 8ea2a06 commit c576842

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/controller/nonlinmpc.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,4 +981,5 @@ end
981981
function print_backends(io::IO, mpc::NonLinMPC)
982982
println(io, "├ gradient: $(backend_str(mpc.gradient))")
983983
println(io, "├ jacobian: $(backend_str(mpc.jacobian))")
984+
println(io, "├ hessian: $(backend_str(mpc.hessian))")
984985
end

src/general.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ function diffmat2vec!(v::AbstractVector, A::AbstractMatrix, i_vec::Vector{Tuple{
9494
end
9595

9696
backend_str(backend::AbstractADType) = string(nameof(typeof(backend)))
97+
backend_str(backend::Nothing) = "nothing"
9798
function backend_str(backend::AutoSparse)
9899
str = "AutoSparse ($(nameof(typeof(backend.dense_ad))),"*
99100
" $(nameof(typeof(backend.sparsity_detector))),"*

0 commit comments

Comments
 (0)