From 41cbf79f439f95aa5e803b8d504d9af4398b78c4 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 10:13:51 +0530 Subject: [PATCH 01/40] Update api.jl --- src/nlp/api.jl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/nlp/api.jl b/src/nlp/api.jl index 4ba6bc60..46812e8e 100644 --- a/src/nlp/api.jl +++ b/src/nlp/api.jl @@ -1344,6 +1344,30 @@ function hess_op!( return LinearOperator{T}(nlp.meta.nvar, nlp.meta.nvar, true, true, prod!, prod!, prod!) end +""" + varscale(model::AbstractNLPModel) + +Return a vector containing the scaling factors for each variable in the model. +This is typically used to normalize variables for numerical stability in solvers. + +By default, the scaling is model-dependent. If not overridden by the model, a vector of ones +is returned. Inspired by the AMPL scaling conventions. +""" function varscale end + +""" + lagscale(model::AbstractNLPModel) + +Return a vector of scaling factors for the Lagrange multipliers associated with constraints. +This can be used to improve numerical stability or condition number when solving KKT systems. +""" function lagscale end + +""" + conscale(model::AbstractNLPModel) + +Return a vector of constraint scaling factors for the model. +These are typically used to normalize constraints to have similar magnitudes and improve +convergence behavior in nonlinear solvers. +""" function conscale end From 3d4a109b6c2bff1927a14592c79cd1bd62aeed7c Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 10:18:22 +0530 Subject: [PATCH 02/40] Update show.jl --- src/nlp/show.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index 7970e4be..de325206 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -96,6 +96,9 @@ function lines_of_description(m::AbstractNLPModelMeta) push!(conlines, histline("linear", m.nlin, m.ncon), histline("nonlinear", m.nnln, m.ncon)) push!(conlines, sparsityline("nnzj", m.nnzj, m.nvar * m.ncon)) + push!(conlines, sparsityline("lin_nnzj", m.lin_nnzj, m.nvar * m.ncon)) + push!(conlines, sparsityline("nln_nnzj", m.nln_nnzj, m.nvar * m.ncon)) + append!(varlines, repeat([" "^length(varlines[1])], length(conlines) - length(varlines))) lines = varlines .* conlines From 7117f91aa2eaf131fee41eff4928a229ada5582c Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 10:38:06 +0530 Subject: [PATCH 03/40] Update show.jl --- test/nlp/show.jl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 9ce7e6f3..44c77165 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -25,7 +25,11 @@ jprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 """ - @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) + @assert length(splitlines(showed)) >= length(splitlines(expected)) + @inbounds for (sline, eline) in zip(splitlines(showed), splitlines(expected)) + @test startswith(strip(sline), strip(eline)) + end + io = IOBuffer() show(io, NLPModelMeta(1)) @@ -41,5 +45,7 @@ nnzh: ( 0.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzj: (------% sparsity)\n\n""" - @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) -end + @assert length(splitlines(showed)) >= length(splitlines(expected)) + @inbounds for (sline, eline) in zip(splitlines(showed), splitlines(expected)) + @test startswith(strip(sline), strip(eline)) + end From f32d6d57aca2696c784a002a492b59ef550cbe83 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 10:39:10 +0530 Subject: [PATCH 04/40] Update show.jl --- test/nlp/show.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 44c77165..633b56f3 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -49,3 +49,4 @@ @inbounds for (sline, eline) in zip(splitlines(showed), splitlines(expected)) @test startswith(strip(sline), strip(eline)) end +end From c6270477730cb1eb6314f53858c285a4a57540ce Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 10:43:59 +0530 Subject: [PATCH 05/40] Update show.jl --- test/nlp/show.jl | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 633b56f3..01f7bb8c 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -25,10 +25,7 @@ jprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 """ - @assert length(splitlines(showed)) >= length(splitlines(expected)) - @inbounds for (sline, eline) in zip(splitlines(showed), splitlines(expected)) - @test startswith(strip(sline), strip(eline)) - end + @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) io = IOBuffer() @@ -45,8 +42,5 @@ nnzh: ( 0.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzj: (------% sparsity)\n\n""" - @assert length(splitlines(showed)) >= length(splitlines(expected)) - @inbounds for (sline, eline) in zip(splitlines(showed), splitlines(expected)) - @test startswith(strip(sline), strip(eline)) - end + @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) end From 2bbbaa0235e01374203972782d06e57cdf8fb97b Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 10:44:20 +0530 Subject: [PATCH 06/40] Update show.jl --- test/nlp/show.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 01f7bb8c..9e007efc 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -25,7 +25,7 @@ jprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 """ - @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) + @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) io = IOBuffer() @@ -42,5 +42,5 @@ nnzh: ( 0.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzj: (------% sparsity)\n\n""" - @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) + @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) end From 9dbdedfb61182a49571c2a468c7d8bc05e7c07bb Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 10:44:37 +0530 Subject: [PATCH 07/40] Update show.jl --- test/nlp/show.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 9e007efc..9ce7e6f3 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -27,7 +27,6 @@ jhess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 """ @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) - io = IOBuffer() show(io, NLPModelMeta(1)) showed = String(take!(io)) From 1930ea4f85fa6ddbfe039cf246e15a1cca685458 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 10:46:32 +0530 Subject: [PATCH 08/40] Update show.jl --- src/nlp/show.jl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index de325206..2b08ad36 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -93,12 +93,20 @@ function lines_of_description(m::AbstractNLPModelMeta) V = [sum(V); V] S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] conlines = lines_of_hist(S, V) - push!(conlines, histline("linear", m.nlin, m.ncon), histline("nonlinear", m.nnln, m.ncon)) - push!(conlines, sparsityline("nnzj", m.nnzj, m.nvar * m.ncon)) - push!(conlines, sparsityline("lin_nnzj", m.lin_nnzj, m.nvar * m.ncon)) - push!(conlines, sparsityline("nln_nnzj", m.nln_nnzj, m.nvar * m.ncon)) + # Match expected output: linear / nonlinear / nnzj + push!(conlines, histline("linear", m.nlin, m.ncon)) + push!(conlines, histline("nonlinear", m.nnln, m.ncon)) + # Now manually format nnzj line to match expected output + if !isnothing(m.nnzj) + perc = 100 * m.nnzj / max(1, m.nvar * m.ncon) + push!(conlines, @sprintf(" %56s: (%6.2f%% sparsity) %4d", "nnzj", perc, m.nnzj)) + else + push!(conlines, @sprintf(" %56s: (%6s sparsity)", "nnzj", "------%")) + end + + # Align varlines and conlines append!(varlines, repeat([" "^length(varlines[1])], length(conlines) - length(varlines))) lines = varlines .* conlines From 9162e5d6c0b70db864991154574f0a7d37b14501 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 10:52:47 +0530 Subject: [PATCH 09/40] Update show.jl --- src/nlp/show.jl | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index 2b08ad36..308978d2 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -93,20 +93,22 @@ function lines_of_description(m::AbstractNLPModelMeta) V = [sum(V); V] S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] conlines = lines_of_hist(S, V) - - # Match expected output: linear / nonlinear / nnzj push!(conlines, histline("linear", m.nlin, m.ncon)) push!(conlines, histline("nonlinear", m.nnln, m.ncon)) + + if !isnothing(m.nnzj) + total = m.nvar * m.ncon + if total > 0 + perc = 100 * m.nnzj / total + push!(conlines, @sprintf(" %56s: (%6.2f%% sparsity) %4d", "nnzj", perc, m.nnzj)) + else + # Defined nnzj, but zero denominator (nvar * ncon == 0) + push!(conlines, @sprintf(" %56s: (%6s sparsity) %4d", "nnzj", "------%", m.nnzj)) + end + else + push!(conlines, @sprintf(" %56s: (%6s sparsity)", "nnzj", "------%")) + end - # Now manually format nnzj line to match expected output - if !isnothing(m.nnzj) - perc = 100 * m.nnzj / max(1, m.nvar * m.ncon) - push!(conlines, @sprintf(" %56s: (%6.2f%% sparsity) %4d", "nnzj", perc, m.nnzj)) - else - push!(conlines, @sprintf(" %56s: (%6s sparsity)", "nnzj", "------%")) - end - - # Align varlines and conlines append!(varlines, repeat([" "^length(varlines[1])], length(conlines) - length(varlines))) lines = varlines .* conlines From 7106d914db2314198383052aea38f84a5ea0122c Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 11:03:00 +0530 Subject: [PATCH 10/40] Update show.jl --- src/nlp/show.jl | 85 ++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 44 deletions(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index 308978d2..1c157b18 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -69,50 +69,47 @@ end Describe `meta` for the `show` function. """ function lines_of_description(m::AbstractNLPModelMeta) - V = [ - length(m.ifree), - length(m.ilow), - length(m.iupp), - length(m.irng), - length(m.ifix), - length(m.iinf), - ] - V = [sum(V); V] - S = ["All variables", "free", "lower", "upper", "low/upp", "fixed", "infeas"] - varlines = lines_of_hist(S, V) - push!(varlines, sparsityline("nnzh", m.nnzh, m.nvar * (m.nvar + 1) / 2)) - - V = [ - length(m.jfree), - length(m.jlow), - length(m.jupp), - length(m.jrng), - length(m.jfix), - length(m.jinf), - ] - V = [sum(V); V] - S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] - conlines = lines_of_hist(S, V) - push!(conlines, histline("linear", m.nlin, m.ncon)) - push!(conlines, histline("nonlinear", m.nnln, m.ncon)) - - if !isnothing(m.nnzj) - total = m.nvar * m.ncon - if total > 0 - perc = 100 * m.nnzj / total - push!(conlines, @sprintf(" %56s: (%6.2f%% sparsity) %4d", "nnzj", perc, m.nnzj)) - else - # Defined nnzj, but zero denominator (nvar * ncon == 0) - push!(conlines, @sprintf(" %56s: (%6s sparsity) %4d", "nnzj", "------%", m.nnzj)) - end - else - push!(conlines, @sprintf(" %56s: (%6s sparsity)", "nnzj", "------%")) - end - - append!(varlines, repeat([" "^length(varlines[1])], length(conlines) - length(varlines))) - lines = varlines .* conlines - - return lines + # Variable structure histogram + V = [ + length(m.ifree), + length(m.ilow), + length(m.iupp), + length(m.irng), + length(m.ifix), + length(m.iinf), + ] + V = [sum(V); V] + S = ["All variables", "free", "lower", "upper", "low/upp", "fixed", "infeas"] + varlines = lines_of_hist(S, V) + push!(varlines, sparsityline("nnzh", m.nnzh, m.nvar * (m.nvar + 1) ÷ 2)) + + # Constraint structure histogram + V = [ + length(m.jfree), + length(m.jlow), + length(m.jupp), + length(m.jrng), + length(m.jfix), + length(m.jinf), + ] + V = [sum(V); V] + S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] + conlines = lines_of_hist(S, V) + + # Additional constraint info + append!(conlines, [ + histline("linear", m.nlin, m.ncon), + histline("nonlinear", m.nnln, m.ncon), + sparsityline("nnzj", m.nnzj, m.nvar * m.ncon), + sparsityline("lin_nnzj", get(m, :lin_nnzj, 0), m.nlin * m.nvar), + sparsityline("nln_nnzj", get(m, :nln_nnzj, 0), m.nnln * m.nvar), + ]) + + # Pad variable lines + append!(varlines, repeat([" "^length(varlines[1])], length(conlines) - length(varlines))) + lines = varlines .* conlines + + return lines end function Base.show(io::IO, m::AbstractNLPModelMeta) From 87e998daac88f890ec70fbbe7ffc55efbffa53c2 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 11:12:39 +0530 Subject: [PATCH 11/40] Update show.jl --- src/nlp/show.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index 1c157b18..17203808 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -69,7 +69,6 @@ end Describe `meta` for the `show` function. """ function lines_of_description(m::AbstractNLPModelMeta) - # Variable structure histogram V = [ length(m.ifree), length(m.ilow), @@ -83,7 +82,6 @@ function lines_of_description(m::AbstractNLPModelMeta) varlines = lines_of_hist(S, V) push!(varlines, sparsityline("nnzh", m.nnzh, m.nvar * (m.nvar + 1) ÷ 2)) - # Constraint structure histogram V = [ length(m.jfree), length(m.jlow), @@ -96,16 +94,18 @@ function lines_of_description(m::AbstractNLPModelMeta) S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] conlines = lines_of_hist(S, V) - # Additional constraint info + # Extract lin_nnzj and nln_nnzj if available + lin_nnzj = try getfield(m, :lin_nnzj) catch; 0 end + nln_nnzj = try getfield(m, :nln_nnzj) catch; 0 end + append!(conlines, [ histline("linear", m.nlin, m.ncon), histline("nonlinear", m.nnln, m.ncon), sparsityline("nnzj", m.nnzj, m.nvar * m.ncon), - sparsityline("lin_nnzj", get(m, :lin_nnzj, 0), m.nlin * m.nvar), - sparsityline("nln_nnzj", get(m, :nln_nnzj, 0), m.nnln * m.nvar), + sparsityline("lin_nnzj", lin_nnzj, m.nlin * m.nvar), + sparsityline("nln_nnzj", nln_nnzj, m.nnln * m.nvar), ]) - # Pad variable lines append!(varlines, repeat([" "^length(varlines[1])], length(conlines) - length(varlines))) lines = varlines .* conlines From ff0d4611e3aed7fa600ebfe140063a8847778329 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 20:51:22 +0530 Subject: [PATCH 12/40] Update show.jl --- src/nlp/show.jl | 86 +++++++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 39 deletions(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index 17203808..dcf3eb2b 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -69,47 +69,55 @@ end Describe `meta` for the `show` function. """ function lines_of_description(m::AbstractNLPModelMeta) - V = [ - length(m.ifree), - length(m.ilow), - length(m.iupp), - length(m.irng), - length(m.ifix), - length(m.iinf), - ] - V = [sum(V); V] - S = ["All variables", "free", "lower", "upper", "low/upp", "fixed", "infeas"] - varlines = lines_of_hist(S, V) - push!(varlines, sparsityline("nnzh", m.nnzh, m.nvar * (m.nvar + 1) ÷ 2)) - - V = [ - length(m.jfree), - length(m.jlow), - length(m.jupp), - length(m.jrng), - length(m.jfix), - length(m.jinf), - ] - V = [sum(V); V] - S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] - conlines = lines_of_hist(S, V) - - # Extract lin_nnzj and nln_nnzj if available - lin_nnzj = try getfield(m, :lin_nnzj) catch; 0 end - nln_nnzj = try getfield(m, :nln_nnzj) catch; 0 end - + V = [ + length(m.ifree), + length(m.ilow), + length(m.iupp), + length(m.irng), + length(m.ifix), + length(m.iinf), + ] + V = [sum(V); V] + S = ["All variables", "free", "lower", "upper", "low/upp", "fixed", "infeas"] + varlines = lines_of_hist(S, V) + push!(varlines, sparsityline("nnzh", m.nnzh, m.nvar * (m.nvar + 1) / 2)) + + V = [ + length(m.jfree), + length(m.jlow), + length(m.jupp), + length(m.jrng), + length(m.jfix), + length(m.jinf), + ] + V = [sum(V); V] + S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] + conlines = lines_of_hist(S, V) append!(conlines, [ - histline("linear", m.nlin, m.ncon), - histline("nonlinear", m.nnln, m.ncon), - sparsityline("nnzj", m.nnzj, m.nvar * m.ncon), - sparsityline("lin_nnzj", lin_nnzj, m.nlin * m.nvar), - sparsityline("nln_nnzj", nln_nnzj, m.nnln * m.nvar), - ]) - - append!(varlines, repeat([" "^length(varlines[1])], length(conlines) - length(varlines))) - lines = varlines .* conlines + histline("linear", m.nlin, m.ncon), + histline("nonlinear", m.nnln, m.ncon), + sparsityline("nnzj", m.nnzj, m.nvar * m.ncon), + ]) + + if :lin_nnzj in fieldnames(typeof(m)) + append!(conlines, [ + sparsityline("lin_nnzj", getfield(m, :lin_nnzj), m.nlin * m.nvar), + ]) + end + + if :nln_nnzj in fieldnames(typeof(m)) + append!(conlines, [ + sparsityline("nln_nnzj", getfield(m, :nln_nnzj), m.nnln * m.nvar), + ]) + end + + push!(conlines, histline("linear", m.nlin, m.ncon), histline("nonlinear", m.nnln, m.ncon)) + push!(conlines, sparsityline("nnzj", m.nnzj, m.nvar * m.ncon)) + + append!(varlines, repeat([" "^length(varlines[1])], length(conlines) - length(varlines))) + lines = varlines .* conlines - return lines + return lines end function Base.show(io::IO, m::AbstractNLPModelMeta) From b5f853e441af97ba4eb48d8a0ad4ecf5c2358a00 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 21:59:53 +0530 Subject: [PATCH 13/40] Update show.jl --- src/nlp/show.jl | 78 +++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index dcf3eb2b..519274d6 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -69,55 +69,57 @@ end Describe `meta` for the `show` function. """ function lines_of_description(m::AbstractNLPModelMeta) - V = [ - length(m.ifree), - length(m.ilow), - length(m.iupp), - length(m.irng), - length(m.ifix), - length(m.iinf), - ] - V = [sum(V); V] - S = ["All variables", "free", "lower", "upper", "low/upp", "fixed", "infeas"] - varlines = lines_of_hist(S, V) - push!(varlines, sparsityline("nnzh", m.nnzh, m.nvar * (m.nvar + 1) / 2)) - - V = [ - length(m.jfree), - length(m.jlow), - length(m.jupp), - length(m.jrng), - length(m.jfix), - length(m.jinf), - ] - V = [sum(V); V] - S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] - conlines = lines_of_hist(S, V) + V = [ + length(m.ifree), + length(m.ilow), + length(m.iupp), + length(m.irng), + length(m.ifix), + length(m.iinf), + ] + V = [sum(V); V] + S = ["All variables", "free", "lower", "upper", "low/upp", "fixed", "infeas"] + varlines = lines_of_hist(S, V) + push!(varlines, sparsityline("nnzh", m.nnzh, m.nvar * (m.nvar + 1) / 2)) + + V = [ + length(m.jfree), + length(m.jlow), + length(m.jupp), + length(m.jrng), + length(m.jfix), + length(m.jinf), + ] + V = [sum(V); V] + S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] + conlines = lines_of_hist(S, V) + append!(conlines, [ - histline("linear", m.nlin, m.ncon), - histline("nonlinear", m.nnln, m.ncon), - sparsityline("nnzj", m.nnzj, m.nvar * m.ncon), - ]) - + histline("linear", m.nlin, m.ncon), + histline("nonlinear", m.nnln, m.ncon), + sparsityline("nnzj", m.nnzj, m.nvar * m.ncon), + ]) + if :lin_nnzj in fieldnames(typeof(m)) append!(conlines, [ - sparsityline("lin_nnzj", getfield(m, :lin_nnzj), m.nlin * m.nvar), - ]) + sparsityline("lin_nnzj", getfield(m, :lin_nnzj), m.nlin * m.nvar), + ]) end - if :nln_nnzj in fieldnames(typeof(m)) append!(conlines, [ sparsityline("nln_nnzj", getfield(m, :nln_nnzj), m.nnln * m.nvar), ]) end - push!(conlines, histline("linear", m.nlin, m.ncon), histline("nonlinear", m.nnln, m.ncon)) - push!(conlines, sparsityline("nnzj", m.nnzj, m.nvar * m.ncon)) - - append!(varlines, repeat([" "^length(varlines[1])], length(conlines) - length(varlines))) - lines = varlines .* conlines + maxlen = max(length(varlines), length(conlines)) + while length(varlines) < maxlen + push!(varlines, " "^length(varlines[1])) + end + while length(conlines) < maxlen + push!(conlines, " "^length(conlines[1])) + end - return lines + return varlines .* conlines end function Base.show(io::IO, m::AbstractNLPModelMeta) From 3f97141325d6da5033ea7079f1baf2d6d9942e6c Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 22:01:49 +0530 Subject: [PATCH 14/40] Update show.jl --- src/nlp/show.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index 519274d6..bb773062 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -105,6 +105,7 @@ function lines_of_description(m::AbstractNLPModelMeta) sparsityline("lin_nnzj", getfield(m, :lin_nnzj), m.nlin * m.nvar), ]) end + if :nln_nnzj in fieldnames(typeof(m)) append!(conlines, [ sparsityline("nln_nnzj", getfield(m, :nln_nnzj), m.nnln * m.nvar), From 21ee53f591c83ed9681a614bb989965736edcf15 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 22:03:26 +0530 Subject: [PATCH 15/40] Update show.jl --- src/nlp/show.jl | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index bb773062..80343de2 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -69,7 +69,7 @@ end Describe `meta` for the `show` function. """ function lines_of_description(m::AbstractNLPModelMeta) - V = [ + V = [ length(m.ifree), length(m.ilow), length(m.iupp), @@ -77,12 +77,12 @@ function lines_of_description(m::AbstractNLPModelMeta) length(m.ifix), length(m.iinf), ] - V = [sum(V); V] - S = ["All variables", "free", "lower", "upper", "low/upp", "fixed", "infeas"] - varlines = lines_of_hist(S, V) - push!(varlines, sparsityline("nnzh", m.nnzh, m.nvar * (m.nvar + 1) / 2)) + V = [sum(V); V] + S = ["All variables", "free", "lower", "upper", "low/upp", "fixed", "infeas"] + varlines = lines_of_hist(S, V) + push!(varlines, sparsityline("nnzh", m.nnzh, m.nvar * (m.nvar + 1) / 2)) - V = [ + V = [ length(m.jfree), length(m.jlow), length(m.jupp), @@ -90,37 +90,37 @@ function lines_of_description(m::AbstractNLPModelMeta) length(m.jfix), length(m.jinf), ] - V = [sum(V); V] - S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] - conlines = lines_of_hist(S, V) + V = [sum(V); V] + S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] + conlines = lines_of_hist(S, V) - append!(conlines, [ + append!(conlines, [ histline("linear", m.nlin, m.ncon), histline("nonlinear", m.nnln, m.ncon), sparsityline("nnzj", m.nnzj, m.nvar * m.ncon), ]) - if :lin_nnzj in fieldnames(typeof(m)) + if :lin_nnzj in fieldnames(typeof(m)) append!(conlines, [ sparsityline("lin_nnzj", getfield(m, :lin_nnzj), m.nlin * m.nvar), ]) - end + end - if :nln_nnzj in fieldnames(typeof(m)) + if :nln_nnzj in fieldnames(typeof(m)) append!(conlines, [ sparsityline("nln_nnzj", getfield(m, :nln_nnzj), m.nnln * m.nvar), ]) - end + end - maxlen = max(length(varlines), length(conlines)) - while length(varlines) < maxlen + maxlen = max(length(varlines), length(conlines)) + while length(varlines) < maxlen push!(varlines, " "^length(varlines[1])) - end - while length(conlines) < maxlen + end + while length(conlines) < maxlen push!(conlines, " "^length(conlines[1])) - end + end - return varlines .* conlines + return varlines .* conlines end function Base.show(io::IO, m::AbstractNLPModelMeta) From 54c2c9692f2c85c14841c7b01f8eefb5bc08d289 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 22:09:40 +0530 Subject: [PATCH 16/40] Update show.jl From e597add282cf7f9626c810adfc111e68d1b6f64f Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Thu, 3 Jul 2025 22:32:42 +0530 Subject: [PATCH 17/40] Update show.jl --- src/nlp/show.jl | 103 ++++++++++++++++++++++++------------------------ 1 file changed, 51 insertions(+), 52 deletions(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index 80343de2..2a9938cc 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -69,58 +69,57 @@ end Describe `meta` for the `show` function. """ function lines_of_description(m::AbstractNLPModelMeta) - V = [ - length(m.ifree), - length(m.ilow), - length(m.iupp), - length(m.irng), - length(m.ifix), - length(m.iinf), - ] - V = [sum(V); V] - S = ["All variables", "free", "lower", "upper", "low/upp", "fixed", "infeas"] - varlines = lines_of_hist(S, V) - push!(varlines, sparsityline("nnzh", m.nnzh, m.nvar * (m.nvar + 1) / 2)) - - V = [ - length(m.jfree), - length(m.jlow), - length(m.jupp), - length(m.jrng), - length(m.jfix), - length(m.jinf), - ] - V = [sum(V); V] - S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] - conlines = lines_of_hist(S, V) - - append!(conlines, [ - histline("linear", m.nlin, m.ncon), - histline("nonlinear", m.nnln, m.ncon), - sparsityline("nnzj", m.nnzj, m.nvar * m.ncon), - ]) - - if :lin_nnzj in fieldnames(typeof(m)) - append!(conlines, [ - sparsityline("lin_nnzj", getfield(m, :lin_nnzj), m.nlin * m.nvar), - ]) - end - - if :nln_nnzj in fieldnames(typeof(m)) - append!(conlines, [ - sparsityline("nln_nnzj", getfield(m, :nln_nnzj), m.nnln * m.nvar), - ]) - end - - maxlen = max(length(varlines), length(conlines)) - while length(varlines) < maxlen - push!(varlines, " "^length(varlines[1])) - end - while length(conlines) < maxlen - push!(conlines, " "^length(conlines[1])) - end - - return varlines .* conlines + V = [ + length(m.ifree), + length(m.ilow), + length(m.iupp), + length(m.irng), + length(m.ifix), + length(m.iinf), + ] + V = [sum(V); V] + S = ["All variables", "free", "lower", "upper", "low/upp", "fixed", "infeas"] + varlines = lines_of_hist(S, V) + push!(varlines, sparsityline("nnzh", m.nnzh, m.nvar * (m.nvar + 1) / 2)) + + V = [ + length(m.jfree), + length(m.jlow), + length(m.jupp), + length(m.jrng), + length(m.jfix), + length(m.jinf), + ] + V = [sum(V); V] + S = ["All constraints", "free", "lower", "upper", "low/upp", "fixed", "infeas"] + conlines = lines_of_hist(S, V) + + append!( + conlines, + [ + histline("linear", m.nlin, m.ncon), + histline("nonlinear", m.nnln, m.ncon), + sparsityline("nnzj", m.nnzj, m.nvar * m.ncon), + ], + ) + + if :lin_nnzj in fieldnames(typeof(m)) + append!(conlines, [sparsityline("lin_nnzj", getfield(m, :lin_nnzj), m.nlin * m.nvar)]) + end + + if :nln_nnzj in fieldnames(typeof(m)) + append!(conlines, [sparsityline("nln_nnzj", getfield(m, :nln_nnzj), m.nnln * m.nvar)]) + end + + maxlen = max(length(varlines), length(conlines)) + while length(varlines) < maxlen + push!(varlines, " "^length(varlines[1])) + end + while length(conlines) < maxlen + push!(conlines, " "^length(conlines[1])) + end + + return varlines .* conlines end function Base.show(io::IO, m::AbstractNLPModelMeta) From 122ab796f48a2d819e219977cd60f54a6ef93050 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 14:31:05 +0530 Subject: [PATCH 18/40] Update src/nlp/show.jl Co-authored-by: Tangi Migot --- src/nlp/show.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index 2a9938cc..b41c0dff 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -108,7 +108,7 @@ function lines_of_description(m::AbstractNLPModelMeta) end if :nln_nnzj in fieldnames(typeof(m)) - append!(conlines, [sparsityline("nln_nnzj", getfield(m, :nln_nnzj), m.nnln * m.nvar)]) + push!(conlines, sparsityline("nln_nnzj", m.nln_nnzj, m.nnln * m.nvar)) end maxlen = max(length(varlines), length(conlines)) From b3c27629274783ae650ec756a1243c0c0840c8f7 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 14:31:27 +0530 Subject: [PATCH 19/40] Update src/nlp/show.jl Co-authored-by: Tangi Migot --- src/nlp/show.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index b41c0dff..f7462373 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -104,7 +104,7 @@ function lines_of_description(m::AbstractNLPModelMeta) ) if :lin_nnzj in fieldnames(typeof(m)) - append!(conlines, [sparsityline("lin_nnzj", getfield(m, :lin_nnzj), m.nlin * m.nvar)]) + push!(conlines, sparsityline("lin_nnzj", m.lin_nnzj, m.nlin * m.nvar)) end if :nln_nnzj in fieldnames(typeof(m)) From 64cf0f019ac6021e3f19cd405b4334eec37b4178 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 14:40:32 +0530 Subject: [PATCH 20/40] Update show.jl --- src/nlp/show.jl | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index f7462373..ec9cf187 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -68,7 +68,7 @@ end Describe `meta` for the `show` function. """ -function lines_of_description(m::AbstractNLPModelMeta) +function lines_of_description(m::M) where {M <: AbstractNLPModelMeta} V = [ length(m.ifree), length(m.ilow), @@ -106,20 +106,14 @@ function lines_of_description(m::AbstractNLPModelMeta) if :lin_nnzj in fieldnames(typeof(m)) push!(conlines, sparsityline("lin_nnzj", m.lin_nnzj, m.nlin * m.nvar)) end - if :nln_nnzj in fieldnames(typeof(m)) push!(conlines, sparsityline("nln_nnzj", m.nln_nnzj, m.nnln * m.nvar)) end - maxlen = max(length(varlines), length(conlines)) - while length(varlines) < maxlen - push!(varlines, " "^length(varlines[1])) - end - while length(conlines) < maxlen - push!(conlines, " "^length(conlines[1])) - end + append!(varlines, repeat([" "^length(varlines[1])], length(conlines) - length(varlines))) + lines = varlines .* conlines - return varlines .* conlines + return lines end function Base.show(io::IO, m::AbstractNLPModelMeta) From d7751ea94a61b2344cc909e6f9bdb676dc99f855 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 15:15:43 +0530 Subject: [PATCH 21/40] Update show.jl --- test/nlp/show.jl | 61 ++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 9ce7e6f3..1a2ca7f7 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -5,41 +5,42 @@ showed = String(take!(io)) storage_type = typeof(nlp) expected = """ $storage_type - Problem name: Simple NLP Model - All variables: ████████████████████ 2 All constraints: ████████████████████ 2 - free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - low/upp: ████████████████████ 2 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nonlinear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nnzj: ( 0.00% sparsity) 4 + Problem name: Simple NLP Model + All variables: ████████████████████ 2 All constraints: ████████████████████ 2 + free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + low/upp: ████████████████████ 2 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + nonlinear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + nnzj: ( 0.00% sparsity) 4 - Counters: - obj: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 grad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - cons_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jcon: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - jgrad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - jac_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - jprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - jtprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - jhess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 """ + Counters: + obj: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 grad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + cons_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jcon: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + jgrad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + jprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 +jtprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + jhess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 """ @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) io = IOBuffer() show(io, NLPModelMeta(1)) showed = String(take!(io)) - expected = """ Problem name: Generic - All variables: ████████████████████ 1 All constraints: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - free: ████████████████████ 1 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzh: ( 0.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzj: (------% sparsity)\n\n""" + expected = """ Problem name: Generic + All variables: ████████████████████ 1 All constraints: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + free: ████████████████████ 1 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nnzh: ( 0.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nnzj: (------% sparsity) 0 + """ @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) end + From 33c9921bc3b93eb14b957011700ecec309e78673 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 15:18:09 +0530 Subject: [PATCH 22/40] Update show.jl --- test/nls/show.jl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/nls/show.jl b/test/nls/show.jl index 62766237..8d89904d 100644 --- a/test/nls/show.jl +++ b/test/nls/show.jl @@ -33,10 +33,12 @@ io = IOBuffer() show(io, NLSMeta(1, 1)) showed = String(take!(io)) - expected = """ All residuals: ████████████████████ 1 - linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 -nonlinear: ████████████████████ 1 - nnzj: ( 0.00% sparsity) 1 - nnzh: ( 0.00% sparsity) 1\n\n""" + expected = """ + All residuals: ████████████████████ 1 + linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nonlinear: ████████████████████ 1 + nnzj: ( 0.00% sparsity) 1 + nnzh: ( 0.00% sparsity) 1 +""" @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) end From b6d28659b2898a4f4b84c84b49d73743f1ff20d4 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 15:30:35 +0530 Subject: [PATCH 23/40] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 930fe50f..7dea12ba 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,8 @@ Attribute | Type | Notes `ucon` | `S` | vector of constraint upper bounds `lin ` | `Vector{Int}` | indices of linear constraints `nln` | `Vector{Int}` | indices of nonlinear constraints +`lin_nnzj` | `Int ` | number of nonzeros in the linear part of sparse Jacobian +`nln_nnzj` | `Int ` | number of nonzeros in the nonlinear part of sparse Jacobian `jfix` | `Vector{Int}` | indices of equality constraints `jlow` | `Vector{Int}` | indices of constraints of the form c(x) ≥ cl `jupp` | `Vector{Int}` | indices of constraints of the form c(x) ≤ cu @@ -111,8 +113,10 @@ Attribute | Type | Notes `jfree` | `Vector{Int}` | indices of "free" constraints (there shouldn't be any) `jinf` | `Vector{Int}` | indices of the visibly infeasible constraints `nnzo` | `Int ` | number of nonzeros in the gradient -`nnzj` | `Int ` | number of nonzeros in the sparse Jacobian `nnzh` | `Int ` | number of nonzeros in the sparse Hessian +`nnzj` | `Int ` | number of nonzeros in the sparse Jacobian +`lin_nnzj` | `Int ` | number of nonzeros in the linear part of sparse Jacobian +`nln_nnzj` | `Int ` | number of nonzeros in the nonlinear part of sparse Jacobian `minimize` | `Bool ` | true if `optimize == minimize` `islp` | `Bool ` | true if the problem is a linear program `name` | `String` | problem name From 6d6fd7c7b1f09efc0ef2301fa010be9a72af06d8 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 15:31:26 +0530 Subject: [PATCH 24/40] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 7dea12ba..f25c2fc6 100644 --- a/README.md +++ b/README.md @@ -104,8 +104,6 @@ Attribute | Type | Notes `ucon` | `S` | vector of constraint upper bounds `lin ` | `Vector{Int}` | indices of linear constraints `nln` | `Vector{Int}` | indices of nonlinear constraints -`lin_nnzj` | `Int ` | number of nonzeros in the linear part of sparse Jacobian -`nln_nnzj` | `Int ` | number of nonzeros in the nonlinear part of sparse Jacobian `jfix` | `Vector{Int}` | indices of equality constraints `jlow` | `Vector{Int}` | indices of constraints of the form c(x) ≥ cl `jupp` | `Vector{Int}` | indices of constraints of the form c(x) ≤ cu From 7eb12877844f6be5d730d8445e6a353727820070 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 15:44:42 +0530 Subject: [PATCH 25/40] Update show.jl --- test/nlp/show.jl | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 1a2ca7f7..d53e17ad 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -7,23 +7,23 @@ expected = """ $storage_type Problem name: Simple NLP Model All variables: ████████████████████ 2 All constraints: ████████████████████ 2 - free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - low/upp: ████████████████████ 2 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nonlinear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nnzj: ( 0.00% sparsity) 4 + free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + low/upp: ████████████████████ 2 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + nonlinear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + nnzj: ( 0.00% sparsity) 4 Counters: obj: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 grad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - cons_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jcon: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - jgrad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - jprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 -jtprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - jhess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 """ + cons_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jcon: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + jgrad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + jprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + jtprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + jhess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 """ @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) io = IOBuffer() @@ -38,8 +38,8 @@ jtprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzh: ( 0.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzj: (------% sparsity) 0 + nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nnzj: (------% sparsity) 0 """ @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) end From 6f4c8a57a2218798e0dfc280249935f1a5382e08 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 15:48:06 +0530 Subject: [PATCH 26/40] Update show.jl --- test/nlp/show.jl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index d53e17ad..3c81511f 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -5,17 +5,17 @@ showed = String(take!(io)) storage_type = typeof(nlp) expected = """ $storage_type - Problem name: Simple NLP Model - All variables: ████████████████████ 2 All constraints: ████████████████████ 2 - free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - low/upp: ████████████████████ 2 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nonlinear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nnzj: ( 0.00% sparsity) 4 + Problem name: Simple NLP Model + All variables: ████████████████████ 2 All constraints: ████████████████████ 2 + free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + low/upp: ████████████████████ 2 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + nonlinear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + nnzj: ( 0.00% sparsity) 4 Counters: obj: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 grad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 From 197c9408af97491654fb66f0f5ba621694ee9a48 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 15:54:21 +0530 Subject: [PATCH 27/40] Update show.jl --- test/nlp/show.jl | 59 ++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 3c81511f..82f4d3cb 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -6,41 +6,40 @@ storage_type = typeof(nlp) expected = """ $storage_type Problem name: Simple NLP Model - All variables: ████████████████████ 2 All constraints: ████████████████████ 2 - free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - low/upp: ████████████████████ 2 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nonlinear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nnzj: ( 0.00% sparsity) 4 + All variables: ████████████████████ 2 All constraints: ████████████████████ 2 + free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + low/upp: ████████████████████ 2 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + nonlinear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + nnzj: ( 0.00% sparsity) 4 - Counters: - obj: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 grad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - cons_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jcon: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - jgrad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - jprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - jtprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - jhess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 """ + Counters: + obj: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 grad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + cons_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jcon: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + jgrad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jac_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + jac_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + jprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jtprod_lin: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + jtprod_nln: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 hprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + jhess: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 jhprod: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 """ @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) io = IOBuffer() show(io, NLPModelMeta(1)) showed = String(take!(io)) - expected = """ Problem name: Generic - All variables: ████████████████████ 1 All constraints: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - free: ████████████████████ 1 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzh: ( 0.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzj: (------% sparsity) 0 - """ + expected = """ Problem name: Generic + All variables: ████████████████████ 1 All constraints: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + free: ████████████████████ 1 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nnzh: ( 0.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nnzj: (------% sparsity) 0 \n\n""" @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) end - From 5ebdbb9933403998bbc296604e3dba0fe6ec8b5b Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 15:55:53 +0530 Subject: [PATCH 28/40] Update show.jl --- test/nls/show.jl | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/test/nls/show.jl b/test/nls/show.jl index 8d89904d..62766237 100644 --- a/test/nls/show.jl +++ b/test/nls/show.jl @@ -33,12 +33,10 @@ io = IOBuffer() show(io, NLSMeta(1, 1)) showed = String(take!(io)) - expected = """ - All residuals: ████████████████████ 1 - linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nonlinear: ████████████████████ 1 - nnzj: ( 0.00% sparsity) 1 - nnzh: ( 0.00% sparsity) 1 -""" + expected = """ All residuals: ████████████████████ 1 + linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 +nonlinear: ████████████████████ 1 + nnzj: ( 0.00% sparsity) 1 + nnzh: ( 0.00% sparsity) 1\n\n""" @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) end From 8f04cb5b18d9a393e11af2506f41b30233d02107 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 15:56:52 +0530 Subject: [PATCH 29/40] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f25c2fc6..3f0d14f2 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,8 @@ Attribute | Type | Notes `nnzo` | `Int ` | number of nonzeros in the gradient `nnzh` | `Int ` | number of nonzeros in the sparse Hessian `nnzj` | `Int ` | number of nonzeros in the sparse Jacobian -`lin_nnzj` | `Int ` | number of nonzeros in the linear part of sparse Jacobian -`nln_nnzj` | `Int ` | number of nonzeros in the nonlinear part of sparse Jacobian +`lin_nnzj`| `Int ` | number of nonzeros in the linear part of sparse Jacobian +`nln_nnzj`| `Int ` | number of nonzeros in the nonlinear part of sparse Jacobian `minimize` | `Bool ` | true if `optimize == minimize` `islp` | `Bool ` | true if the problem is a linear program `name` | `String` | problem name From 0d459dbab08018b1a79498fff4881ca174114098 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Fri, 4 Jul 2025 15:57:24 +0530 Subject: [PATCH 30/40] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3f0d14f2..1368a61b 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,8 @@ Attribute | Type | Notes `nnzo` | `Int ` | number of nonzeros in the gradient `nnzh` | `Int ` | number of nonzeros in the sparse Hessian `nnzj` | `Int ` | number of nonzeros in the sparse Jacobian -`lin_nnzj`| `Int ` | number of nonzeros in the linear part of sparse Jacobian -`nln_nnzj`| `Int ` | number of nonzeros in the nonlinear part of sparse Jacobian +`lin_nnzj` | `Int ` | number of nonzeros in the linear part of sparse Jacobian +`nln_nnzj` | `Int ` | number of nonzeros in the nonlinear part of sparse Jacobian `minimize` | `Bool ` | true if `optimize == minimize` `islp` | `Bool ` | true if the problem is a linear program `name` | `String` | problem name From c43bcc3eeaea4a5801a0e49896149286572c8ab6 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Sat, 5 Jul 2025 13:16:45 +0530 Subject: [PATCH 31/40] Update show.jl --- test/nlp/show.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 82f4d3cb..2442b444 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -15,7 +15,7 @@ infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 nonlinear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nnzj: ( 0.00% sparsity) 4 + nnzj: ( 0.00% sparsity) 2 Counters: obj: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 grad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 From 048c7e48a995503ce33abf18de31c49b4f191ce4 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Sat, 5 Jul 2025 13:30:18 +0530 Subject: [PATCH 32/40] Update show.jl --- test/nlp/show.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 2442b444..2815b3c9 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -15,7 +15,7 @@ infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 nonlinear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nnzj: ( 0.00% sparsity) 2 + nnzj: ( 0.00% sparsity) 4 Counters: obj: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 grad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 @@ -40,6 +40,6 @@ infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzh: ( 0.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzj: (------% sparsity) 0 \n\n""" + nnzj: (------% sparsity) 0 """ @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) end From 686998b722535d0d4962f305abce0589932188fa Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Sat, 5 Jul 2025 18:20:13 +0530 Subject: [PATCH 33/40] Update src/nlp/show.jl Co-authored-by: Tangi Migot --- src/nlp/show.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index ec9cf187..67c70109 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -103,7 +103,7 @@ function lines_of_description(m::M) where {M <: AbstractNLPModelMeta} ], ) - if :lin_nnzj in fieldnames(typeof(m)) + if :lin_nnzj in fieldnames(M) push!(conlines, sparsityline("lin_nnzj", m.lin_nnzj, m.nlin * m.nvar)) end if :nln_nnzj in fieldnames(typeof(m)) From 11e169dcfd62270eb38af9125ddec5ee6a6bfb87 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Sat, 5 Jul 2025 18:20:21 +0530 Subject: [PATCH 34/40] Update src/nlp/show.jl Co-authored-by: Tangi Migot --- src/nlp/show.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nlp/show.jl b/src/nlp/show.jl index 67c70109..ecc6f8c7 100644 --- a/src/nlp/show.jl +++ b/src/nlp/show.jl @@ -106,7 +106,7 @@ function lines_of_description(m::M) where {M <: AbstractNLPModelMeta} if :lin_nnzj in fieldnames(M) push!(conlines, sparsityline("lin_nnzj", m.lin_nnzj, m.nlin * m.nvar)) end - if :nln_nnzj in fieldnames(typeof(m)) + if :nln_nnzj in fieldnames(M) push!(conlines, sparsityline("nln_nnzj", m.nln_nnzj, m.nnln * m.nvar)) end From 502ceb26beb69c944052028e8eec9e8d736a611d Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Sat, 5 Jul 2025 18:40:14 +0530 Subject: [PATCH 35/40] Update show.jl --- test/nlp/show.jl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 2815b3c9..dc90ca6d 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -14,8 +14,7 @@ fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nonlinear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nnzj: ( 0.00% sparsity) 4 + nln_nnzj: ( 0.00% sparsity) 2 Counters: obj: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 grad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 @@ -39,7 +38,6 @@ fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzh: ( 0.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzj: (------% sparsity) 0 """ + nln_nnzj: (------% sparsity) 0 """ @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) end From 5753fb9a4ae87ce6d4cd8cd37a026e4e6fae17f9 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Sat, 5 Jul 2025 18:57:14 +0530 Subject: [PATCH 36/40] Update show.jl --- test/nlp/show.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index dc90ca6d..a4b0d018 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -5,16 +5,16 @@ showed = String(take!(io)) storage_type = typeof(nlp) expected = """ $storage_type - Problem name: Simple NLP Model - All variables: ████████████████████ 2 All constraints: ████████████████████ 2 - free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + Problem name: Generic + All variables: ████████████████████ 1 All constraints: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + free: ████████████████████ 1 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - low/upp: ████████████████████ 2 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 - nln_nnzj: ( 0.00% sparsity) 2 + nnzh: ( 100.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nln_nnzj: ( 0.00% sparsity) 0 Counters: obj: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 grad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 From 40e129abd7d350510a2d007af8e82a4910495a48 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Sat, 5 Jul 2025 20:12:52 +0530 Subject: [PATCH 37/40] Update show.jl --- test/nlp/show.jl | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index a4b0d018..2200fa77 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -5,16 +5,19 @@ showed = String(take!(io)) storage_type = typeof(nlp) expected = """ $storage_type - Problem name: Generic - All variables: ████████████████████ 1 All constraints: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - free: ████████████████████ 1 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + Problem name: Simple NLP Model + All variables: ████████████████████ 2 All constraints: ████████████████████ 2 + free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + low/upp: ████████████████████ 2 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nnzh: ( 100.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nln_nnzj: ( 0.00% sparsity) 0 + nnzh: ( 33.33% sparsity) 2 linear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + nonlinear: ██████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 + nnzj: ( 0.00% sparsity) 4 + lin_nnzj: ( 0.00% sparsity) 2 + nln_nnzj: ( 0.00% sparsity) 2 Counters: obj: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 grad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 @@ -38,6 +41,10 @@ fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzh: ( 0.00% sparsity) 1 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 - nln_nnzj: (------% sparsity) 0 """ + nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 + nnzj: (------% sparsity) + lin_nnzj: (------% sparsity) + nln_nnzj: (------% sparsity) +""" @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) end From e23b911f87e2b5d80fa55f5ac3b3ee6c61761ffc Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Sat, 5 Jul 2025 20:20:36 +0530 Subject: [PATCH 38/40] Update show.jl --- test/nls/show.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/nls/show.jl b/test/nls/show.jl index 62766237..6f25aaab 100644 --- a/test/nls/show.jl +++ b/test/nls/show.jl @@ -16,6 +16,8 @@ nnzh: ( 0.00% sparsity) 3 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nonlinear: ████████████████████ 3 nnzj: ( 0.00% sparsity) 6 + lin_nnzj: (------% sparsity) + nln_nnzj: ( 0.00% sparsity) 6 Counters: obj: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 grad: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 cons: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 From c9549945f7106154fca4573231c4e0c870ed6083 Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Sun, 6 Jul 2025 06:54:51 +0530 Subject: [PATCH 39/40] Update show.jl --- test/nlp/show.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 2200fa77..880aa82e 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -44,7 +44,7 @@ nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzj: (------% sparsity) lin_nnzj: (------% sparsity) - nln_nnzj: (------% sparsity) + nln_nnzj: (------% sparsity)\n\n""" """ @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) end From 9a7697ccee558a8e0c1529b4fb2aa9547a47aa5f Mon Sep 17 00:00:00 2001 From: Arnav Kapoor Date: Mon, 7 Jul 2025 07:12:21 +0530 Subject: [PATCH 40/40] Update show.jl --- test/nlp/show.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/test/nlp/show.jl b/test/nlp/show.jl index 880aa82e..281b9614 100644 --- a/test/nlp/show.jl +++ b/test/nlp/show.jl @@ -45,6 +45,5 @@ nnzj: (------% sparsity) lin_nnzj: (------% sparsity) nln_nnzj: (------% sparsity)\n\n""" -""" @test strip.(split(chomp(showed), "\n")) == strip.(split(chomp(expected), "\n")) end