6868
6969Describe `meta` for the `show` function.
7070"""
71- function lines_of_description (m:: AbstractNLPModelMeta )
71+ function lines_of_description (m:: M ) where {M <: AbstractNLPModelMeta }
7272 V = [
7373 length (m. ifree),
7474 length (m. ilow),
@@ -93,8 +93,22 @@ function lines_of_description(m::AbstractNLPModelMeta)
9393 V = [sum (V); V]
9494 S = [" All constraints" , " free" , " lower" , " upper" , " low/upp" , " fixed" , " infeas" ]
9595 conlines = lines_of_hist (S, V)
96- push! (conlines, histline (" linear" , m. nlin, m. ncon), histline (" nonlinear" , m. nnln, m. ncon))
97- push! (conlines, sparsityline (" nnzj" , m. nnzj, m. nvar * m. ncon))
96+
97+ append! (
98+ conlines,
99+ [
100+ histline (" linear" , m. nlin, m. ncon),
101+ histline (" nonlinear" , m. nnln, m. ncon),
102+ sparsityline (" nnzj" , m. nnzj, m. nvar * m. ncon),
103+ ],
104+ )
105+
106+ if :lin_nnzj in fieldnames (M)
107+ push! (conlines, sparsityline (" lin_nnzj" , m. lin_nnzj, m. nlin * m. nvar))
108+ end
109+ if :nln_nnzj in fieldnames (M)
110+ push! (conlines, sparsityline (" nln_nnzj" , m. nln_nnzj, m. nnln * m. nvar))
111+ end
98112
99113 append! (varlines, repeat ([" " ^ length (varlines[1 ])], length (conlines) - length (varlines)))
100114 lines = varlines .* conlines
0 commit comments