From f027c6fc2a539299e68f00562a0d41e310573477 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Thu, 2 Jul 2026 14:08:07 -0400 Subject: [PATCH 01/35] update julia interfaces --- .gitignore | 4 + julia/examples/simple_test.jl | 17 +- julia/examples/simple_test2.jl | 40 ++++ julia/src/Marble.jl | 68 +++--- julia/src/conversion.jl | 180 ---------------- julia/src/jump_mpcc.jl | 367 +++++++++++++++++++-------------- 6 files changed, 301 insertions(+), 375 deletions(-) create mode 100644 julia/examples/simple_test2.jl delete mode 100644 julia/src/conversion.jl diff --git a/.gitignore b/.gitignore index eaddb0b..7039e12 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,7 @@ LocalPreferences.toml *.jl.cov *.jl.*.cov *.jl.mem + +# Testing +docs/ +proglogs/ \ No newline at end of file diff --git a/julia/examples/simple_test.jl b/julia/examples/simple_test.jl index 5ff8eb6..0d1cf53 100644 --- a/julia/examples/simple_test.jl +++ b/julia/examples/simple_test.jl @@ -1,7 +1,9 @@ -# Construct a simple test problem using JuMP minimizing x'x -# where x[1] = 1 +# Construct a simple test problem using JuMP. The problem is written as: +# min x'*x +# s.t. x[1] = 1 # x[2] ≥ 1 -# 0 ≤ (x[3] + 1) ⟂ (x[4] - 1) ≥ 0 --> solution is x[3] = 0, x[4] = 1 +# 0 ≤ (x[3] + 1) ⟂ (x[4] - 1) ≥ 0 +# The solution is x = [1, 1, 0, 1] with an objective of 3 using Pkg; Pkg.activate(@__DIR__) using Revise using JuMP, Marble, NLPModelsJuMP @@ -16,12 +18,15 @@ model = JuMP.Model() # For complementarities, we define each inequality and then specify indices # for the complementarity pairs -@constraint(model, x3_comp, x[3] + 1 >= 0) # x3_comp a constraint variable +@constraint(model, x3_comp, x[3] + 1 >= 0) @constraint(model, x4_comp, x[4] - 1 >= 0) -comps = con_con_complementarities(model, [x3_comp,], [x4_comp,]) + +mpcc = MPCC(model, + (model[:x3_comp], model[:x4_comp]) +) solver = Marble.Solver() -Marble.setup!(solver, model, first.(comps), last.(comps), [(:con, :con),]; verbosity = 1) +Marble.setup!(solver, mpcc; verbosity = 1) results = Marble.solve!(solver) z = Marble.z(results) diff --git a/julia/examples/simple_test2.jl b/julia/examples/simple_test2.jl new file mode 100644 index 0000000..98668fa --- /dev/null +++ b/julia/examples/simple_test2.jl @@ -0,0 +1,40 @@ +# Construct a simple test problem using JuMP. The problem is written as: +# min x'*x +# s.t. x[1] = 1 +# x[2] ≥ 1 +# 0 ≤ (x[3] + 1) ⟂ (x[4] - 1) ≥ 0 +# w ≥ 10 + +using Pkg; Pkg.activate(@__DIR__) +using Revise +using JuMP, Marble, NLPModelsJuMP + +# Construct problem using JuMP +model = JuMP.Model() + +@variable(model, x[1:4]) +@variable(model, w) +@objective(model, Min, x'*x) +@constraint(model, x[1] == 1) +@constraint(model, x[2] >= 1) +@constraint(model, w >= 10) + +# For complementarities, we define each inequality and then specify indices +# for the complementarity pairs +@constraint(model, x3_comp, x[3] + 1 >= 0) +@constraint(model, x4_comp, x[4] - 1 >= 0) + +mpcc = MPCC(model, + (model[:x3_comp], model[:x4_comp]) +) + +solver = Marble.Solver() +Marble.setup!(solver, mpcc; verbosity = 1) +results = Marble.solve!(solver) +z = Marble.z(results) + +println(z) +println(Marble.obj(solver, z)) +println(Marble.residual_eq(solver, z)) +println(Marble.residual_ineq(solver, z)) +println(Marble.residual_comp(solver, z)) \ No newline at end of file diff --git a/julia/src/Marble.jl b/julia/src/Marble.jl index 4a9b9aa..26bb770 100644 --- a/julia/src/Marble.jl +++ b/julia/src/Marble.jl @@ -15,21 +15,6 @@ module Marble @initcxx end - function setup!(solver::Marble.Solver,model::Model, ind_cc1, ind_cc2, cc_type; kwargs...) - Marble.update_settings!(solver; kwargs...) - setup!(solver, MathOptNLPModel(model), ind_cc1, ind_cc2, cc_type; kwargs...) - return nothing - end - - function setup!(solver::Marble.Solver,nlp::AbstractNLPModel, ind_cc1, ind_cc2, cc_type; kwargs...) - Marble.update_settings!(solver; kwargs...) - opts = Marble.options(solver) - data = jump_to_marble(nlp, ind_cc1, ind_cc2, cc_type) - _set_problem!(solver, opts, data.Q, data.q, data.c0, - data.J_eq, data.b_eq, data.J_ineq, data.b_ineq, data.L, data.l, data.R, data.r) - return nothing - end - function setup!(solver::Marble.Solver, Q::AbstractMatrix, q::AbstractVector, c0::Real=0.0; J_eq=nothing, b_eq=nothing, J_ineq=nothing, b_ineq=nothing, L=nothing, l=nothing, R=nothing, r=nothing, kwargs...) @@ -46,8 +31,8 @@ module Marble R = isnothing(R) ? zeros(0, n) : R r = isnothing(r) ? zeros(0) : r - _set_problem!(solver, opts, Q, q, Float64(c0), - J_eq, b_eq, J_ineq, b_ineq, L, l, R, r) + prob = Problem(Q, q, c0, J_eq, b_eq, J_ineq, b_ineq, L, l, R, r) + Marble.set_problem!(solver, prob, opts) return nothing end @@ -82,31 +67,28 @@ module Marble return nothing end - # Build a Marble.Problem (dense or sparse, based on storage) and hand it to the - # solver. When any block is sparse every block is converted to a SparseMatrixCSC - # so the solver sees consistent compressed-sparse data - function _set_problem!(solver::Marble.Solver, opts, Q, q, c0, - J_eq, b_eq, J_ineq, b_ineq, L, l, R, r) + # Build a Marble.Problem (dense or sparse, based on storage). When any block is + # sparse every block is converted to a SparseMatrixCSC so the solver sees + # consistent compressed-sparse data + function Problem(Q, q, c0, J_eq, b_eq, J_ineq, b_ineq, L, l, R, r) _validate_problem_dims(Q, q, J_eq, b_eq, J_ineq, b_ineq, L, l, R, r) blocks = (Q, J_eq, J_ineq, L, R) fvec(v) = collect(Float64, v) if any(b -> b isa AbstractSparseMatrix, blocks) Qs, Es, Is, Ls, Rs = sparse(Q), sparse(J_eq), sparse(J_ineq), sparse(L), sparse(R) - prob = Marble.Problem(size(Qs, 2), - Qs.colptr, Qs.rowval, Qs.nzval, fvec(q), c0, + return Marble.Problem(size(Qs, 2), + Qs.colptr, Qs.rowval, Qs.nzval, fvec(q), Float64(c0), size(Es, 1), Es.colptr, Es.rowval, Es.nzval, fvec(b_eq), size(Is, 1), Is.colptr, Is.rowval, Is.nzval, fvec(b_ineq), size(Ls, 1), Ls.colptr, Ls.rowval, Ls.nzval, fvec(l), Rs.colptr, Rs.rowval, Rs.nzval, fvec(r)) else fmat(M) = Matrix{Float64}(M) - prob = Marble.Problem( - fmat(Q), fvec(q), c0, + return Marble.Problem( + fmat(Q), fvec(q), Float64(c0), fmat(J_eq), fvec(b_eq), fmat(J_ineq), fvec(b_ineq), fmat(L), fvec(l), fmat(R), fvec(r)) end - Marble.set_problem!(solver, prob, opts) - return nothing end const OPTIONS = [ @@ -164,18 +146,36 @@ module Marble Base.propertynames(solver::Marble.Solver, private::Bool=false) = (:options, :problem,fieldnames(typeof(solver))...) obj(solver::Marble.Solver, z::Vector{Float64}) = Marble.obj(Marble.get_problem(solver), z) + obj(data::NamedTuple, z::Vector{Float64}) = Marble.obj(Problem(data...), z) + residual_eq(solver::Marble.Solver, z::Vector{Float64}) = Marble.residual_eq(Marble.get_problem(solver), z) + residual_eq(data::NamedTuple, z::Vector{Float64}) = Marble.residual_eq(Problem(data...), z) + residual_ineq(solver::Marble.Solver, z::Vector{Float64}) = Marble.residual_ineq(Marble.get_problem(solver), z) + residual_ineq(data::NamedTuple, z::Vector{Float64}) = Marble.residual_ineq(Problem(data...), z) + residual_comp(solver::Marble.Solver, z::Vector{Float64}) = Marble.residual_comp(Marble.get_problem(solver), z) + residual_comp(data::NamedTuple, z::Vector{Float64}) = Marble.residual_comp(Problem(data...), z) - # Utility functions for problem construction with JuMP + # Problem construction with JuMP: MPCC, complementarity indexing, and + # the conversion of an MPCC into the matrix/vector data Marble consumes. include("jump_mpcc.jl") - export nlp_con_row_map, nlp_var_col_map, var_var_complementarities, var_con_complementarities, con_con_complementarities - export var_inds, reformulate_sos1, reformulate_lie - # Functions to convert stuff to MarbleData - include("conversion.jl") - export jump_to_marble + export MPCC, complementarity_indices + export reformulate_sos1, var_inds + export mpcc_to_marble + + # Build a Marble problem from an MPCC (defined here since it depends on + # both MPCC/mpcc_to_marble above and the build_problem helper). + function setup!(solver::Marble.Solver, mpcc::MPCC; kwargs...) + Marble.update_settings!(solver; kwargs...) + opts = Marble.options(solver) + data = mpcc_to_marble(mpcc) + prob = Problem(data.Q, data.q, data.c0, + data.J_eq, data.b_eq, data.J_ineq, data.b_ineq, data.L, data.l, data.R, data.r) + Marble.set_problem!(solver, prob, opts) + return nothing + end # Debug log loader include("debug.jl") diff --git a/julia/src/conversion.jl b/julia/src/conversion.jl deleted file mode 100644 index ad75fd5..0000000 --- a/julia/src/conversion.jl +++ /dev/null @@ -1,180 +0,0 @@ -# function to_jump(marble_data::MarbleData) -# model = Model() - -# (; Q, q, c0, J_eq, b_eq, J_ineq, b_ineq, L, l, R, r) = marble_data - -# nvar = length(q) -# ncc = length(l) - -# @variable(model, x[1:nvar]) -# @variable(model, sL[1:ncc] >= 0) -# @variable(model, sR[1:ncc] >= 0) - -# # Quadratic objective -# @objective(model, Min, 1/2 * dot(x, Q, x) + q' * x + c0) - -# # Eq/Ineq constraints -# @constraints(model, begin -# J_eq * x + b_eq .== 0 -# J_ineq * x + b_ineq .>= 0 -# end) - -# # Complementarity slacks -# @constraints(model, begin -# L * x .+ l .== sL -# R * x .+ r .== sR -# end) - -# @constraint(model, [j = 1:ncc], [sL[j], sR[j]] in SOS1()) - -# return model -# end - -# Convert an NLPModels problem with linear constraints and complementarity pairs -# into the matrix/vector data Marble consumes -# -# `ind_cc1[j]` and `ind_cc2[j]` are the two endpoints of complementarity pair j, -# each addressed as a variable (`:var`) or constraint (`:con`) row via `cc_type` -# -# Returns a NamedTuple describing -# -# minimize 1/2 xᵀ Q x + qᵀ x + c0 -# subject to J_eq x + b_eq == 0 -# J_ineq x + b_ineq >= 0 -# 0 <= (L x + l) ⊥ (R x + r) >= 0 -# -# where the last line is the elementwise complementarity condition -# (L x + l)_j ≥ 0, (R x + r)_j ≥ 0, (L x + l)_j (R x + r)_j = 0 for j = 1..ncc -function jump_to_marble( - nlp::AbstractNLPModel, - ind_cc1, - ind_cc2, - cc_type::Union{ - Tuple{Symbol,Symbol}, - AbstractVector{<:Tuple{Symbol,Symbol}}, - }, -) - ind_cc1 = Int.(collect(ind_cc1)) - ind_cc2 = Int.(collect(ind_cc2)) - - ncc = length(ind_cc1) - - cc_type = cc_type isa Tuple ? fill(cc_type, ncc) : collect(cc_type) - - nvar = nlp.meta.nvar - ncon = nlp.meta.ncon - - @assert nlp.meta.nnln == 0 "Expected no nonlinear constraints in `nlp`" - @assert length(ind_cc2) == ncc "Expected equal number of complementarity endpoints" - @assert length(cc_type) == ncc "Expected one complementarity type per pair" - @assert all(t -> all(in((:var, :con)), t), cc_type) """ - Expected cc_type entries of form (:var, :var), (:var, :con), (:con, :var), or (:con, :con) - """ - - kind1 = first.(cc_type) - kind2 = last.(cc_type) - - valid(k, i) = 1 <= i <= (k === :var ? nvar : ncon) - row(k, i) = k === :var ? ncon + i : i - - @assert all(valid.(kind1, ind_cc1)) "Invalid index in ind_cc1" - @assert all(valid.(kind2, ind_cc2)) "Invalid index in ind_cc2" - - rows1 = row.(kind1, ind_cc1) - rows2 = row.(kind2, ind_cc2) - - x0 = zeros(nvar) - - obj_sign = nlp.meta.minimize ? 1.0 : -1.0 - - J0 = Matrix(NLPModels.jac(nlp, x0)) - H0 = Matrix(obj_sign * NLPModels.hess(nlp, x0)) - q = collect(obj_sign * NLPModels.grad(nlp, x0)) - c0 = obj_sign * NLPModels.obj(nlp, x0) - b0 = collect(NLPModels.cons(nlp, x0)) - - T = promote_type(eltype(J0), eltype(H0), eltype(q), eltype(b0)) - - J0 = T.(J0) - Q = T.(H0) - q = T.(q) - b0 = T.(b0) - c0 = T(c0) - - # Stack the constraint rows on top of an identity block so a single row index - # addresses either a constraint (rows 1:ncon) or a variable (rows ncon+1:end) - J_all = vcat(J0, Matrix{T}(I, nvar, nvar)) - b_all = vcat(b0, zeros(T, nvar)) - - l_all = T.(vcat(collect(nlp.meta.lcon), collect(nlp.meta.lvar))) - u_all = T.(vcat(collect(nlp.meta.ucon), collect(nlp.meta.uvar))) - - has_lb = isfinite.(l_all) - has_ub = isfinite.(u_all) - - mask_cc = falses(ncon + nvar) - mask_cc[unique(vcat(rows1, rows2))] .= true - - # Each endpoint becomes a slack 0 <= A x + b, so it must be bounded on at - # least one side, report the offending pair so the input is easy to fix - for j in 1:ncc - @assert has_lb[rows1[j]] || has_ub[rows1[j]] "Left endpoint of complementarity pair $j (ind_cc1[$j]=$(ind_cc1[j]), $(kind1[j])) has no finite bound" - @assert has_lb[rows2[j]] || has_ub[rows2[j]] "Right endpoint of complementarity pair $j (ind_cc2[$j]=$(ind_cc2[j]), $(kind2[j])) has no finite bound" - end - - rowscale(A, s) = A .* reshape(s, :, 1) - - # Map a bounded row g(x) = A x + b to its nonnegative complementarity slack, - # preferring the lower bound (slack g - lb) and flipping sign for an - # upper-bound-only row (slack ub - g) - function residual(rows) - use_lb = has_lb[rows] - sgn = ifelse.(use_lb, one(T), -one(T)) - - A = rowscale(J_all[rows, :], sgn) - b = ifelse.( - use_lb, - b_all[rows] .- l_all[rows], - u_all[rows] .- b_all[rows], - ) - - return A, b - end - - L, l = residual(rows1) - R, r = residual(rows2) - - # A two-sided bound with lb == ub is an equality, everything else bounded and - # not part of a complementarity pair becomes a one-sided inequality - is_eq = has_lb .& has_ub .& (l_all .== u_all) .& .!mask_cc - - ineq_lb = has_lb .& .!is_eq .& .!mask_cc - ineq_ub = has_ub .& .!is_eq .& .!mask_cc - - # A two-sided complementarity endpoint has its lower bound consumed by the - # slack above, so emit the leftover upper bound ub - g >= 0 as an inequality - cc_extra_ub = mask_cc .& has_lb .& has_ub - - J_eq = J_all[is_eq, :] - b_eq = b_all[is_eq] .- l_all[is_eq] - - J_ineq = [ - J_all[ineq_lb, :]; - -J_all[ineq_ub, :]; - -J_all[cc_extra_ub, :]; - ] - - b_ineq = [ - b_all[ineq_lb] .- l_all[ineq_lb]; - u_all[ineq_ub] .- b_all[ineq_ub]; - u_all[cc_extra_ub] .- b_all[cc_extra_ub]; - ] - - return ( - Q=Q, q=q, c0=c0, - J_eq=J_eq, b_eq=b_eq, - J_ineq=J_ineq, b_ineq=b_ineq, - L=L, l=l, - R=R, r=r, - ) -end \ No newline at end of file diff --git a/julia/src/jump_mpcc.jl b/julia/src/jump_mpcc.jl index b58c6ee..125e598 100644 --- a/julia/src/jump_mpcc.jl +++ b/julia/src/jump_mpcc.jl @@ -1,211 +1,268 @@ using JuMP +# NLP index maps following the ordering of `MathOptNLPModel(model)`, so an NLP +# column/row index can be recovered from a JuMP reference. -""" - nlp_con_row_map(model) -> Dict{MOI.ConstraintIndex, Int} +"""1-based NLP column index for each variable in `model`.""" +nlp_var_col_map(model::JuMP.Model) = + Dict(vi => i for (i, vi) in enumerate(MOI.get(JuMP.backend(model), MOI.ListOfVariableIndices()))) -Maps each non-variable-bound constraint in `model` to its row index in the -NLPModel produced by `MathOptNLPModel(model)`. Iterates constraint types in the -same order MOI/NLPModelsJuMP does, skipping `VariableIndex` constraints (those -become variable bounds, not NLP rows). +""" +1-based NLP row index for each scalar constraint in `model`, skipping +`MOI.VariableIndex` constraints (which become variable bounds, not NLP rows). """ function nlp_con_row_map(model::JuMP.Model) - moi_model = JuMP.backend(model) - row = 0 - map = Dict{MOI.ConstraintIndex, Int}() - for (F, S) in MOI.get(moi_model, MOI.ListOfConstraintTypesPresent()) + moi = JuMP.backend(model) + rows = Dict{MOI.ConstraintIndex, Int}() + for (F, S) in MOI.get(moi, MOI.ListOfConstraintTypesPresent()) F == MOI.VariableIndex && continue - for ci in MOI.get(moi_model, MOI.ListOfConstraintIndices{F,S}()) - row += 1 - map[ci] = row + for ci in MOI.get(moi, MOI.ListOfConstraintIndices{F,S}()) + rows[ci] = length(rows) + 1 end end - return map + return rows end +# Complementarity indexing + +_as_vec(x::AbstractArray) = vec(x) +_as_vec(x) = [x] + +# Infer the side kind (`:var`/`:con`) from a JuMP reference or array of them. +_cc_kind(::JuMP.VariableRef) = :var +_cc_kind(::JuMP.ConstraintRef) = :con +_cc_kind(x::AbstractArray) = _cc_kind(first(x)) +_cc_kind(x) = error("Complementarity terms must be JuMP variable/constraint references, got $(typeof(x))") + """ - nlp_var_col_map(model) -> Dict{MOI.VariableIndex, Int} + complementarity_indices(model, blocks...) -> (ind_cc1, ind_cc2, cc_types) -Maps each variable to its column index in the NLPModel produced by -`MathOptNLPModel(model)`. +Resolve one or more complementarity blocks into NLP indices. Each block is a +`(lhs, rhs)` pair, where each side is a single JuMP variable/constraint reference +or an equally sized array of them; the two sides must have the same length. Each +side's kind (`:var`/`:con`) is inferred from the references' type. + +```julia +ind_cc1, ind_cc2, cc_types = complementarity_indices(model, + (model[:μ], model[:gate_violation]), # var ⊥ con + (model[:a], model[:b]), # single references are fine +) +``` """ -function nlp_var_col_map(model::JuMP.Model) - vars = MOI.get(JuMP.backend(model), MOI.ListOfVariableIndices()) - return Dict(vi => i for (i, vi) in enumerate(vars)) +function complementarity_indices(model::JuMP.Model, blocks...) + col, row = nlp_var_col_map(model), nlp_con_row_map(model) + resolve(x) = _cc_kind(x) === :var ? [col[JuMP.index(v)] for v in _as_vec(x)] : + [row[JuMP.index(c)] for c in _as_vec(x)] + + ind_cc1, ind_cc2 = Int[], Int[] + cc_types = Tuple{Symbol,Symbol}[] + for (lhs, rhs) in blocks + i1, i2 = resolve(lhs), resolve(rhs) + @assert length(i1) == length(i2) "Complementarity sides must have equal length" + append!(ind_cc1, i1) + append!(ind_cc2, i2) + append!(cc_types, fill((_cc_kind(lhs), _cc_kind(rhs)), length(i1))) + end + return ind_cc1, ind_cc2, cc_types end """ - var_con_complementarities(model, vars, cons) -> Vector{Tuple{Int,Int}} +Return MOI variable-index values for named variable arrays in `model`. -Given parallel arrays `vars` (VariableRef) and `cons` (ConstraintRef) with the -same shape, return `(col_idx, row_idx)` pairs suitable as complementarity indices -in an NLPModel. +Only `AbstractArray{VariableRef}` entries of `object_dictionary(model)` are +included; scalar variables and non-variable objects are skipped. """ -function var_con_complementarities(model::JuMP.Model, vars::AbstractArray, cons::AbstractArray) - @assert size(vars) == size(cons) "vars and cons must have the same shape" - col_map = nlp_var_col_map(model) - row_map = nlp_con_row_map(model) - return [(col_map[JuMP.index(v)], row_map[JuMP.index(c)]) for (v, c) in zip(vec(vars), vec(cons))] -end +var_inds(model::JuMP.Model) = Dict( + k => map(v -> JuMP.index(v).value, v) + for (k, v) in object_dictionary(model) + if v isa AbstractArray{VariableRef} +) -""" - con_con_complementarities(model, cons1, cons2) -> Vector{Tuple{Int,Int}} +# MPCC — an NLP bundled with its resolved complementarity data -Given parallel arrays `cons1` and `cons2` (ConstraintRef) with the same shape, -return `(row_idx1, row_idx2)` pairs suitable as complementarity indices in an -NLPModel. """ -function con_con_complementarities(model::JuMP.Model, cons1::AbstractArray, cons2::AbstractArray) - @assert size(cons1) == size(cons2) "cons1 and cons2 must have the same shape" - row_map = nlp_con_row_map(model) - return [(row_map[JuMP.index(c1)], row_map[JuMP.index(c2)]) for (c1, c2) in zip(vec(cons1), vec(cons2))] + MPCC(model::JuMP.Model, blocks...) + MPCC(nlp::AbstractNLPModel, ind_cc1, ind_cc2, cc_types; inds=Dict()) + +A mathematical program with complementarity constraints: an `nlp` paired with the +complementarity data Marble consumes. `ind_cc1`/`ind_cc2` index the two endpoints +of each pair as NLP variable/constraint rows, `cc_types` records each endpoint's +kind (`:var`/`:con`), and `inds` is an optional name → column map (see +[`var_inds`](@ref)). Because the indices address `nlp` rows/columns, they only +mean anything alongside the `nlp` they were resolved against. + +The first form builds the `nlp` as `MathOptNLPModel(model)` and resolves each +`block` via [`complementarity_indices`](@ref); the second takes pre-resolved +indices directly. + +```julia +MPCC(model, (model[:μ], model[:gate_violation])) +MPCC(MathOptNLPModel(model), ind_cc1, ind_cc2, cc_types) +``` +""" +struct MPCC + nlp::AbstractNLPModel + ind_cc1::Vector{Int} + ind_cc2::Vector{Int} + cc_types::Vector{Tuple{Symbol,Symbol}} + inds::Dict end -""" - var_var_complementarities(model, vars1, vars2) -> Vector{Tuple{Int,Int}} +function MPCC(nlp::AbstractNLPModel, ind_cc1, ind_cc2, cc_types; inds::Dict=Dict()) + return MPCC(nlp, collect(Int, ind_cc1), collect(Int, ind_cc2), + collect(Tuple{Symbol,Symbol}, cc_types), inds) +end -Given parallel arrays `vars1` and `vars2` (VariableRef) with the same shape, -return `(col_idx1, col_idx2)` pairs suitable as complementarity indices in an -NLPModel. Both variables must be bounded below by zero. -""" -function var_var_complementarities(model::JuMP.Model, vars1::AbstractArray, vars2::AbstractArray) - @assert size(vars1) == size(vars2) "vars1 and vars2 must have the same shape" - col_map = nlp_var_col_map(model) - return [(col_map[JuMP.index(v1)], col_map[JuMP.index(v2)]) for (v1, v2) in zip(vec(vars1), vec(vars2))] +function MPCC(model::JuMP.Model, blocks...) + ind_cc1, ind_cc2, cc_types = complementarity_indices(model, blocks...) + return MPCC(MathOptNLPModel(model), ind_cc1, ind_cc2, cc_types; inds=var_inds(model)) end +# Conversion to Marble problem data + """ - var_inds(model) -> Dict{Symbol, Array{Int}} + mpcc_to_marble(mpcc::MPCC) -> NamedTuple -Returns a mapping from each named variable array in `model` (registered via -`@variable`) to an array of the corresponding MOI column indices (1-based). -Only entries whose value is an `AbstractArray{VariableRef}` are included; -scalar variables and non-variable objects are skipped. +Convert an [`MPCC`](@ref) — an NLP with linear constraints and resolved +complementarity pairs — into the matrix/vector data Marble consumes. -Useful for building index lookups before constructing an NLPModel, without -having to call `nlp_var_col_map` and then scatter indices by hand. +`mpcc.ind_cc1[j]` and `mpcc.ind_cc2[j]` are the two endpoints of complementarity +pair `j`, each addressed as a variable (`:var`) or constraint (`:con`) row of +`mpcc.nlp` via `mpcc.cc_types`. + +Returns a `NamedTuple` describing + + minimize 1/2 xᵀ Q x + qᵀ x + c0 + subject to J_eq x + b_eq == 0 + J_ineq x + b_ineq >= 0 + 0 <= (L x + l) ⊥ (R x + r) >= 0 + +where the last line is the elementwise complementarity condition +`(L x + l)_j ≥ 0`, `(R x + r)_j ≥ 0`, `(L x + l)_j (R x + r)_j = 0` for `j = 1..ncc`. """ -var_inds(model::JuMP.Model) = Dict( - k => map(v -> JuMP.index(v).value, v) - for (k, v) in object_dictionary(model) - if v isa AbstractArray{VariableRef} -) +function mpcc_to_marble(mpcc::MPCC) + nlp = mpcc.nlp -function _reformulation_helpers(model) - inv_var_map = Dict(col => vi for (vi, col) in nlp_var_col_map(model)) - inv_con_map = Dict(row => ci for (ci, row) in nlp_con_row_map(model)) + ind_cc1 = Int.(collect(mpcc.ind_cc1)) + ind_cc2 = Int.(collect(mpcc.ind_cc2)) + cc_type = mpcc.cc_types - get_reference(i, t) = if t == :var - JuMP.VariableRef(model, inv_var_map[i]) - elseif t == :con - JuMP.ConstraintRef(model, inv_con_map[i], JuMP.ScalarShape()) - else - error("Unsupported complementarity type: $t") - end + ncc = length(ind_cc1) - get_cons_expr(con::JuMP.ConstraintRef) = begin - obj = constraint_object(con) - expr = obj.func - MOI.constant(obj.set) - return expr - end + nvar = nlp.meta.nvar + ncon = nlp.meta.ncon - # Maps constraint row index -> slack variable, so repeated occurrences of - # the same constraint reuse the existing slack (the original constraint is - # deleted on first encounter and can't be referenced again). - con_slack_cache = Dict{Int, JuMP.VariableRef}() - - get_or_create_con_slack!(row_idx) = get!(con_slack_cache, row_idx) do - con = get_reference(row_idx, :con) - slack = @variable(model, lower_bound=0) - @constraint(model, slack == get_cons_expr(con)) - delete(model, con) - slack - end + @assert nlp.meta.nnln == 0 "Expected only linear constraints in `mpcc.nlp`" + @assert length(ind_cc2) == ncc "Expected equal number of complementarity endpoints" + @assert length(cc_type) == ncc "Expected one complementarity type per pair" + @assert all(t -> all(in((:var, :con)), t), cc_type) """ + Expected cc_type entries of form (:var, :var), (:var, :con), (:con, :var), or (:con, :con) + """ - return get_reference, get_or_create_con_slack!, con_slack_cache -end + kind1 = first.(cc_type) + kind2 = last.(cc_type) -""" - reformulate_sos1(model, ind_cc1, ind_cc2, types)::JuMP.Model + valid(k, i) = 1 <= i <= (k === :var ? nvar : ncon) + row(k, i) = k === :var ? ncon + i : i -Reformulate complementarity constraints as SOS1 sets in-place. + @assert all(valid.(kind1, ind_cc1)) "Invalid index in ind_cc1" + @assert all(valid.(kind2, ind_cc2)) "Invalid index in ind_cc2" -Each triplet `(i1, i2, (t1, t2))` drawn from `zip(ind_cc1, ind_cc2, types)` -encodes one complementarity condition `x1 ⟂ x2`, where: + rows1 = row.(kind1, ind_cc1) + rows2 = row.(kind2, ind_cc2) -- `t1`, `t2` ∈ `{:var, :con}` indicate whether the index refers to a variable - column or a constraint row (as returned by `nlp_var_col_map` / - `nlp_con_row_map`). -- `i1`, `i2` are the corresponding 1-based column/row indices. + x0 = zeros(nvar) -Behaviour by case: + obj_sign = nlp.meta.minimize ? 1.0 : -1.0 -| `(t1, t2)` | Action | -|---------------|--------| -| `(:var, :var)` | Add `[x1, x2] ∈ SOS1` directly. | -| `(:var, :con)` | Introduce a non-negative slack `s = expr(con)`, delete the original constraint, add `[x1, s] ∈ SOS1`. | -| `(:con, :var)` | Symmetric to `(:var, :con)`. | -| `(:con, :con)` | Introduce two non-negative slacks, delete both original constraints, add `[s1, s2] ∈ SOS1`. | + J0 = Matrix(NLPModels.jac(nlp, x0)) + H0 = Matrix(obj_sign * NLPModels.hess(nlp, x0)) + q = collect(obj_sign * NLPModels.grad(nlp, x0)) + c0 = obj_sign * NLPModels.obj(nlp, x0) + b0 = collect(NLPModels.cons(nlp, x0)) -The constraint expression used for `:con` entries is `func - constant(set)`, -i.e. the left-hand side when the constraint is written as `expr ∈ set`. -""" -function reformulate_sos1(model::JuMP.Model, ind_cc1, ind_cc2, types)::JuMP.Model - new_model = copy(model) # Work on a copy to avoid modifying the original model's indices - get_reference, get_or_create_con_slack!, _ = _reformulation_helpers(new_model) - - add_cc_pair!(i1, i2, t1, t2) = begin - if (t1, t2) == (:var, :var) - ref1 = get_reference(i1, t1) - ref2 = get_reference(i2, t2) - @constraint(new_model, [ref1, ref2] in JuMP.SOS1()) - elseif (t1, t2) == (:var, :con) - ref1 = get_reference(i1, :var) - slack = get_or_create_con_slack!(i2) - @constraint(new_model, [ref1, slack] in JuMP.SOS1()) - elseif (t1, t2) == (:con, :var) - add_cc_pair!(i2, i1, :var, :con) - elseif (t1, t2) == (:con, :con) - slack1 = get_or_create_con_slack!(i1) - slack2 = get_or_create_con_slack!(i2) - @constraint(new_model, [slack1, slack2] in JuMP.SOS1()) - else - error("Unsupported complementarity type: ($t1, $t2)") - end - end + T = promote_type(eltype(J0), eltype(H0), eltype(q), eltype(b0)) - foreach(((i1, i2, (t1, t2)),) -> add_cc_pair!(i1, i2, t1, t2), zip(ind_cc1, ind_cc2, types)) + J0 = T.(J0) + Q = T.(H0) + q = T.(q) + b0 = T.(b0) + c0 = T(c0) - return new_model -end + # Stack the constraint rows on top of an identity block so a single row index + # addresses either a constraint (rows 1:ncon) or a variable (rows ncon+1:end) + J_all = vcat(J0, Matrix{T}(I, nvar, nvar)) + b_all = vcat(b0, zeros(T, nvar)) -function reformulate_lie(model::JuMP.Model, ind_cc1, ind_cc2, types; κ, form=:eq)::JuMP.Model - new_model = copy(model) - get_reference, _, _ = _reformulation_helpers(new_model) + l_all = T.(vcat(collect(nlp.meta.lcon), collect(nlp.meta.lvar))) + u_all = T.(vcat(collect(nlp.meta.ucon), collect(nlp.meta.uvar))) - ncc = length(ind_cc1) - retraction(x) = 1/2 * (x + sqrt(x^2 + 4)) - con_expr(ref) = (o = constraint_object(ref); o.func - MOI.constant(o.set)) + has_lb = isfinite.(l_all) + has_ub = isfinite.(u_all) + + mask_cc = falses(ncon + nvar) + mask_cc[unique(vcat(rows1, rows2))] .= true - @variable(new_model, s1[1:ncc]) - if form == :ineq - @variable(new_model, s2[1:ncc]) - @constraint(new_model, s1 + s2 .<= 0) + # Each endpoint becomes a slack 0 <= A x + b, so it must be bounded on at + # least one side, report the offending pair so the input is easy to fix + for j in 1:ncc + @assert has_lb[rows1[j]] || has_ub[rows1[j]] "Left endpoint of complementarity pair $j (ind_cc1[$j]=$(ind_cc1[j]), $(kind1[j])) has no finite bound" + @assert has_lb[rows2[j]] || has_ub[rows2[j]] "Right endpoint of complementarity pair $j (ind_cc2[$j]=$(ind_cc2[j]), $(kind2[j])) has no finite bound" end - for (j, (i1, i2, (t1, t2))) in enumerate(zip(ind_cc1, ind_cc2, types)) - cc1 = get_reference(i1, t1) - cc2 = get_reference(i2, t2) + rowscale(A, s) = A .* reshape(s, :, 1) - expr1 = t1 == :var ? cc1 : con_expr(cc1) - expr2 = t2 == :var ? cc2 : con_expr(cc2) + # Map a bounded row g(x) = A x + b to its nonnegative complementarity slack, + # preferring the lower bound (slack g - lb) and flipping sign for an + # upper-bound-only row (slack ub - g) + function residual(rows) + use_lb = has_lb[rows] + sgn = ifelse.(use_lb, one(T), -one(T)) - t1 == :var ? delete_lower_bound(cc1) : delete(new_model, cc1) - t2 == :var ? delete_lower_bound(cc2) : delete(new_model, cc2) + A = rowscale(J_all[rows, :], sgn) + b = ifelse.( + use_lb, + b_all[rows] .- l_all[rows], + u_all[rows] .- b_all[rows], + ) - @constraint(new_model, expr1 == √κ * retraction(s1[j])) - @constraint(new_model, expr2 == √κ * retraction(form == :eq ? -s1[j] : s2[j])) + return A, b end - return new_model + L, l = residual(rows1) + R, r = residual(rows2) + + # A two-sided bound with lb == ub is an equality, everything else bounded and + # not part of a complementarity pair becomes a one-sided inequality + is_eq = has_lb .& has_ub .& (l_all .== u_all) .& .!mask_cc + + ineq_lb = has_lb .& .!is_eq .& .!mask_cc + ineq_ub = has_ub .& .!is_eq .& .!mask_cc + + # A two-sided complementarity endpoint has its lower bound consumed by the + # slack above, so emit the leftover upper bound ub - g >= 0 as an inequality + cc_extra_ub = mask_cc .& has_lb .& has_ub + + J_eq = J_all[is_eq, :] + b_eq = b_all[is_eq] .- l_all[is_eq] + + J_ineq = [ + J_all[ineq_lb, :]; + -J_all[ineq_ub, :]; + -J_all[cc_extra_ub, :]; + ] + + b_ineq = [ + b_all[ineq_lb] .- l_all[ineq_lb]; + u_all[ineq_ub] .- b_all[ineq_ub]; + u_all[cc_extra_ub] .- b_all[cc_extra_ub]; + ] + + return ( + Q=Q, q=q, c0=c0, + J_eq=J_eq, b_eq=b_eq, + J_ineq=J_ineq, b_ineq=b_ineq, + L=L, l=l, + R=R, r=r, + ) end \ No newline at end of file From dde2564c4ceb9ce18639a5bef574377feddc1f0d Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Thu, 2 Jul 2026 16:11:14 -0400 Subject: [PATCH 02/35] get rid of the regularizer to try hack --- src/solver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/solver.cpp b/src/solver.cpp index c14b4db..c196c08 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -641,8 +641,8 @@ SolveResult Solver::solve() { return r == 0.0 ? 1e-8 : 10.0 * r; }; - double regularizer_to_try = - std::isnan(last_regularizer) ? 0.0 : last_regularizer; + double regularizer_to_try = 0.0; + // std::isnan(last_regularizer) ? 0.0 : last_regularizer; bool any_factorization_succeeded = false; bool any_inertia_succeeded = false; From a504881501acee6b84221f6c91d68cc0561fbc50 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Thu, 2 Jul 2026 16:51:32 -0400 Subject: [PATCH 03/35] try using last regularizer to warmstart --- src/solver.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/solver.cpp b/src/solver.cpp index c196c08..74ca030 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -641,8 +641,7 @@ SolveResult Solver::solve() { return r == 0.0 ? 1e-8 : 10.0 * r; }; - double regularizer_to_try = 0.0; - // std::isnan(last_regularizer) ? 0.0 : last_regularizer; + double regularizer_to_try = std::isnan(last_regularizer) ? 0.0 : last_regularizer; bool any_factorization_succeeded = false; bool any_inertia_succeeded = false; @@ -662,6 +661,10 @@ SolveResult Solver::solve() { continue; } + if (!any_inertia_succeeded) { + last_regularizer = regularizer_to_try <= 1e-8 ? 0.0 : regularizer_to_try / 10.0; + } + any_inertia_succeeded = true; backsolve(); @@ -673,7 +676,7 @@ SolveResult Solver::solve() { ); if (linesearch_succeeded) { - last_regularizer = regularizer_to_try == 0.0 ? 0.0 : regularizer_to_try / 10.0; + // last_regularizer = regularizer_to_try == 0.0 ? 0.0 : regularizer_to_try / 10.0; break; } From c386d79c41385a9f84b588b908b0ebe628a5132e Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Thu, 2 Jul 2026 17:32:17 -0400 Subject: [PATCH 04/35] add inertia warmstart as an option, update retraction map to not use catastrophic cancellation form --- bindings/julia_bindings.cpp | 30 +----------------------------- bindings/python_bindings.cpp | 22 +--------------------- include/solver.h | 3 +++ julia/src/Marble.jl | 1 + python/marble/_core.pyi | 1 + src/solver.cpp | 23 +++++++++++------------ 6 files changed, 18 insertions(+), 62 deletions(-) diff --git a/bindings/julia_bindings.cpp b/bindings/julia_bindings.cpp index 53d772f..8af9cc4 100644 --- a/bindings/julia_bindings.cpp +++ b/bindings/julia_bindings.cpp @@ -9,10 +9,6 @@ namespace jlcxx { template<> struct IsMirroredType : std::false_type {}; } -// --------------------------------------------------------------------------- -// Eigen ↔ Julia array helpers -// --------------------------------------------------------------------------- - // Map a Julia matrix to an Eigen matrix using its *true* dimensions (Julia is // column-major, matching Eigen's default). Reading the real shape — rather than // reshaping to caller-supplied dimensions — lets a misshapen block reach the @@ -81,15 +77,8 @@ static SMat csc_to_smat(int rows, int cols, return result; } -// --------------------------------------------------------------------------- -// Module definition -// --------------------------------------------------------------------------- - JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { - // ----------------------------------------------------------------------- - // Problem - // ----------------------------------------------------------------------- mod.add_type("Problem") .constructor([](jlcxx::ArrayRef cost_hessian, jlcxx::ArrayRef cost_gradient, @@ -152,9 +141,6 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { // return std::make_tuple((int)p.cost_hessian().rows(), (int)p.cost_hessian().cols(), colptr, rowval, nzval); // }); - // ----------------------------------------------------------------------- - // SolverOptions - // ----------------------------------------------------------------------- #define OPTION_RW(name, T) \ .method(#name, [](const Solver::Options& o) { return o.name; }) \ .method(#name "!", [](Solver::Options& o, T v) { o.name = v; }) @@ -177,6 +163,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { OPTION_RW(gamma_objective, double) OPTION_RW(gamma_constraint, double) OPTION_RW(ruiz_iterations, int) + OPTION_RW(inertia_warmstart, bool) OPTION_RW(verbosity, int) OPTION_RW(print_every, int) OPTION_RW(debug, bool) @@ -187,9 +174,6 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { #undef OPTION_RW - // ----------------------------------------------------------------------- - // FilterEntry - // ----------------------------------------------------------------------- mod.add_type("FilterEntry") .constructor() .constructor([](double feas, double merit) { @@ -200,9 +184,6 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("merit", [](const Filter::Entry& e) { return e.merit; }) .method("merit!", [](Filter::Entry& e, double v) { e.merit = v; }); - // ----------------------------------------------------------------------- - // Filter - // ----------------------------------------------------------------------- mod.add_type("Filter") .constructor() .constructor([](double gamma_objective, double gamma_constraint) { @@ -234,9 +215,6 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("acceptable", &Filter::acceptable) .method("update", &Filter::update); - // ----------------------------------------------------------------------- - // Workspace (read-only accessors) - // ----------------------------------------------------------------------- mod.add_type("Workspace") // Full solution and decomposed views .method("solution", [](Workspace& w) { return to_julia(w.solution); }) @@ -275,9 +253,6 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("amd_iperm_vec", [](Workspace& w) { return to_julia(w.amd_iperm_vec); }) .method("scaling", [](Workspace& w) { return to_julia(w.scaling); }); - // ----------------------------------------------------------------------- - // SolveResult - // ----------------------------------------------------------------------- mod.add_type("SolveResult") .method("converged", [](const SolveResult& r) { return r.converged; }) .method("iterations", [](const SolveResult& r) { return r.iterations; }) @@ -293,9 +268,6 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("setup_time_s", [](const SolveResult& r) { return r.setup_time_s; }) .method("solve_time_s", [](const SolveResult& r) { return r.solve_time_s; }); - // ----------------------------------------------------------------------- - // Solver - // ----------------------------------------------------------------------- mod.add_type("Solver") .constructor() // Problem setup diff --git a/bindings/python_bindings.cpp b/bindings/python_bindings.cpp index 508af0a..34919b5 100644 --- a/bindings/python_bindings.cpp +++ b/bindings/python_bindings.cpp @@ -41,9 +41,6 @@ static Vec arr_to_vec(py::array_t arr) { PYBIND11_MODULE(_core, m) { m.doc() = "Marble compiled core: constrained optimization solver with complementarity constraints"; - // ------------------------------------------------------------------------- - // Problem - // ------------------------------------------------------------------------- py::class_(m, "Problem") // Dense numpy-array constructor (mirrors Julia wrapper) .def(py::init([](const Mat& cost_hessian, const Vec& cost_gradient, double cost_const, @@ -122,9 +119,6 @@ PYBIND11_MODULE(_core, m) { return py::make_tuple((int)p.cost_hessian.rows(), (int)p.cost_hessian.cols(), cp, rv, nz); }); - // ------------------------------------------------------------------------- - // SolveResult - // ------------------------------------------------------------------------- py::class_(m, "SolveResult") .def_readonly("converged", &SolveResult::converged) .def_readonly("iterations", &SolveResult::iterations) @@ -145,9 +139,6 @@ PYBIND11_MODULE(_core, m) { + " factorizations=" + std::to_string(r.factorizations) + ">"; }); - // ------------------------------------------------------------------------- - // Solver::Options - // ------------------------------------------------------------------------- py::class_(m, "SolverOptions") .def(py::init<>()) .def_readwrite("convergence_kkt_norm", &Solver::Options::convergence_kkt_norm) @@ -166,6 +157,7 @@ PYBIND11_MODULE(_core, m) { .def_readwrite("gamma_objective", &Solver::Options::gamma_objective) .def_readwrite("gamma_constraint", &Solver::Options::gamma_constraint) .def_readwrite("ruiz_iterations", &Solver::Options::ruiz_iterations) + .def_readwrite("inertia_warmstart", &Solver::Options::inertia_warmstart) .def_readwrite("verbosity", &Solver::Options::verbosity) .def_readwrite("print_every", &Solver::Options::print_every) .def_readwrite("debug", &Solver::Options::debug) @@ -179,9 +171,6 @@ PYBIND11_MODULE(_core, m) { + " max_iters=" + std::to_string(o.max_iters) + ">"; }); - // ------------------------------------------------------------------------- - // Filter::Entry - // ------------------------------------------------------------------------- py::class_(m, "FilterEntry") .def(py::init<>()) .def_readwrite("feas", &Filter::Entry::feas) @@ -191,9 +180,6 @@ PYBIND11_MODULE(_core, m) { + " merit=" + std::to_string(e.merit) + ">"; }); - // ------------------------------------------------------------------------- - // Filter - // ------------------------------------------------------------------------- py::class_(m, "Filter") .def(py::init<>()) .def(py::init(), @@ -218,9 +204,6 @@ PYBIND11_MODULE(_core, m) { .def("acceptable", &Filter::acceptable, py::arg("candidate")) .def("update", &Filter::update, py::arg("new_entry")); - // ------------------------------------------------------------------------- - // Workspace (read-only view into solver internals) - // ------------------------------------------------------------------------- py::class_(m, "Workspace") // Solution components – copy Maps to plain Vec so numpy owns the data .def_property_readonly("solution", @@ -284,9 +267,6 @@ PYBIND11_MODULE(_core, m) { .def_property_readonly("scaling", [](const Workspace& w) { return w.scaling; }); - // ------------------------------------------------------------------------- - // Solver - // ------------------------------------------------------------------------- py::class_(m, "Solver") .def(py::init<>()) // Problem setup: takes a Problem (built from dense numpy arrays or scipy diff --git a/include/solver.h b/include/solver.h index 2b9db97..ed3a5a5 100644 --- a/include/solver.h +++ b/include/solver.h @@ -69,6 +69,9 @@ class Solver { double gamma_constraint{1e-5}; /// Number of ruiz iterations for scaling int ruiz_iterations{10}; + /// Warm-start each inner Newton step's inertia regularizer from the last successful value + /// (false restarts the regularizer from 0 at every inner step) + bool inertia_warmstart{true}; /// Output directory for solution and solve information std::filesystem::path output_dir{"/dev/null"}; /// Verbosity level: 0=silent, 1=per-iteration table + footer diff --git a/julia/src/Marble.jl b/julia/src/Marble.jl index 26bb770..7ecc1a3 100644 --- a/julia/src/Marble.jl +++ b/julia/src/Marble.jl @@ -98,6 +98,7 @@ module Marble :relaxation_initial, :relaxation_min, :relaxation_scaling, :max_iters, :max_iters_linesearch, :gamma_objective, :gamma_constraint, :ruiz_iterations, + :inertia_warmstart, :output_dir, :verbosity, :print_every, :debug, :debug_output_path, :debug_log_every ] diff --git a/python/marble/_core.pyi b/python/marble/_core.pyi index 77fd87a..da543cd 100644 --- a/python/marble/_core.pyi +++ b/python/marble/_core.pyi @@ -245,6 +245,7 @@ class SolverOptions: debug_output_path: str gamma_constraint: float gamma_objective: float + inertia_warmstart: bool max_iters: int max_iters_linesearch: int outer_step_kkt_norm: float diff --git a/src/solver.cpp b/src/solver.cpp index 74ca030..10c2772 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -60,25 +60,23 @@ namespace { Vec Solver::retract(const Vec& s, double sqrt_relax_param) const { // Vectorized retraction map for both inequality and complementarity slacks - // p(s) = sqrt(s^2 + relax_param) - // Eigen::VectorXd p = 0.5*(s/sqrt_relax_param + (s.)) - auto s_arr = s.array() / sqrt_relax_param; - Vec p = 0.5 * (s_arr + (s_arr.square() + 4.0).sqrt()); - return sqrt_relax_param * p; + // p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa)), kappa = sqrt_relax_param^2 + const double four_kappa = 4.0 * sqrt_relax_param * sqrt_relax_param; + return (0.5 * (s.array() + (s.array().square() + four_kappa).sqrt())).matrix(); } Vec Solver::retract_deriv(const Vec& s, double sqrt_relax_param) const { // Derivative of the vectorized retraction map above - auto s_arr = s.array() / sqrt_relax_param; - Vec p_deriv = 0.5 * (s_arr / sqrt(s_arr.square() + 4.0) + 1.0); - return p_deriv; + // p'(s) = 0.5 * (1 + s / sqrt(s^2 + 4*kappa)) + const double four_kappa = 4.0 * sqrt_relax_param * sqrt_relax_param; + return (0.5 * (1.0 + s.array() / (s.array().square() + four_kappa).sqrt())).matrix(); } Vec Solver::retract_second_deriv(const Vec& s, double sqrt_relax_param) const { // Second derivative of the vectorized retraction map above - auto s_arr = s.array() / sqrt_relax_param; - Vec p_second_deriv = 2.0 / (s_arr.square() + 4.0).pow(1.5); - return p_second_deriv / sqrt_relax_param; + // p''(s) = 2*kappa / (s^2 + 4*kappa)^(3/2) + const double kappa = sqrt_relax_param * sqrt_relax_param; + return (2.0 * kappa * (s.array().square() + 4.0 * kappa).pow(-1.5)).matrix(); } void Solver::set_problem(Problem problem, Solver::Options& options) { @@ -641,7 +639,8 @@ SolveResult Solver::solve() { return r == 0.0 ? 1e-8 : 10.0 * r; }; - double regularizer_to_try = std::isnan(last_regularizer) ? 0.0 : last_regularizer; + double regularizer_to_try = + (options.inertia_warmstart && !std::isnan(last_regularizer)) ? last_regularizer : 0.0; bool any_factorization_succeeded = false; bool any_inertia_succeeded = false; From 26df2c44f09a4169547e293a0e259ad83db46719 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Mon, 6 Jul 2026 02:24:38 -0400 Subject: [PATCH 05/35] add another example where kappa initial matters, Makefile --- Makefile | 16 ++++++++++++++++ julia/examples/simple_test3.jl | 29 +++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 Makefile create mode 100644 julia/examples/simple_test3.jl diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dd1aef0 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +.PHONY: all python julia clean + +all: + cmake --preset all + cmake --build --preset all --parallel + +python: + cmake --preset python + cmake --build --preset python --parallel + +julia: + cmake --preset julia + cmake --build --preset julia --parallel + +clean: + rm -rf build diff --git a/julia/examples/simple_test3.jl b/julia/examples/simple_test3.jl new file mode 100644 index 0000000..289abcc --- /dev/null +++ b/julia/examples/simple_test3.jl @@ -0,0 +1,29 @@ +using Pkg; Pkg.activate(@__DIR__) +using Revise +using JuMP, Marble, NLPModelsJuMP + +# Construct problem using JuMP +model = JuMP.Model() + +@variable(model, x[1:2]) +@objective(model, Min, 1/2 * x'*x) +@constraint(model, cc1_lhs, x[1] >= 0) +@constraint(model, cc1_rhs, x[2] >= 0) +@constraint(model, cc2_lhs, 1 - x[1] >= 0) +@constraint(model, cc2_rhs, 1 - x[2] >= 0) + +mpcc = MPCC(model, + (model[:cc1_lhs], model[:cc1_rhs]), + (model[:cc2_lhs], model[:cc2_rhs]) +) + +solver = Marble.Solver() +Marble.setup!(solver, mpcc; verbosity = 1, relaxation_initial=0.1) +results = Marble.solve!(solver) +z = Marble.z(results) + +println(z) +println(Marble.obj(solver, z)) +println(Marble.residual_eq(solver, z)) +println(Marble.residual_ineq(solver, z)) +println(Marble.residual_comp(solver, z)) \ No newline at end of file From 54a5422aeaba80d97c0898e82f6a2f15c98fec7c Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Mon, 6 Jul 2026 02:34:58 -0400 Subject: [PATCH 06/35] add ability to change reteaction at compile-time --- CMakeLists.txt | 17 +++++++++++++++++ README.md | 19 +++++++++++++++++++ include/solver.h | 10 ++++++++++ src/solver.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++---- 4 files changed, 88 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index af8acb9..8b3245e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,11 @@ option(MARBLE_BUILD_PYTHON "Build Python bindings" ON) option(MARBLE_BUILD_JULIA "Build Julia bindings" ON) option(MARBLE_GENERATE_PYI "Generate .pyi stubs via pybind11-stubgen" ON) +# Retraction map used by the solver (compile-time selection) +set(MARBLE_RETRACTION "SOFTPLUS" CACHE STRING + "Retraction map: SOFTPLUS, EXP, or EXP_SCALED") +set_property(CACHE MARBLE_RETRACTION PROPERTY STRINGS SOFTPLUS EXP EXP_SCALED) + # --------------------------------------------------------------------------- # Output directories (keeps build/ tidy) # --------------------------------------------------------------------------- @@ -75,6 +80,18 @@ add_library(marble STATIC target_include_directories(marble PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) target_link_libraries(marble PUBLIC Eigen3::Eigen nlohmann_json::nlohmann_json marble_qdldl) +# Resolve the retraction map choice to a public compile definition (propagates to bindings) +if(MARBLE_RETRACTION STREQUAL "EXP") + target_compile_definitions(marble PUBLIC MARBLE_RETRACTION_MAP=MARBLE_RETRACTION_EXP) +elseif(MARBLE_RETRACTION STREQUAL "EXP_SCALED") + target_compile_definitions(marble PUBLIC MARBLE_RETRACTION_MAP=MARBLE_RETRACTION_EXP_SCALED) +elseif(MARBLE_RETRACTION STREQUAL "SOFTPLUS") + target_compile_definitions(marble PUBLIC MARBLE_RETRACTION_MAP=MARBLE_RETRACTION_SOFTPLUS) +else() + message(FATAL_ERROR "MARBLE_RETRACTION must be SOFTPLUS, EXP, or EXP_SCALED (got '${MARBLE_RETRACTION}')") +endif() +message(STATUS "Marble retraction map: ${MARBLE_RETRACTION}") + # --------------------------------------------------------------------------- # Python bindings (cmake -DMARBLE_BUILD_PYTHON=ON — default ON) # --------------------------------------------------------------------------- diff --git a/README.md b/README.md index 73778c0..6a221d3 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,25 @@ A C++ solver for quadratic programs with linear complementarity constraints, wit Please see the [installation instructions](https://roboticexplorationlab.org/Marble/getting_started/installation/) on the docs website for detailed instructions on building, installing, and using Marble in C++, Julia, and Python. +
+Choosing the retraction map + +The retraction map is selected at compile time via the `MARBLE_RETRACTION` CMake option (default `SOFTPLUS`). With $k$ the relaxation parameter ($\kappa$) and $x$ the slack: + +| `MARBLE_RETRACTION` | Retraction map | +| --- | --- | +| `SOFTPLUS` (default) | $p(x) = \tfrac{1}{2}\left(x + \sqrt{x^2 + 4k}\right)$ | +| `EXP` | $p(x) = \sqrt{k}\,e^{x}$ | +| `EXP_SCALED` | $p(x) = \sqrt{k}\,e^{x/\sqrt{k}}$ | + +Set it when configuring, e.g.: + +```bash +cmake --preset all -DMARBLE_RETRACTION=EXP_SCALED +``` + +
+ ## Attribution If you use this work in your research, please cite it as follows: diff --git a/include/solver.h b/include/solver.h index ed3a5a5..7796911 100644 --- a/include/solver.h +++ b/include/solver.h @@ -10,6 +10,16 @@ #include #include +// Compile-time selection of the retraction map. Set via CMake +// -DMARBLE_RETRACTION=SOFTPLUS|EXP|EXP_SCALED (default SOFTPLUS). +#define MARBLE_RETRACTION_SOFTPLUS 0 +#define MARBLE_RETRACTION_EXP 1 +#define MARBLE_RETRACTION_EXP_SCALED 2 + +#ifndef MARBLE_RETRACTION_MAP +#define MARBLE_RETRACTION_MAP MARBLE_RETRACTION_SOFTPLUS +#endif + /** * A brief description of your class. * diff --git a/src/solver.cpp b/src/solver.cpp index 10c2772..a3dfab1 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -58,27 +58,65 @@ namespace { } } +// Vectorized retraction map for both inequality and complementarity slacks. +// The map is selected at compile time via MARBLE_RETRACTION_MAP (see solver.h). +// In all variants kappa = sqrt_relax_param^2, so sqrt(kappa) = sqrt_relax_param. +#if MARBLE_RETRACTION_MAP == MARBLE_RETRACTION_EXP + +Vec Solver::retract(const Vec& s, double sqrt_relax_param) const { + // p(s) = sqrt(kappa) * exp(s) + return (sqrt_relax_param * s.array().exp()).matrix(); +} + +Vec Solver::retract_deriv(const Vec& s, double sqrt_relax_param) const { + // p'(s) = sqrt(kappa) * exp(s) + return (sqrt_relax_param * s.array().exp()).matrix(); +} + +Vec Solver::retract_second_deriv(const Vec& s, double sqrt_relax_param) const { + // p''(s) = sqrt(kappa) * exp(s) + return (sqrt_relax_param * s.array().exp()).matrix(); +} + +#elif MARBLE_RETRACTION_MAP == MARBLE_RETRACTION_EXP_SCALED + Vec Solver::retract(const Vec& s, double sqrt_relax_param) const { - // Vectorized retraction map for both inequality and complementarity slacks - // p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa)), kappa = sqrt_relax_param^2 + // p(s) = sqrt(kappa) * exp(s / sqrt(kappa)) + return (sqrt_relax_param * (s.array() / sqrt_relax_param).exp()).matrix(); +} + +Vec Solver::retract_deriv(const Vec& s, double sqrt_relax_param) const { + // p'(s) = exp(s / sqrt(kappa)) + return (s.array() / sqrt_relax_param).exp().matrix(); +} + +Vec Solver::retract_second_deriv(const Vec& s, double sqrt_relax_param) const { + // p''(s) = exp(s / sqrt(kappa)) / sqrt(kappa) + return ((s.array() / sqrt_relax_param).exp() / sqrt_relax_param).matrix(); +} + +#else // MARBLE_RETRACTION_SOFTPLUS (default) + +Vec Solver::retract(const Vec& s, double sqrt_relax_param) const { + // p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa)) const double four_kappa = 4.0 * sqrt_relax_param * sqrt_relax_param; return (0.5 * (s.array() + (s.array().square() + four_kappa).sqrt())).matrix(); } Vec Solver::retract_deriv(const Vec& s, double sqrt_relax_param) const { - // Derivative of the vectorized retraction map above // p'(s) = 0.5 * (1 + s / sqrt(s^2 + 4*kappa)) const double four_kappa = 4.0 * sqrt_relax_param * sqrt_relax_param; return (0.5 * (1.0 + s.array() / (s.array().square() + four_kappa).sqrt())).matrix(); } Vec Solver::retract_second_deriv(const Vec& s, double sqrt_relax_param) const { - // Second derivative of the vectorized retraction map above // p''(s) = 2*kappa / (s^2 + 4*kappa)^(3/2) const double kappa = sqrt_relax_param * sqrt_relax_param; return (2.0 * kappa * (s.array().square() + 4.0 * kappa).pow(-1.5)).matrix(); } +#endif + void Solver::set_problem(Problem problem, Solver::Options& options) { this->prob = std::make_shared(std::move(problem)); set_problem(options); From edf3839c2c204ac04f89237eafd5f1d1c414c0e9 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Sat, 11 Jul 2026 16:56:51 -0400 Subject: [PATCH 07/35] Revert "add ability to change reteaction at compile-time" This reverts commit 54a5422aeaba80d97c0898e82f6a2f15c98fec7c. --- CMakeLists.txt | 17 ----------------- README.md | 19 ------------------- include/solver.h | 10 ---------- src/solver.cpp | 46 ++++------------------------------------------ 4 files changed, 4 insertions(+), 88 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b3245e..af8acb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,11 +16,6 @@ option(MARBLE_BUILD_PYTHON "Build Python bindings" ON) option(MARBLE_BUILD_JULIA "Build Julia bindings" ON) option(MARBLE_GENERATE_PYI "Generate .pyi stubs via pybind11-stubgen" ON) -# Retraction map used by the solver (compile-time selection) -set(MARBLE_RETRACTION "SOFTPLUS" CACHE STRING - "Retraction map: SOFTPLUS, EXP, or EXP_SCALED") -set_property(CACHE MARBLE_RETRACTION PROPERTY STRINGS SOFTPLUS EXP EXP_SCALED) - # --------------------------------------------------------------------------- # Output directories (keeps build/ tidy) # --------------------------------------------------------------------------- @@ -80,18 +75,6 @@ add_library(marble STATIC target_include_directories(marble PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) target_link_libraries(marble PUBLIC Eigen3::Eigen nlohmann_json::nlohmann_json marble_qdldl) -# Resolve the retraction map choice to a public compile definition (propagates to bindings) -if(MARBLE_RETRACTION STREQUAL "EXP") - target_compile_definitions(marble PUBLIC MARBLE_RETRACTION_MAP=MARBLE_RETRACTION_EXP) -elseif(MARBLE_RETRACTION STREQUAL "EXP_SCALED") - target_compile_definitions(marble PUBLIC MARBLE_RETRACTION_MAP=MARBLE_RETRACTION_EXP_SCALED) -elseif(MARBLE_RETRACTION STREQUAL "SOFTPLUS") - target_compile_definitions(marble PUBLIC MARBLE_RETRACTION_MAP=MARBLE_RETRACTION_SOFTPLUS) -else() - message(FATAL_ERROR "MARBLE_RETRACTION must be SOFTPLUS, EXP, or EXP_SCALED (got '${MARBLE_RETRACTION}')") -endif() -message(STATUS "Marble retraction map: ${MARBLE_RETRACTION}") - # --------------------------------------------------------------------------- # Python bindings (cmake -DMARBLE_BUILD_PYTHON=ON — default ON) # --------------------------------------------------------------------------- diff --git a/README.md b/README.md index 6a221d3..73778c0 100644 --- a/README.md +++ b/README.md @@ -17,25 +17,6 @@ A C++ solver for quadratic programs with linear complementarity constraints, wit Please see the [installation instructions](https://roboticexplorationlab.org/Marble/getting_started/installation/) on the docs website for detailed instructions on building, installing, and using Marble in C++, Julia, and Python. -
-Choosing the retraction map - -The retraction map is selected at compile time via the `MARBLE_RETRACTION` CMake option (default `SOFTPLUS`). With $k$ the relaxation parameter ($\kappa$) and $x$ the slack: - -| `MARBLE_RETRACTION` | Retraction map | -| --- | --- | -| `SOFTPLUS` (default) | $p(x) = \tfrac{1}{2}\left(x + \sqrt{x^2 + 4k}\right)$ | -| `EXP` | $p(x) = \sqrt{k}\,e^{x}$ | -| `EXP_SCALED` | $p(x) = \sqrt{k}\,e^{x/\sqrt{k}}$ | - -Set it when configuring, e.g.: - -```bash -cmake --preset all -DMARBLE_RETRACTION=EXP_SCALED -``` - -
- ## Attribution If you use this work in your research, please cite it as follows: diff --git a/include/solver.h b/include/solver.h index 7796911..ed3a5a5 100644 --- a/include/solver.h +++ b/include/solver.h @@ -10,16 +10,6 @@ #include #include -// Compile-time selection of the retraction map. Set via CMake -// -DMARBLE_RETRACTION=SOFTPLUS|EXP|EXP_SCALED (default SOFTPLUS). -#define MARBLE_RETRACTION_SOFTPLUS 0 -#define MARBLE_RETRACTION_EXP 1 -#define MARBLE_RETRACTION_EXP_SCALED 2 - -#ifndef MARBLE_RETRACTION_MAP -#define MARBLE_RETRACTION_MAP MARBLE_RETRACTION_SOFTPLUS -#endif - /** * A brief description of your class. * diff --git a/src/solver.cpp b/src/solver.cpp index a3dfab1..10c2772 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -58,65 +58,27 @@ namespace { } } -// Vectorized retraction map for both inequality and complementarity slacks. -// The map is selected at compile time via MARBLE_RETRACTION_MAP (see solver.h). -// In all variants kappa = sqrt_relax_param^2, so sqrt(kappa) = sqrt_relax_param. -#if MARBLE_RETRACTION_MAP == MARBLE_RETRACTION_EXP - -Vec Solver::retract(const Vec& s, double sqrt_relax_param) const { - // p(s) = sqrt(kappa) * exp(s) - return (sqrt_relax_param * s.array().exp()).matrix(); -} - -Vec Solver::retract_deriv(const Vec& s, double sqrt_relax_param) const { - // p'(s) = sqrt(kappa) * exp(s) - return (sqrt_relax_param * s.array().exp()).matrix(); -} - -Vec Solver::retract_second_deriv(const Vec& s, double sqrt_relax_param) const { - // p''(s) = sqrt(kappa) * exp(s) - return (sqrt_relax_param * s.array().exp()).matrix(); -} - -#elif MARBLE_RETRACTION_MAP == MARBLE_RETRACTION_EXP_SCALED - Vec Solver::retract(const Vec& s, double sqrt_relax_param) const { - // p(s) = sqrt(kappa) * exp(s / sqrt(kappa)) - return (sqrt_relax_param * (s.array() / sqrt_relax_param).exp()).matrix(); -} - -Vec Solver::retract_deriv(const Vec& s, double sqrt_relax_param) const { - // p'(s) = exp(s / sqrt(kappa)) - return (s.array() / sqrt_relax_param).exp().matrix(); -} - -Vec Solver::retract_second_deriv(const Vec& s, double sqrt_relax_param) const { - // p''(s) = exp(s / sqrt(kappa)) / sqrt(kappa) - return ((s.array() / sqrt_relax_param).exp() / sqrt_relax_param).matrix(); -} - -#else // MARBLE_RETRACTION_SOFTPLUS (default) - -Vec Solver::retract(const Vec& s, double sqrt_relax_param) const { - // p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa)) + // Vectorized retraction map for both inequality and complementarity slacks + // p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa)), kappa = sqrt_relax_param^2 const double four_kappa = 4.0 * sqrt_relax_param * sqrt_relax_param; return (0.5 * (s.array() + (s.array().square() + four_kappa).sqrt())).matrix(); } Vec Solver::retract_deriv(const Vec& s, double sqrt_relax_param) const { + // Derivative of the vectorized retraction map above // p'(s) = 0.5 * (1 + s / sqrt(s^2 + 4*kappa)) const double four_kappa = 4.0 * sqrt_relax_param * sqrt_relax_param; return (0.5 * (1.0 + s.array() / (s.array().square() + four_kappa).sqrt())).matrix(); } Vec Solver::retract_second_deriv(const Vec& s, double sqrt_relax_param) const { + // Second derivative of the vectorized retraction map above // p''(s) = 2*kappa / (s^2 + 4*kappa)^(3/2) const double kappa = sqrt_relax_param * sqrt_relax_param; return (2.0 * kappa * (s.array().square() + 4.0 * kappa).pow(-1.5)).matrix(); } -#endif - void Solver::set_problem(Problem problem, Solver::Options& options) { this->prob = std::make_shared(std::move(problem)); set_problem(options); From d39f6248caafc37aa6590613c2676f96d024e7fd Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Sat, 11 Jul 2026 20:35:23 -0400 Subject: [PATCH 08/35] add IFT correction for kappa scaling, add backsolve overload to take in rhs,x. add option to init randomly the sigma vars --- bindings/julia_bindings.cpp | 33 +++--- bindings/python_bindings.cpp | 39 ++++--- include/solver.h | 49 ++++++-- include/workspace.h | 5 +- julia/examples/simple_test.jl | 7 +- python/marble/_core.pyi | 22 ++-- src/solver.cpp | 204 +++++++++++++++++++++------------- src/workspace.cpp | 2 + 8 files changed, 233 insertions(+), 128 deletions(-) diff --git a/bindings/julia_bindings.cpp b/bindings/julia_bindings.cpp index 8af9cc4..e9d2f10 100644 --- a/bindings/julia_bindings.cpp +++ b/bindings/julia_bindings.cpp @@ -164,6 +164,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { OPTION_RW(gamma_constraint, double) OPTION_RW(ruiz_iterations, int) OPTION_RW(inertia_warmstart, bool) + OPTION_RW(comp_init_random, bool) + OPTION_RW(comp_init_seed, int) OPTION_RW(verbosity, int) OPTION_RW(print_every, int) OPTION_RW(debug, bool) @@ -291,26 +293,26 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("get_workspace", &Solver::get_workspace) .method("get_filter", &Solver::get_filter) // Retraction maps - .method("retract", [](Solver& s, jlcxx::ArrayRef v, double sqrt_relax_param) { - Vec r = s.retract(to_eigen(v), sqrt_relax_param); + .method("retract", [](Solver& s, jlcxx::ArrayRef v, double relax_param) { + Vec r = s.retract(to_eigen(v), relax_param); return std::vector(r.data(), r.data() + r.size()); }) - .method("retract_deriv", [](Solver& s, jlcxx::ArrayRef v, double sqrt_relax_param) { - Vec r = s.retract_deriv(to_eigen(v), sqrt_relax_param); + .method("retract_deriv", [](Solver& s, jlcxx::ArrayRef v, double relax_param) { + Vec r = s.retract_deriv(to_eigen(v), relax_param); return std::vector(r.data(), r.data() + r.size()); }) - .method("retract_second_deriv", [](Solver& s, jlcxx::ArrayRef v, double sqrt_relax_param) { - Vec r = s.retract_second_deriv(to_eigen(v), sqrt_relax_param); + .method("retract_second_deriv", [](Solver& s, jlcxx::ArrayRef v, double relax_param) { + Vec r = s.retract_second_deriv(to_eigen(v), relax_param); return std::vector(r.data(), r.data() + r.size()); }) // KKT updates .method("update_KKT_residual!", &Solver::update_KKT_residual) .method("update_KKT_system!", &Solver::update_KKT_system) - .method("update_KKT_ineq!", [](Solver& s, jlcxx::ArrayRef s_ineq, double sqrt_relax_param) { - s.update_KKT_ineq(to_eigen(s_ineq), sqrt_relax_param); + .method("update_KKT_ineq!", [](Solver& s, jlcxx::ArrayRef s_ineq, double relax_param) { + s.update_KKT_ineq(to_eigen(s_ineq), relax_param); }) - .method("update_KKT_comp!", [](Solver& s, jlcxx::ArrayRef s_comp, jlcxx::ArrayRef m_comp, double sqrt_relax_param) { - s.update_KKT_comp(to_eigen(s_comp), to_eigen(m_comp), sqrt_relax_param); + .method("update_KKT_comp!", [](Solver& s, jlcxx::ArrayRef s_comp, jlcxx::ArrayRef m_comp, double relax_param) { + s.update_KKT_comp(to_eigen(s_comp), to_eigen(m_comp), relax_param); }) .method("update_KKT_penalty!", &Solver::update_KKT_penalty) .method("update_KKT_primal_regularizer!", &Solver::update_KKT_primal_regularizer) @@ -320,11 +322,16 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("analytical_factorization!", &Solver::analytical_factorization) .method("numerical_factorization!", &Solver::numerical_factorization) .method("check_inertia", &Solver::check_inertia) - .method("backsolve!", &Solver::backsolve) + .method("backsolve!", static_cast(&Solver::backsolve)) + .method("backsolve!", [](Solver& s, jlcxx::ArrayRef b, jlcxx::ArrayRef x) { + Vec xv; + s.backsolve(to_eigen(b), xv); + for (int i = 0; i < xv.size(); i++) x[i] = xv[i]; + }) // Linesearch .method("filter_linesearch!", &Solver::filter_linesearch) - .method("entry_from_solution", [](const Solver& s, double sqrt_relax_param, double inv_penalty_param) { - Filter::Entry e = s.entry_from_solution(sqrt_relax_param, inv_penalty_param); + .method("entry_from_solution", [](const Solver& s, double relax_param, double inv_penalty_param) { + Filter::Entry e = s.entry_from_solution(relax_param, inv_penalty_param); return std::make_tuple(e.feas, e.merit); }) // Dimensions diff --git a/bindings/python_bindings.cpp b/bindings/python_bindings.cpp index 34919b5..cb30d4a 100644 --- a/bindings/python_bindings.cpp +++ b/bindings/python_bindings.cpp @@ -158,6 +158,8 @@ PYBIND11_MODULE(_core, m) { .def_readwrite("gamma_constraint", &Solver::Options::gamma_constraint) .def_readwrite("ruiz_iterations", &Solver::Options::ruiz_iterations) .def_readwrite("inertia_warmstart", &Solver::Options::inertia_warmstart) + .def_readwrite("comp_init_random", &Solver::Options::comp_init_random) + .def_readwrite("comp_init_seed", &Solver::Options::comp_init_seed) .def_readwrite("verbosity", &Solver::Options::verbosity) .def_readwrite("print_every", &Solver::Options::print_every) .def_readwrite("debug", &Solver::Options::debug) @@ -294,24 +296,24 @@ PYBIND11_MODULE(_core, m) { py::return_value_policy::reference_internal) // Retraction maps .def("retract", &Solver::retract, - py::arg("s"), py::arg("sqrt_relax_param")) + py::arg("s"), py::arg("relax_param")) .def("retract_deriv", &Solver::retract_deriv, - py::arg("s"), py::arg("sqrt_relax_param")) + py::arg("s"), py::arg("relax_param")) .def("retract_second_deriv", &Solver::retract_second_deriv, - py::arg("s"), py::arg("sqrt_relax_param")) + py::arg("s"), py::arg("relax_param")) // KKT updates .def("update_KKT_residual", &Solver::update_KKT_residual, - py::arg("sqrt_relax_param"), py::arg("inv_penalty_param")) + py::arg("relax_param"), py::arg("inv_penalty_param")) .def("update_KKT_system", &Solver::update_KKT_system, - py::arg("sqrt_relax_param"), py::arg("inv_penalty_param")) - .def("update_KKT_ineq", [](Solver& s, const Vec& s_ineq, double sqrt_relax_param) { - s.update_KKT_ineq(s_ineq, sqrt_relax_param); + py::arg("relax_param"), py::arg("inv_penalty_param")) + .def("update_KKT_ineq", [](Solver& s, const Vec& s_ineq, double relax_param) { + s.update_KKT_ineq(s_ineq, relax_param); }, - py::arg("s_ineq"), py::arg("sqrt_relax_param")) - .def("update_KKT_comp", [](Solver& s, const Vec& s_comp, const Vec& m_comp, double sqrt_relax_param) { - s.update_KKT_comp(s_comp, m_comp, sqrt_relax_param); + py::arg("s_ineq"), py::arg("relax_param")) + .def("update_KKT_comp", [](Solver& s, const Vec& s_comp, const Vec& m_comp, double relax_param) { + s.update_KKT_comp(s_comp, m_comp, relax_param); }, - py::arg("s_comp"), py::arg("m_comp"), py::arg("sqrt_relax_param")) + py::arg("s_comp"), py::arg("m_comp"), py::arg("relax_param")) .def("update_KKT_penalty", &Solver::update_KKT_penalty, py::arg("inv_penalty_param")) .def("update_KKT_primal_regularizer", &Solver::update_KKT_primal_regularizer, @@ -322,15 +324,20 @@ PYBIND11_MODULE(_core, m) { .def("analytical_factorization",&Solver::analytical_factorization) .def("numerical_factorization", &Solver::numerical_factorization) .def("check_inertia", &Solver::check_inertia) - .def("backsolve", &Solver::backsolve) + .def("backsolve", static_cast(&Solver::backsolve)) + .def("backsolve", [](Solver& s, const Vec& b) { + Vec x; + s.backsolve(b, x); + return x; + }, py::arg("b")) // Linesearch .def("filter_linesearch", &Solver::filter_linesearch, - py::arg("sqrt_relax_param"), py::arg("inv_penalty_param"), py::arg("max_iters")) - .def("entry_from_solution", [](const Solver& s, double sqrt_relax_param, double inv_penalty_param) { - Filter::Entry e = s.entry_from_solution(sqrt_relax_param, inv_penalty_param); + py::arg("relax_param"), py::arg("inv_penalty_param"), py::arg("max_iters")) + .def("entry_from_solution", [](const Solver& s, double relax_param, double inv_penalty_param) { + Filter::Entry e = s.entry_from_solution(relax_param, inv_penalty_param); return py::make_tuple(e.feas, e.merit); }, - py::arg("sqrt_relax_param"), py::arg("inv_penalty_param")) + py::arg("relax_param"), py::arg("inv_penalty_param")) // Dimension info .def_readonly("n_primals", &Solver::n_primals) .def_readonly("n_duals", &Solver::n_duals) diff --git a/include/solver.h b/include/solver.h index ed3a5a5..52ca131 100644 --- a/include/solver.h +++ b/include/solver.h @@ -72,6 +72,11 @@ class Solver { /// Warm-start each inner Newton step's inertia regularizer from the last successful value /// (false restarts the regularizer from 0 at every inner step) bool inertia_warmstart{true}; + /// Initialize s_comp with small random noise (true) or zeros (false) + bool comp_init_random{true}; + /// Seed for the small random noise used to initialize s_comp + /// (negative leaves the RNG unseeded, i.e. non-deterministic across runs) + int comp_init_seed{-1}; /// Output directory for solution and solve information std::filesystem::path output_dir{"/dev/null"}; /// Verbosity level: 0=silent, 1=per-iteration table + footer @@ -131,17 +136,27 @@ class Solver { /** * Retraction map (elementwise) */ - Vec retract(const Vec& s, double sqrt_relax_param) const; + Vec retract(const Vec& s, double relax_param) const; /** * Retraction map derivative (elementwise) */ - Vec retract_deriv(const Vec& s, double sqrt_relax_param) const; + Vec retract_deriv(const Vec& s, double relax_param) const; /** * Retraction map second derivative (elementwise) */ - Vec retract_second_deriv(const Vec& s, double sqrt_relax_param) const; + Vec retract_second_deriv(const Vec& s, double relax_param) const; + + /** + * Derivative of the retraction map wrt the relaxation parameter kappa (elementwise) + */ + Vec retract_drelax(const Vec& s, double relax_param) const; + + /** + * Mixed derivative of the retraction map wrt s and the relaxation parameter kappa (elementwise) + */ + Vec retract_deriv_drelax(const Vec& s, double relax_param) const; /** * Ruiz equilibration for current problem data using copies of H and J_*. @@ -176,22 +191,24 @@ class Solver { /** * Compute KKT residual given the current guess stored in the workspace */ - void update_KKT_residual(double sqrt_relax_param, double inv_penalty_param); + void update_KKT_residual(double relax_param, double inv_penalty_param); + + void update_dKKT_residual_drelax(double relax_param); /** * Update KKT system given the current guess stored in the workspace */ - void update_KKT_system(double sqrt_relax_param, double inv_penalty_param); + void update_KKT_system(double relax_param, double inv_penalty_param); /** * Update the KKT terms associated with s_ineq (no dependence on m_ineq) */ - void update_KKT_ineq(const Vec& s_ineq, double sqrt_relax_param); + void update_KKT_ineq(const Vec& s_ineq, double relax_param); /** * Update the KKT terms associated with s_comp and m_comp */ - void update_KKT_comp(const Vec& s_comp, const Vec& m_comp, double sqrt_relax_param); + void update_KKT_comp(const Vec& s_comp, const Vec& m_comp, double relax_param); /** * Update the KKT penalty diagonal @@ -222,10 +239,20 @@ class Solver { /** * Solve the KKT system using the factorized matrix, populating the solution - * in workspace->newton_step. + * in workspace->newton_step with rhs -kkt_residual. */ void backsolve(); + /** + * Solve K x = b using the currently factorized KKT matrix, where K is the + * unscaled system (the Ruiz scaling stored in workspace->scaling is applied + * internally). Populates x with the solution. + * + * @param b right-hand side vector (length n_vars) + * @param x solution vector to populate (length n_vars); must not alias b + */ + void backsolve(const Vec& b, Vec& x); + /** * Compute AMD ordering */ @@ -247,19 +274,19 @@ class Solver { return *filter; } - Filter::Entry entry_from_solution(double sqrt_relax_param, double inv_penalty_param) const; + Filter::Entry entry_from_solution(double relax_param, double inv_penalty_param) const; /** * Perform backtracking filter linesearch given a step direction * - * @param sqrt_relax_param Square root of the complementarity and inequality relaxation parameter + * @param relax_param Complementarity and inequality relaxation parameter (kappa) * @param inv_penalty_param Inverse of the AL penalty parameter * @param max_iters Maximum number of iterations for the linesearch * @warning This function modifies the workspace solution to store the candidate solution, and updates the constraint residuals based on the candidate solution, which are used to evaluate the filter conditions. If the linesearch fails, the workspace solution is restored to its original value before returning. * @return true Linesearch succeeded, new iterate is stored in workspace x_candidate * @return false Linesearch failed */ - bool filter_linesearch(const double sqrt_relax_param, const double inv_penalty_param, int max_iters); + bool filter_linesearch(const double relax_param, const double inv_penalty_param, int max_iters); /** * Solve the current problem instance. diff --git a/include/workspace.h b/include/workspace.h index 0bc9aff..1e78295 100644 --- a/include/workspace.h +++ b/include/workspace.h @@ -29,7 +29,7 @@ class Workspace { Vec m_ineq_est; /** Inequality multiplier estimates for AL */ Vec m_comp_est; /** Complementarity multiplier estimates for AL */ - + Vec dkkt_residual_drelax; Vec kkt_residual; /** KKT residual, driven to 0 in each subproblem solve */ // Diagonal terms for s_ineq and s_comp stationarity, stored @@ -60,7 +60,8 @@ class Workspace { // KKT step Vec newton_step; /** Newton step for the KKT system (possibly computed with regularization) */ - + Vec dsolution_drelax; /** Derivative of the solution with respect to the relaxation parameter, computed using IFT */ + // Work arrays for QDLDL // Workspace arrays required by QDLDL Eigen::Matrix etree; diff --git a/julia/examples/simple_test.jl b/julia/examples/simple_test.jl index 0d1cf53..c49bfea 100644 --- a/julia/examples/simple_test.jl +++ b/julia/examples/simple_test.jl @@ -26,7 +26,12 @@ mpcc = MPCC(model, ) solver = Marble.Solver() -Marble.setup!(solver, mpcc; verbosity = 1) +Marble.setup!(solver, mpcc; +verbosity = 1, +# comp_init_seed = 42 +comp_init_random=false, +relaxation_scaling=0.1, +) results = Marble.solve!(solver) z = Marble.z(results) diff --git a/python/marble/_core.pyi b/python/marble/_core.pyi index da543cd..b350170 100644 --- a/python/marble/_core.pyi +++ b/python/marble/_core.pyi @@ -139,17 +139,21 @@ class Solver: ... def analytical_factorization(self) -> bool: ... + @typing.overload def backsolve(self) -> None: ... + @typing.overload + def backsolve(self, b: numpy.ndarray) -> numpy.ndarray: + ... def check_inertia(self) -> bool: ... def compute_amd_ordering(self) -> None: ... def convergence(self, options: SolverOptions) -> bool: ... - def entry_from_solution(self, sqrt_relax_param: float, inv_penalty_param: float) -> tuple: + def entry_from_solution(self, relax_param: float, inv_penalty_param: float) -> tuple: ... - def filter_linesearch(self, sqrt_relax_param: float, inv_penalty_param: float, max_iters: int) -> bool: + def filter_linesearch(self, relax_param: float, inv_penalty_param: float, max_iters: int) -> bool: ... def get_filter(self) -> Filter: ... @@ -163,11 +167,11 @@ class Solver: ... def numerical_factorization(self) -> bool: ... - def retract(self, s: numpy.ndarray, sqrt_relax_param: float) -> numpy.ndarray: + def retract(self, s: numpy.ndarray, relax_param: float) -> numpy.ndarray: ... - def retract_deriv(self, s: numpy.ndarray, sqrt_relax_param: float) -> numpy.ndarray: + def retract_deriv(self, s: numpy.ndarray, relax_param: float) -> numpy.ndarray: ... - def retract_second_deriv(self, s: numpy.ndarray, sqrt_relax_param: float) -> numpy.ndarray: + def retract_second_deriv(self, s: numpy.ndarray, relax_param: float) -> numpy.ndarray: ... def ruiz_equilibration(self, niter: int) -> numpy.ndarray: ... @@ -175,17 +179,17 @@ class Solver: ... def solve(self) -> SolveResult: ... - def update_KKT_comp(self, s_comp: numpy.ndarray, m_comp: numpy.ndarray, sqrt_relax_param: float) -> None: + def update_KKT_comp(self, s_comp: numpy.ndarray, m_comp: numpy.ndarray, relax_param: float) -> None: ... - def update_KKT_ineq(self, s_ineq: numpy.ndarray, sqrt_relax_param: float) -> None: + def update_KKT_ineq(self, s_ineq: numpy.ndarray, relax_param: float) -> None: ... def update_KKT_penalty(self, inv_penalty_param: float) -> None: ... def update_KKT_primal_regularizer(self, reg: float) -> None: ... - def update_KKT_residual(self, sqrt_relax_param: float, inv_penalty_param: float) -> None: + def update_KKT_residual(self, relax_param: float, inv_penalty_param: float) -> None: ... - def update_KKT_system(self, sqrt_relax_param: float, inv_penalty_param: float) -> None: + def update_KKT_system(self, relax_param: float, inv_penalty_param: float) -> None: ... @property def comp_L_inds(self) -> numpy.ndarray: diff --git a/src/solver.cpp b/src/solver.cpp index 10c2772..3935cfb 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include @@ -58,27 +59,41 @@ namespace { } } -Vec Solver::retract(const Vec& s, double sqrt_relax_param) const { +Vec Solver::retract(const Vec& s, double relax_param) const { // Vectorized retraction map for both inequality and complementarity slacks - // p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa)), kappa = sqrt_relax_param^2 - const double four_kappa = 4.0 * sqrt_relax_param * sqrt_relax_param; + // p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa)), kappa = relax_param + const double four_kappa = 4.0 * relax_param; return (0.5 * (s.array() + (s.array().square() + four_kappa).sqrt())).matrix(); } -Vec Solver::retract_deriv(const Vec& s, double sqrt_relax_param) const { +Vec Solver::retract_deriv(const Vec& s, double relax_param) const { // Derivative of the vectorized retraction map above // p'(s) = 0.5 * (1 + s / sqrt(s^2 + 4*kappa)) - const double four_kappa = 4.0 * sqrt_relax_param * sqrt_relax_param; + const double four_kappa = 4.0 * relax_param; return (0.5 * (1.0 + s.array() / (s.array().square() + four_kappa).sqrt())).matrix(); } -Vec Solver::retract_second_deriv(const Vec& s, double sqrt_relax_param) const { +Vec Solver::retract_second_deriv(const Vec& s, double relax_param) const { // Second derivative of the vectorized retraction map above // p''(s) = 2*kappa / (s^2 + 4*kappa)^(3/2) - const double kappa = sqrt_relax_param * sqrt_relax_param; + const double kappa = relax_param; return (2.0 * kappa * (s.array().square() + 4.0 * kappa).pow(-1.5)).matrix(); } +Vec Solver::retract_drelax(const Vec& s, double relax_param) const { + // Derivative of the retraction map wrt the relaxation parameter kappa = relax_param + // dp/dkappa = 1 / sqrt(s^2 + 4*kappa) + const double four_kappa = 4.0 * relax_param; + return (s.array().square() + four_kappa).rsqrt().matrix(); +} + +Vec Solver::retract_deriv_drelax(const Vec& s, double relax_param) const { + // Mixed derivative of the retraction map wrt s and kappa = relax_param + // d/dkappa p'(s) = -s / (s^2 + 4*kappa)^(3/2) + const double four_kappa = 4.0 * relax_param; + return (-s.array() * (s.array().square() + four_kappa).pow(-1.5)).matrix(); +} + void Solver::set_problem(Problem problem, Solver::Options& options) { this->prob = std::make_shared(std::move(problem)); set_problem(options); @@ -257,7 +272,7 @@ void Solver::initialize_kkt_sparsity() { } } -void Solver::update_KKT_residual(double sqrt_relax_param, double inv_penalty_param) { +void Solver::update_KKT_residual(double relax_param, double inv_penalty_param) { // Compute the constraint residuals // TODO: we don't need to recompute these; they will have been already computed in the linesearch beforehand @@ -273,12 +288,12 @@ void Solver::update_KKT_residual(double sqrt_relax_param, double inv_penalty_par prob->J_comp.transpose() * workspace->m_comp; // Inequality slack stationarity - Vec p_neg_ineq = retract(-workspace->s_ineq, sqrt_relax_param); - Vec d_p_ineq = retract_deriv(workspace->s_ineq, sqrt_relax_param); + Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); + Vec d_p_ineq = retract_deriv(workspace->s_ineq, relax_param); workspace->kkt_residual(s_ineq_inds) = d_p_ineq.cwiseProduct(-workspace->m_ineq - p_neg_ineq); // Complementarity slack stationarity - Vec d_p_comp = retract_deriv(workspace->s_comp, sqrt_relax_param); + Vec d_p_comp = retract_deriv(workspace->s_comp, relax_param); for (int i = 0; i < prob->n_comp; i++) { workspace->kkt_residual(s_comp_inds[i]) = -d_p_comp[i] * workspace->m_comp[2 * i] + (1 - d_p_comp[i]) * workspace->m_comp[2 * i + 1]; @@ -294,7 +309,7 @@ void Solver::update_KKT_residual(double sqrt_relax_param, double inv_penalty_par inv_penalty_param * (workspace->m_ineq - workspace->m_ineq_est); // Complementarity primal feasibility - Vec p_comp = retract(workspace->s_comp, sqrt_relax_param); + Vec p_comp = retract(workspace->s_comp, relax_param); workspace->kkt_residual(m_comp_inds) = workspace->residual_comp - inv_penalty_param * (workspace->m_comp - workspace->m_comp_est); for (int i = 0; i < prob->n_comp; i++) { @@ -303,20 +318,56 @@ void Solver::update_KKT_residual(double sqrt_relax_param, double inv_penalty_par } } -void Solver::update_KKT_system(double sqrt_relax_param, double inv_penalty_param) { +void Solver::update_dKKT_residual_drelax(double relax_param) { + // Derivative of the KKT residual wrt the relaxation parameter kappa (= relax_param). + workspace->dkkt_residual_drelax.setZero(); + + // Inequality slack stationarity: r = p'(s) * (-m_ineq - p(-s)) + // d/dkappa = p'_kappa(s) * (-m_ineq - p(-s)) - p'(s) * p_kappa(-s) + // (p(-s) is even in s, so p_kappa(-s) = p_kappa(s) = retract_drelax(s)) + Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); + Vec d_p_ineq = retract_deriv(workspace->s_ineq, relax_param); + Vec dp_ineq_dk = retract_drelax(workspace->s_ineq, relax_param); + Vec dd_p_ineq_dk = retract_deriv_drelax(workspace->s_ineq, relax_param); + workspace->dkkt_residual_drelax(s_ineq_inds) = + dd_p_ineq_dk.cwiseProduct(-workspace->m_ineq - p_neg_ineq) - d_p_ineq.cwiseProduct(dp_ineq_dk); + + // Complementarity slack stationarity: r = -p'(s)*m0 + (1 - p'(s))*m1 + // d/dkappa = -p'_kappa(s) * (m0 + m1) + Vec dp_comp_dk = retract_drelax(workspace->s_comp, relax_param); + Vec dd_p_comp_dk = retract_deriv_drelax(workspace->s_comp, relax_param); + for (int i = 0; i < prob->n_comp; i++) { + workspace->dkkt_residual_drelax(s_comp_inds[i]) = + -dd_p_comp_dk[i] * (workspace->m_comp[2 * i] + workspace->m_comp[2 * i + 1]); + } + + // Inequality primal feasibility: r = ... - (s + p(-s)) - ... + // d/dkappa = -p_kappa(-s) = -retract_drelax(s) + workspace->dkkt_residual_drelax(m_ineq_inds) = -dp_ineq_dk; + + // Complementarity primal feasibility: + // row 2i += -p(s) -> d/dkappa = -p_kappa(s) + // row 2i+1 += -(p(s) - s) -> d/dkappa = -p_kappa(s) + for (int i = 0; i < prob->n_comp; i++) { + workspace->dkkt_residual_drelax(m_comp_inds[2 * i]) = -dp_comp_dk[i]; + workspace->dkkt_residual_drelax(m_comp_inds[2 * i + 1]) = -dp_comp_dk[i]; + } +} + +void Solver::update_KKT_system(double relax_param, double inv_penalty_param) { // Update KKT system terms that depend on the solution, which are the nonlinear terms associated with the inequality // and complementarity slacks and multipliers, as well as the penalty terms - update_KKT_ineq(workspace->s_ineq, sqrt_relax_param); - update_KKT_comp(workspace->s_comp, workspace->m_comp, sqrt_relax_param); + update_KKT_ineq(workspace->s_ineq, relax_param); + update_KKT_comp(workspace->s_comp, workspace->m_comp, relax_param); update_KKT_penalty(inv_penalty_param); } -void Solver::update_KKT_ineq(const Vec& s_ineq, double sqrt_relax_param) { +void Solver::update_KKT_ineq(const Vec& s_ineq, double relax_param) { Eigen::Map nzval(workspace->kkt_system.valuePtr(), workspace->kkt_system.nonZeros()); Eigen::Ref scaling = workspace->scaling; - Vec d_p = retract_deriv(s_ineq, sqrt_relax_param); + Vec d_p = retract_deriv(s_ineq, relax_param); - // Use identity that retract_deriv(-s_ineq, sqrt_relax_param) = 1 - d_p + // Use identity that retract_deriv(-s_ineq, relax_param) = 1 - d_p workspace->s_ineq_stationarity = -d_p.cwiseProduct(d_p) + d_p; // -d_p*d_neg_p (stored for diag updating) for (int i = 0; i < prob->n_ineq; i++) { nzval(s_ineq_s_ineq_inds[i]) = scaling(s_ineq_inds[i]) * workspace->s_ineq_stationarity[i] * scaling(s_ineq_inds[i]); @@ -325,11 +376,11 @@ void Solver::update_KKT_ineq(const Vec& s_ineq, double sqrt_relax_param) { } // TODO: fix indexing into m_comp so that it can be a const reference -void Solver::update_KKT_comp(const Vec& s_comp, const Vec& m_comp, double sqrt_relax_param) { +void Solver::update_KKT_comp(const Vec& s_comp, const Vec& m_comp, double relax_param) { Eigen::Map nzval(workspace->kkt_system.valuePtr(), workspace->kkt_system.nonZeros()); Eigen::Ref scaling = workspace->scaling; - Vec d_p = retract_deriv(s_comp, sqrt_relax_param); - Vec dd_p = retract_second_deriv(s_comp, sqrt_relax_param); + Vec d_p = retract_deriv(s_comp, relax_param); + Vec dd_p = retract_second_deriv(s_comp, relax_param); for (int i = 0; i < prob->n_comp; i++) { // Derivative of -p'(s)*m1 + p'(-s)*m2 wrt s @@ -410,18 +461,24 @@ bool Solver::check_inertia() { } void Solver::backsolve() { - // Initialize step as -residual, permuted using AMD ordering - for (int k = 0; k < n_vars; k++) { - workspace->newton_step[k] = -workspace->kkt_residual(workspace->amd_perm_vec[k])*workspace->scaling(workspace->amd_perm_vec[k]); // Need to apply scaling to the residual for the backsolve - } + // Newton step: solve K * newton_step = -kkt_residual + backsolve(-workspace->kkt_residual, workspace->newton_step); +} + +void Solver::backsolve(const Vec& b, Vec& x) { + // The factorization is of the scaled system D*K*D (D = diag(scaling)), so to + // solve K x = b we solve (D*K*D) y = D*b for y and recover x = D*y. + // The RHS is also permuted into AMD ordering; the result is unpermuted after. + // eval() guards against aliasing between b and x. + x = (b.cwiseProduct(workspace->scaling))(workspace->amd_perm_vec).eval(); // Solve system QDLDL_solve(n_vars, workspace->Lp.data(), workspace->Li.data(), workspace->Lx.data(), - workspace->Dinv.data(), workspace->newton_step.data()); + workspace->Dinv.data(), x.data()); - // Unpermute solution - workspace->newton_step = workspace->newton_step(workspace->amd_iperm_vec).eval(); - workspace->newton_step = workspace->newton_step.cwiseProduct(workspace->scaling).eval(); // Need to unscale the step after the backsolve + // Unpermute solution and recover x = D*y + x = x(workspace->amd_iperm_vec).eval(); + x = x.cwiseProduct(workspace->scaling).eval(); } void Solver::compute_amd_ordering() { @@ -461,6 +518,10 @@ SolveResult Solver::solve() { double outer_step_kkt_norm_adjustment = 1.0; workspace->solution.setZero(); + if (options.comp_init_random) { + if (options.comp_init_seed >= 0) std::srand(static_cast(options.comp_init_seed)); + workspace->s_comp = 0.01 * Vec::Random(prob->n_comp); + } workspace->m_eq_est.setZero(); workspace->m_ineq_est.setZero(); workspace->m_comp_est.setZero(); @@ -519,10 +580,10 @@ SolveResult Solver::solve() { for (int iter = 0; iter < options.max_iters; ++iter) { // Compute KKT residual and check convergence - double sqrt_relaxation_param = sqrt(workspace->relax_param); + double relaxation_param = workspace->relax_param; double inv_penalty_param = 1.0 / workspace->penalty_param; - update_KKT_residual(sqrt_relaxation_param, inv_penalty_param); + update_KKT_residual(relaxation_param, inv_penalty_param); const bool should_print = verbose && iter % options.print_every == 0; const bool should_log = debug && iter % options.debug_log_every == 0; @@ -579,49 +640,42 @@ SolveResult Solver::solve() { outer_step_kkt_norm_adjustment /= 10.0; } - // workspace->m_eq_est = workspace->m_eq; - // workspace->m_ineq_est = workspace->m_ineq; - // workspace->m_comp_est = workspace->m_comp; - - // // Scale relaxation parameter - // workspace->relax_param = std::max(workspace->relax_param * options.relaxation_scaling, options.relaxation_min); - // workspace->penalty_param = std::min(workspace->penalty_param * options.penalty_scaling, options.penalty_max); - if (workspace->penalty_param >= options.penalty_max) { - // If we are at the maximum penalty, we can just update multiplier estimates without increasing penalty + + // Use the existing factorization to get an estmate of d(solution*)/d(relaxation_param) using IFT + update_dKKT_residual_drelax(workspace->relax_param); + backsolve(-workspace->dkkt_residual_drelax, workspace->dsolution_drelax); + + // Update relaxation parameter + double delta_relax_param = (options.relaxation_scaling - 1) * workspace->relax_param; + double relax_param_new = workspace->relax_param + delta_relax_param; + + workspace->solution += workspace->dsolution_drelax * delta_relax_param; + + // update_KKT_residual(relax_param_new, inv_penalty_param); + + // int predictor_backtracks = 0; + // while (workspace->kkt_residual.lpNorm() > 10.0 && + // ++predictor_backtracks < options.max_iters_linesearch) { + // delta_relax_param *= 0.5; + // relax_param_new = workspace->relax_param + delta_relax_param; + + // workspace->solution -= workspace->dsolution_drelax * delta_relax_param; + // update_KKT_residual(relax_param_new, inv_penalty_param); + // } + + // If we are at the maximum penalty, we just update multiplier estimates without increasing penalty workspace->m_eq_est = workspace->m_eq; workspace->m_ineq_est = workspace->m_ineq; workspace->m_comp_est = workspace->m_comp; // Scale relaxation parameter - workspace->relax_param = std::max(workspace->relax_param * options.relaxation_scaling, options.relaxation_min); + workspace->relax_param = relax_param_new; } else { - // Otherwise, increase penalty and update multiplier estimates with scaling + // Increase penalty parameter workspace->penalty_param = std::min(workspace->penalty_param * options.penalty_scaling, options.penalty_max); } - // Check constraint violation - // Primal feasibility - // double eq_violation = workspace->residual_eq.lpNorm(); - // double ineq_violation = workspace->residual_ineq.cwiseMin(0).lpNorm(); - - // Vec comp_strict = workspace->residual_comp(comp_L_inds).cwiseProduct(workspace->residual_comp(comp_R_inds)); - // double comp_violation = (comp_strict - Eigen::VectorXd::Constant(comp_strict.size(), workspace->relax_param)).lpNorm(); - - // double theta = std::max({eq_violation, ineq_violation, comp_violation}); - - // if (theta < 0.75 * theta_prev) { - // workspace->m_eq_est = workspace->m_eq; - // workspace->m_ineq_est = workspace->m_ineq; - // workspace->m_comp_est = workspace->m_comp; - - // // Scale relaxation parameter - // workspace->relax_param = std::max(workspace->relax_param * options.relaxation_scaling, options.relaxation_min); - // } else { - // // Otherwise, increase penalty and update multiplier estimates with scaling - // workspace->penalty_param = std::min(workspace->penalty_param * options.penalty_scaling, options.penalty_max); - // } - // Clear the filter // theta_prev = theta; filter->clear(); @@ -633,7 +687,7 @@ SolveResult Solver::solve() { bool factorization_succeeded = false; bool inertia_correction_succeeded = false; - update_KKT_system(sqrt_relaxation_param, inv_penalty_param); + update_KKT_system(relaxation_param, inv_penalty_param); auto bump_reg = [](double r) { return r == 0.0 ? 1e-8 : 10.0 * r; @@ -669,7 +723,7 @@ SolveResult Solver::solve() { backsolve(); linesearch_succeeded = filter_linesearch( - sqrt_relaxation_param, + relaxation_param, inv_penalty_param, options.max_iters_linesearch ); @@ -695,9 +749,9 @@ SolveResult Solver::solve() { } if (verbose || debug) { - double sqrt_relax = sqrt(workspace->relax_param); + double relaxation_param = workspace->relax_param; double inv_pen = 1.0 / workspace->penalty_param; - update_KKT_residual(sqrt_relax, inv_pen); + update_KKT_residual(relaxation_param, inv_pen); auto [kkt, eq_vio, ineq_vio, comp_vio, obj] = compute_metrics(); if (verbose) { print_solve_footer(converged, n_iter_outer, n_iter_inner, n_factorizations, @@ -745,16 +799,14 @@ SolveResult Solver::solve() { }; } -// TODO: is maybe weird that this is part of Solver and not Filter... but need access to the workspace and problem -// to compute these quantities -Filter::Entry Solver::entry_from_solution(double sqrt_relax_param, double inv_penalty_param) const { +Filter::Entry Solver::entry_from_solution(double relax_param, double inv_penalty_param) const { Vec m_eq_primal_feas = workspace->residual_eq - inv_penalty_param * (workspace->m_eq - workspace->m_eq_est); - Vec p_ineq = retract(workspace->s_ineq, sqrt_relax_param); + Vec p_ineq = retract(workspace->s_ineq, relax_param); Vec m_ineq_primal_feas = workspace->residual_ineq - p_ineq - // p(s) - p(-s) = s inv_penalty_param * (workspace->m_ineq - workspace->m_ineq_est); - Vec p_comp = retract(workspace->s_comp, sqrt_relax_param); + Vec p_comp = retract(workspace->s_comp, relax_param); Vec m_comp_primal_feas = workspace->residual_comp - inv_penalty_param * (workspace->m_comp - workspace->m_comp_est); @@ -769,7 +821,7 @@ Filter::Entry Solver::entry_from_solution(double sqrt_relax_param, double inv_pe double candidate_objective = 0.5 * workspace->z.transpose() * prob->cost_hessian * workspace->z + prob->cost_gradient.dot(workspace->z) + prob->cost_const - - pow(sqrt_relax_param, 2) * p_ineq.array().log().sum() + + relax_param * p_ineq.array().log().sum() + 0.5 * inv_penalty_param * (workspace->m_eq.squaredNorm() + workspace->m_ineq.squaredNorm() + workspace->m_comp.squaredNorm()); @@ -779,7 +831,7 @@ Filter::Entry Solver::entry_from_solution(double sqrt_relax_param, double inv_pe }; } -bool Solver::filter_linesearch(double sqrt_relax_param, double inv_penalty_param, int max_iters) { +bool Solver::filter_linesearch(double relax_param, double inv_penalty_param, int max_iters) { double step_size = 1.0; workspace->solution += step_size * workspace->newton_step; // Candidate solution for full step @@ -794,7 +846,7 @@ bool Solver::filter_linesearch(double sqrt_relax_param, double inv_penalty_param workspace->residual_ineq = prob->J_ineq * workspace->z + prob->c_ineq; workspace->residual_comp = prob->J_comp * workspace->z + prob->c_comp; - const Filter::Entry candidate = entry_from_solution(sqrt_relax_param, inv_penalty_param); + const Filter::Entry candidate = entry_from_solution(relax_param, inv_penalty_param); if (filter->acceptable(candidate)) { filter->update(candidate); diff --git a/src/workspace.cpp b/src/workspace.cpp index 9c619b7..d4104d5 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -17,9 +17,11 @@ Workspace::Workspace(const Problem& prob) int n_vars = prob.nz + prob.n_ineq + prob.n_comp + prob.n_eq + prob.n_ineq + 2 * prob.n_comp; kkt_residual.resize(n_vars); + dkkt_residual_drelax.resize(n_vars); s_comp_stationarity.resize(prob.n_comp); s_ineq_stationarity.resize(prob.n_ineq); newton_step.resize(n_vars); + dsolution_drelax.resize(n_vars); residual_eq.resize(prob.n_eq); residual_ineq.resize(prob.n_ineq); From 8ca1261f817be59fa131517b55713b47456223f1 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Sun, 12 Jul 2026 19:03:04 -0400 Subject: [PATCH 09/35] change Eigen func signatures to avoid accidental copies; split m_comp into 2 vectors for L/R and use L/R matrices directly --- .gitignore | 5 +- bindings/julia_bindings.cpp | 25 ++-- bindings/python_bindings.cpp | 69 ++++++----- docs/main.pdf | Bin 0 -> 158382 bytes docs/main.tex | 220 ++++++++++++++++++++++++++++++++++ include/problem.h | 14 +-- include/solver.h | 42 +++---- include/workspace.h | 10 +- python/marble/_core.pyi | 4 - src/problem.cpp | 116 +++++++----------- src/solver.cpp | 223 +++++++++++++++++++---------------- src/workspace.cpp | 16 ++- 12 files changed, 479 insertions(+), 265 deletions(-) create mode 100644 docs/main.pdf create mode 100644 docs/main.tex diff --git a/.gitignore b/.gitignore index 7039e12..8c00bdb 100644 --- a/.gitignore +++ b/.gitignore @@ -32,5 +32,8 @@ LocalPreferences.toml *.jl.mem # Testing -docs/ +docs/*.aux +docs/*.log +docs/*.out +docs/*.gz proglogs/ \ No newline at end of file diff --git a/bindings/julia_bindings.cpp b/bindings/julia_bindings.cpp index e9d2f10..ef203a7 100644 --- a/bindings/julia_bindings.cpp +++ b/bindings/julia_bindings.cpp @@ -225,16 +225,19 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("s_comp", [](Workspace& w) { return to_julia(w.s_comp); }) .method("m_eq", [](Workspace& w) { return to_julia(w.m_eq); }) .method("m_ineq", [](Workspace& w) { return to_julia(w.m_ineq); }) - .method("m_comp", [](Workspace& w) { return to_julia(w.m_comp); }) + .method("m_comp_L", [](Workspace& w) { return to_julia(w.m_comp_L); }) + .method("m_comp_R", [](Workspace& w) { return to_julia(w.m_comp_R); }) // Multiplier estimates .method("m_eq_est", [](Workspace& w) { return to_julia(w.m_eq_est); }) .method("m_ineq_est", [](Workspace& w) { return to_julia(w.m_ineq_est); }) - .method("m_comp_est", [](Workspace& w) { return to_julia(w.m_comp_est); }) + .method("m_comp_L_est", [](Workspace& w) { return to_julia(w.m_comp_L_est); }) + .method("m_comp_R_est", [](Workspace& w) { return to_julia(w.m_comp_R_est); }) // Residuals .method("kkt_residual", [](Workspace& w) { return to_julia(w.kkt_residual); }) .method("residual_eq", [](Workspace& w) { return to_julia(w.residual_eq); }) .method("residual_ineq", [](Workspace& w) { return to_julia(w.residual_ineq); }) - .method("residual_comp", [](Workspace& w) { return to_julia(w.residual_comp); }) + .method("residual_comp_L", [](Workspace& w) { return to_julia(w.residual_comp_L); }) + .method("residual_comp_R", [](Workspace& w) { return to_julia(w.residual_comp_R); }) // Scalar parameters .method("relax_param", [](const Workspace& w) { return w.relax_param; }) .method("penalty_param", [](const Workspace& w) { return w.penalty_param; }) @@ -266,7 +269,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("s_comp", [](SolveResult& r) { return to_julia(r.s_comp); }) .method("m_eq", [](SolveResult& r) { return to_julia(r.m_eq); }) .method("m_ineq", [](SolveResult& r) { return to_julia(r.m_ineq); }) - .method("m_comp", [](SolveResult& r) { return to_julia(r.m_comp); }) + .method("m_comp_L", [](SolveResult& r) { return to_julia(r.m_comp_L); }) + .method("m_comp_R", [](SolveResult& r) { return to_julia(r.m_comp_R); }) .method("setup_time_s", [](const SolveResult& r) { return r.setup_time_s; }) .method("solve_time_s", [](const SolveResult& r) { return r.solve_time_s; }); @@ -311,8 +315,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("update_KKT_ineq!", [](Solver& s, jlcxx::ArrayRef s_ineq, double relax_param) { s.update_KKT_ineq(to_eigen(s_ineq), relax_param); }) - .method("update_KKT_comp!", [](Solver& s, jlcxx::ArrayRef s_comp, jlcxx::ArrayRef m_comp, double relax_param) { - s.update_KKT_comp(to_eigen(s_comp), to_eigen(m_comp), relax_param); + .method("update_KKT_comp!", [](Solver& s, jlcxx::ArrayRef s_comp, jlcxx::ArrayRef m_comp_L, jlcxx::ArrayRef m_comp_R, double relax_param) { + s.update_KKT_comp(to_eigen(s_comp), to_eigen(m_comp_L), to_eigen(m_comp_R), relax_param); }) .method("update_KKT_penalty!", &Solver::update_KKT_penalty) .method("update_KKT_primal_regularizer!", &Solver::update_KKT_primal_regularizer) @@ -322,7 +326,6 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("analytical_factorization!", &Solver::analytical_factorization) .method("numerical_factorization!", &Solver::numerical_factorization) .method("check_inertia", &Solver::check_inertia) - .method("backsolve!", static_cast(&Solver::backsolve)) .method("backsolve!", [](Solver& s, jlcxx::ArrayRef b, jlcxx::ArrayRef x) { Vec xv; s.backsolve(to_eigen(b), xv); @@ -344,13 +347,13 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("s_comp_inds", [](Solver& s) { return to_julia(s.s_comp_inds); }) .method("m_eq_inds", [](Solver& s) { return to_julia(s.m_eq_inds); }) .method("m_ineq_inds", [](Solver& s) { return to_julia(s.m_ineq_inds); }) - .method("m_comp_inds", [](Solver& s) { return to_julia(s.m_comp_inds); }) - .method("comp_L_inds", [](Solver& s) { return to_julia(s.comp_L_inds); }) - .method("comp_R_inds", [](Solver& s) { return to_julia(s.comp_R_inds); }) + .method("m_comp_L_inds", [](Solver& s) { return to_julia(s.m_comp_L_inds); }) + .method("m_comp_R_inds", [](Solver& s) { return to_julia(s.m_comp_R_inds); }) .method("z_z_inds", [](Solver& s) { return to_julia(s.z_z_inds); }) .method("s_ineq_s_ineq_inds", [](Solver& s) { return to_julia(s.s_ineq_s_ineq_inds); }) .method("s_ineq_m_ineq_inds", [](Solver& s) { return to_julia(s.s_ineq_m_ineq_inds); }) .method("s_comp_s_comp_inds", [](Solver& s) { return to_julia(s.s_comp_s_comp_inds); }) - .method("s_comp_m_comp_inds", [](Solver& s) { return to_julia(s.s_comp_m_comp_inds); }) + .method("s_comp_m_comp_L_inds", [](Solver& s) { return to_julia(s.s_comp_m_comp_L_inds); }) + .method("s_comp_m_comp_R_inds", [](Solver& s) { return to_julia(s.s_comp_m_comp_R_inds); }) .method("options", [](Solver& s) -> Solver::Options& { return s.options; }); } diff --git a/bindings/python_bindings.cpp b/bindings/python_bindings.cpp index cb30d4a..eed7dc0 100644 --- a/bindings/python_bindings.cpp +++ b/bindings/python_bindings.cpp @@ -100,15 +100,24 @@ PYBIND11_MODULE(_core, m) { return py::make_tuple((int)p.J_ineq.rows(), (int)p.J_ineq.cols(), cp, rv, nz); }) .def_property_readonly("c_ineq", [](const Problem& p) { return p.c_ineq; }) - .def_property_readonly("J_comp", [](Problem& p) { - p.J_comp.makeCompressed(); - Eigen::VectorXi cp(p.J_comp.outerSize() + 1), rv(p.J_comp.nonZeros()); Vec nz(p.J_comp.nonZeros()); - std::copy(p.J_comp.outerIndexPtr(), p.J_comp.outerIndexPtr() + p.J_comp.outerSize() + 1, cp.data()); - std::copy(p.J_comp.innerIndexPtr(), p.J_comp.innerIndexPtr() + p.J_comp.nonZeros(), rv.data()); - std::copy(p.J_comp.valuePtr(), p.J_comp.valuePtr() + p.J_comp.nonZeros(), nz.data()); - return py::make_tuple((int)p.J_comp.rows(), (int)p.J_comp.cols(), cp, rv, nz); + .def_property_readonly("L_comp", [](Problem& p) { + p.L_comp.makeCompressed(); + Eigen::VectorXi cp(p.L_comp.outerSize() + 1), rv(p.L_comp.nonZeros()); Vec nz(p.L_comp.nonZeros()); + std::copy(p.L_comp.outerIndexPtr(), p.L_comp.outerIndexPtr() + p.L_comp.outerSize() + 1, cp.data()); + std::copy(p.L_comp.innerIndexPtr(), p.L_comp.innerIndexPtr() + p.L_comp.nonZeros(), rv.data()); + std::copy(p.L_comp.valuePtr(), p.L_comp.valuePtr() + p.L_comp.nonZeros(), nz.data()); + return py::make_tuple((int)p.L_comp.rows(), (int)p.L_comp.cols(), cp, rv, nz); }) - .def_property_readonly("c_comp", [](const Problem& p) { return p.c_comp; }) + .def_property_readonly("l_comp", [](const Problem& p) { return p.l_comp; }) + .def_property_readonly("R_comp", [](Problem& p) { + p.R_comp.makeCompressed(); + Eigen::VectorXi cp(p.R_comp.outerSize() + 1), rv(p.R_comp.nonZeros()); Vec nz(p.R_comp.nonZeros()); + std::copy(p.R_comp.outerIndexPtr(), p.R_comp.outerIndexPtr() + p.R_comp.outerSize() + 1, cp.data()); + std::copy(p.R_comp.innerIndexPtr(), p.R_comp.innerIndexPtr() + p.R_comp.nonZeros(), rv.data()); + std::copy(p.R_comp.valuePtr(), p.R_comp.valuePtr() + p.R_comp.nonZeros(), nz.data()); + return py::make_tuple((int)p.R_comp.rows(), (int)p.R_comp.cols(), cp, rv, nz); + }) + .def_property_readonly("r_comp", [](const Problem& p) { return p.r_comp; }) // Cost hessian (same CSC tuple format) .def_property_readonly("cost_hessian", [](Problem& p) { p.cost_hessian.makeCompressed(); @@ -132,7 +141,8 @@ PYBIND11_MODULE(_core, m) { .def_property_readonly("s_comp", [](const SolveResult& r) { return r.s_comp; }) .def_property_readonly("m_eq", [](const SolveResult& r) { return r.m_eq; }) .def_property_readonly("m_ineq", [](const SolveResult& r) { return r.m_ineq; }) - .def_property_readonly("m_comp", [](const SolveResult& r) { return r.m_comp; }) + .def_property_readonly("m_comp_L", [](const SolveResult& r) { return r.m_comp_L; }) + .def_property_readonly("m_comp_R", [](const SolveResult& r) { return r.m_comp_R; }) .def("__repr__", [](const SolveResult& r) { return "(&Solver::backsolve)) .def("backsolve", [](Solver& s, const Vec& b) { Vec x; s.backsolve(b, x); @@ -353,12 +368,10 @@ PYBIND11_MODULE(_core, m) { [](const Solver& s) { return s.m_eq_inds; }) .def_property_readonly("m_ineq_inds", [](const Solver& s) { return s.m_ineq_inds; }) - .def_property_readonly("m_comp_inds", - [](const Solver& s) { return s.m_comp_inds; }) - .def_property_readonly("comp_L_inds", - [](const Solver& s) { return s.comp_L_inds; }) - .def_property_readonly("comp_R_inds", - [](const Solver& s) { return s.comp_R_inds; }) + .def_property_readonly("m_comp_L_inds", + [](const Solver& s) { return s.m_comp_L_inds; }) + .def_property_readonly("m_comp_R_inds", + [](const Solver& s) { return s.m_comp_R_inds; }) .def_property_readonly("z_z_inds", [](const Solver& s) { return s.z_z_inds; }) .def_property_readonly("s_ineq_s_ineq_inds", @@ -367,6 +380,8 @@ PYBIND11_MODULE(_core, m) { [](const Solver& s) { return s.s_ineq_m_ineq_inds; }) .def_property_readonly("s_comp_s_comp_inds", [](const Solver& s) { return s.s_comp_s_comp_inds; }) - .def_property_readonly("s_comp_m_comp_inds", - [](const Solver& s) { return s.s_comp_m_comp_inds; }); + .def_property_readonly("s_comp_m_comp_L_inds", + [](const Solver& s) { return s.s_comp_m_comp_L_inds; }) + .def_property_readonly("s_comp_m_comp_R_inds", + [](const Solver& s) { return s.s_comp_m_comp_R_inds; }); } diff --git a/docs/main.pdf b/docs/main.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9ad585f777db0227b2126b91104a2125ad30848e GIT binary patch literal 158382 zcma&NV~j3L(60N8ZQHhO&l=mdwZ>Xw+qP}nwr$%y@4=UxWbYrlQ%P5MQk8W7=__?t zlPQRb(=pL=K$Fca4X;5nvlB8B+8bFx^YTJ7$e7xhyI2r1Gcs}!{yzhnLEO^D#ng$A zLEOgB#Z=VP*xtkxnx7xq*~Q7!&=%T#<5+9bX_Fmw`;w-uh@2>bqt9eR?xH0}YAb!s zu@r^}MpMZ~_Q`>a%k|@#k5Do)Nl>W;bu`;fCIXcHrn@cHS#a@;xnSNfbVbLH>-y`i zvj~YLh=r_hQ69;hDt<#;i-x!?LJneH^Gm|smkHk$MabjJko{-jm>YlQ`&K{naXz)? zz|o#7L$;GZepk3C43nf>i5F!&T*)$MUX<~KEN61vW=Ff}S*Rs6vS24j1)vE8`N@DWxIBsn|Ln=^6EHWh&*e75O z4#TL*w{LIoNpeI(l`q4#uJ#w^pm5CL4ys8L1&urww4lauskcgNu`6$4(JoAQfzQt4 zDP7a9u`ZKHpvlU7zaL9>{MoI@&H1N=UY?$FxU6lTUleTJ87~xpFW087hgbx&L~Ba! ztd8-?9q%R=4*l=Cz;&1UtXJ`$9zQosBMc@S$3n&^u?VOFqFRCTET5uz0K=|$l4O42rp*~B zv}CaZM-0D9jL%wawZ>Qhu=PpDv6-eeetEbWtgAH5g>C_q#E_J`_J@!_uqYO7Ibv$1 z;iwytTNYW?z+$U0%EI z$PCT6H)D>@xj7TjjD#_ppb8A#WN?@9$J0VSkoRuIStjVoNrAYFo$Xfk0U(pS2n$t0FW{uxXl2sy)9NCKIE( zX>0wh@8tt_U!+BJRDEUy^0X=6UjAuH^haSv6jHq=W%As1ODF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o zulJpImRy^Y?JeBt<`#FlsWT7!!uop|aGz;klbO6fkPTET!8^HetIQ`3bwcGn&u5AS zFUT{a*h_R(nmF3#&aPvZF?QaWW-YtWb_FS4W_CZ?Oe`E6+am zxx#x39Os2#VJiBCkiv##bo6*1NW*2qte*0-f3&W)if6#+JqyGMZ$QkZeS&!nv}yN6 zCZaX%N#QidI)uTLG**oB@VL|KIDRme9RS~DIvu#C?kX6wLX#H;u4U80sngvOgVonFYx|_HAAM6dUcG` z#!jRwSf2Tj0pl%P=0|PJ)Y9Bj(ga+35sIIQM4>oImK#4k3Bo$}#O3iFmwNAqoCa9= zAMVWi4DM#4q^0MvUyJinUvcD<$FT!JxT>8-Fwm{{rYX&&`E=bc)J`PxMXJrKChPfX z$=GtpAF`>#*Qq2RICfsxK2AghPG2<~7Pq^l1WbCEGUwQc7#`qcW47BD_+(6}DMgxC z7E10uZ5bg+JSIuBnM29W?hga%Wt>nF0DLSE?JB^F%z9A0OAx2627sTg_!rM|} zMB>Wb(Dt@6*Y$v)5)k_KS(hZc+4bFdhG*6;Z!g#>JQI^5TQBnMCO;=yb z>&$lJP48$;0W@g>TVbnIVNZiklXE1QPiqgJT&IbCW-zVoms(ewcfQxDt{?LAb%7yq z+KDfLfukr=Rz;_K)NpO1?0{&@CyY-7lw3qGXwzHczdAL4U@jzrzuxD1G&l^Et;#s= zO;dWEahzHzP`X^sbelDtkT}-(s<=iUMJoJQG~z#hJXbeU7dKB#A4-V%fB3oi2$`5< IRGtw24Q3?b@c;k- literal 0 HcmV?d00001 diff --git a/docs/main.tex b/docs/main.tex new file mode 100644 index 0000000..bcfcfec --- /dev/null +++ b/docs/main.tex @@ -0,0 +1,220 @@ +\documentclass[11pt]{article} + +% --- Margins --- +\usepackage[margin=1in]{geometry} + +% --- Math --- +\usepackage{amsmath, amssymb, amsthm, mathtools} +\usepackage{bm} % bold math symbols (\bm) + +% --- Quality of life --- +\usepackage{enumitem} % list customization +\usepackage{microtype} % better justification +\usepackage[colorlinks=true, allcolors=blue]{hyperref} +\usepackage{cleveref} % \cref / \Cref smart references + +% --- Theorem environments --- +\theoremstyle{plain} +\newtheorem{theorem}{Theorem} +\newtheorem{lemma}{Lemma} +\newtheorem{proposition}{Proposition} +\newtheorem{corollary}{Corollary} +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\newtheorem{assumption}{Assumption} +\theoremstyle{remark} +\newtheorem{remark}{Remark} + +% --- Macros --- +\newcommand{\R}{\mathbb{R}} +\newcommand{\T}{^{\mathsf{T}}} % transpose +\newcommand{\inv}{^{-1}} +\newcommand{\grad}{\nabla} +\newcommand{\half}{\tfrac{1}{2}} +\newcommand{\diag}{\operatorname{diag}} +\newcommand{\tr}{\operatorname{tr}} +\newcommand{\rank}{\operatorname{rank}} +\newcommand{\st}{\;\text{s.t.}\;} +\DeclareMathOperator*{\argmin}{arg\,min} +\DeclareMathOperator*{\argmax}{arg\,max} +\DeclareMathOperator*{\minimize}{minimize} +\DeclareMathOperator{\inertia}{In} +\newcommand{\norm}[1]{\left\lVert #1 \right\rVert} +\newcommand{\abs}[1]{\left\lvert #1 \right\rvert} +\newcommand{\inner}[2]{\left\langle #1, #2 \right\rangle} +\newcommand{\set}[1]{\left\{ #1 \right\}} +\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}} % partial derivative +% Complementarity shorthand: a \perp b +\newcommand{\perpcomp}{\;\perp\;} + +\title{Marble Solver Derivation} +\author{Robotic Exploration Lab} +\date{\today} + +\begin{document} +\maketitle + +\section{Problem Setup} + +We seek to solve the following Quadratic Program with Complementarity Constraints (QPCC): + +\begin{equation}\label{qpcc} +\begin{aligned} +\minimize_{x \in \R^n} \quad & \frac12 x^\top Q x + g^\top x + c \\ +\st \quad & Ax + b = 0 \\ + & Gx + h \geq 0 \\ + & 0 \leq Lx + l \perp Rx + r \geq 0 +\end{aligned} +\end{equation} +for $Q \succeq 0$, $A \in \R^{m \times n}$, $G \in \R^{p \times n}$, $L, R \in \R^{c \times n}$, $b \in \R^m$, $h \in \R^p$, and $l, r \in \R^c$. + +\section{KKT System Derivation} + +We introduce the $\textit{retraction map}$ $b_\kappa(x)$ which satisfies: +\begin{equation}\label{eq:retraction_map} + b_\kappa(x) \cdot b_\kappa(-x) = \kappa +\end{equation} +Using \eqref{eq:retraction_map}, we can relax the complementarity constraints in \eqref{qpcc} as: +\begin{equation}\label{eq:qpcc_relax} +\begin{aligned} +\minimize_{x \in \R^n, \sigma\in \R^c, d \in \R^p} \quad & \frac12 x^\top Q x + g^\top x + c - \kappa\bm{1}^T \log(d) \\ +\st \quad & Ax + b = 0 \\ + & Gx + h = d \\ + & Lx + l = b_\kappa(\sigma) \\ + & Rx + r = b_\kappa(-\sigma) +\end{aligned} +\end{equation} +We then introduce the Augmented Lagrangian for \eqref{eq:qpcc_relax} as: +\begin{equation}\label{eq:aug_lag} +\begin{aligned} +\mathcal{L}_\rho(x, \sigma, d; \alpha, \beta, \gamma_L, \gamma_R) = & \frac12 x^\top Q x + g^\top x + c - \kappa\bm{1}^T \log(d) \\ +& + \alpha^\top (Ax + b) + \frac\rho2 \norm{Ax + b}^2 \\ +& + \beta^\top (Gx + h - d) + \frac\rho2 \norm{Gx+h-d}^2 \\ +& + \gamma_L^\top (Lx + l - b_\kappa(\sigma)) + \frac\rho2 \norm{Lx + l - b_\kappa(\sigma)}^2 \\ +& + \gamma_R^\top (Rx + r - b_\kappa(-\sigma)) + \frac\rho2 \norm{Rx + r - b_\kappa(-\sigma)}^2 +\end{aligned} +\end{equation} +Using an Augmented-Lagrangian approach, we can solve \eqref{eq:qpcc_relax} by iteratively minimizing \eqref{eq:aug_lag} +over primal variables $x, \sigma, d$. + +We first derive stationarity with respect to the original primal variable $x$. Define the following +shorthands: +\begin{align} + r_A &:= Ax + b \\ + r_G &:= Gx + h - d \\ + r_L &:= Lx + l - b_\kappa(\sigma) \\ + r_R &:= Rx + r - b_\kappa(-\sigma) +\end{align} +We therefore have the following stationarity condition: +\begin{align} +\pd{\mathcal{L}_\rho}{x} &= Qx + g + A^\top \alpha + \rho A^\top r_A + G^\top \beta + \rho G^\top r_G + L^\top \gamma_L + \rho L^\top r_L + R^\top \gamma_R + \rho R^\top r_R = 0 \\ +&= Qx + g + A^\top \lambda + G^\top \mu + L^\top \tau_L + R^\top \tau_R = 0 +\end{align} +We introduce the primal-dual shifted multiplier variables: +\begin{align} + \lambda &= \alpha + \rho r_A = \alpha + \rho (Ax + b) \\ + \mu &= \beta + \rho r_G = \beta + \rho (Gx + h - d) \\ + \tau_L &= \gamma_L + \rho r_L = \gamma_L + \rho (Lx + l - b_\kappa(\sigma)) \\ + \tau_R &= \gamma_R + \rho r_R = \gamma_R + \rho (Rx + r - b_\kappa(-\sigma)) +\end{align} +For variable $d$, we have the following stationarity condition: +\begin{align} +\pd{\mathcal{L}_\rho}{d} &= -\mu - \kappa d^{-1} = 0 \\ +&\Longleftrightarrow \mu \odot d = -\kappa \bm{1} +\end{align} + +We can satisfy this relaxed complementarity condition by again using \eqref{eq:retraction_map} as: +\begin{equation} + d = b_\kappa(v), \quad \mu = -b_\kappa(-v), \quad v \in \R^p +\end{equation} + +And finally for variable $\sigma$, we have the following stationarity condition: +\begin{align} +\pd{\mathcal{L}_\rho}{\sigma} &= -b'_\kappa(\sigma) (\gamma_L + \rho r_L) + b'_\kappa(-\sigma) (\gamma_R + \rho r_R) = 0 \\ +&= -b'_\kappa(\sigma) \tau_L + b'_\kappa(-\sigma) \tau_R = 0 +\end{align} + +In all, we have the following KKT conditions for \eqref{eq:qpcc_relax}: +\begin{align} + r_x &:= Qx + g + A^\top \lambda + G^\top \mu + L^\top \tau_L + R^\top \tau_R &&= 0 \\ + r_v &:= -\mu - b_\kappa(-v) &&= 0 \\ + r_\sigma &:= -b'_\kappa(\sigma) \tau_L + b'_\kappa(-\sigma) \tau_R &&= 0 \\ + r_\lambda &:= Ax + b - \rho^{-1} (\lambda - \alpha) &&= 0 \\ + r_\mu &:= Gx + h - b_\kappa(v) - \rho^{-1} (\mu - \beta) &&= 0 \\ + r_{\tau_L} &:= Lx + l - b_\kappa(\sigma) - \rho^{-1} (\tau_L - \gamma_L) &&= 0 \\ + r_{\tau_R} &:= Rx + r - b_\kappa(-\sigma) - \rho^{-1} (\tau_R - \gamma_R) &&= 0 +\end{align} +We now write the asymmetric Newton system for the KKT conditions described above. +\begin{equation} +\begin{bmatrix} + Q & 0 & 0 & A^\top & G^\top & L^\top & R^\top \\ + 0 & B_v^- & 0 & 0 & -I & 0 & 0 \\ + 0 & 0 & \diag{(-b''_\kappa(\sigma) \odot \tau_L - b''_\kappa(-\sigma) \odot \tau_R)} & 0 & 0 & -B_\sigma^+ & B_\sigma^- \\ + A & 0 & 0 & -\rho^{-1} I & 0 & 0 & 0 \\ + G & -B_v^+ & 0 & 0 & -\rho^{-1} I & 0 & 0 \\ + L & 0 & -B_\sigma^+ & 0 & 0 & -\rho^{-1} I & 0 \\ + R & 0 & B_\sigma^- & 0 & 0 & 0 & -\rho^{-1} I +\end{bmatrix} +\begin{bmatrix} + \Delta x \\ \Delta v \\ \Delta \sigma \\ \Delta \lambda \\ \Delta \mu \\ \Delta \tau_L \\ \Delta \tau_R +\end{bmatrix} += +-\begin{bmatrix} + r_x \\ r_v \\ r_\sigma \\ r_\lambda \\ r_\mu \\ r_{\tau_L} \\ r_{\tau_R} +\end{bmatrix} +\end{equation} +with the following Jacobian blocks: +\begin{subequations} +\begin{align} + B_v^+ &:= b'_\kappa(v) \\ + B_v^- &:= b'_\kappa(-v) \\ + B_\sigma^+ &:= b'_\kappa(\sigma) \\ + B_\sigma^- &:= b'_\kappa(-\sigma) +\end{align} +\end{subequations} + +\subsection{Symmetrization 1} +We simply scale the second row of the Newton system by $B_v^+$ to obtain the following symmetric Newton system: +\begin{equation} +\begin{bmatrix} + Q & 0 & 0 & A^\top & G^\top & L^\top & R^\top \\ + 0 & B_v^+ B_v^- & 0 & 0 & -B_v^+ & 0 & 0 \\ + 0 & 0 & \diag{(-b''_\kappa(\sigma) \odot \tau_L - b''_\kappa(-\sigma) \odot \tau_R)} & 0 & 0 & -B_\sigma^+ & B_\sigma^- \\ + A & 0 & 0 & -\rho^{-1} I & 0 & 0 & 0 \\ + G & -B_v^+ & 0 & 0 & -\rho^{-1} I & 0 & 0 \\ + L & 0 & -B_\sigma^+ & 0 & 0 & -\rho^{-1} I & 0 \\ + R & 0 & B_\sigma^- & 0 & 0 & 0 & -\rho^{-1} I +\end{bmatrix} +\begin{bmatrix} + \Delta x \\ \Delta v \\ \Delta \sigma \\ \Delta \lambda \\ \Delta \mu \\ \Delta \tau_L \\ \Delta \tau_R +\end{bmatrix} += +-\begin{bmatrix} + r_x \\ B_v^+ r_v \\ r_\sigma \\ r_\lambda \\ r_\mu \\ r_{\tau_L} \\ r_{\tau_R} +\end{bmatrix} +\end{equation} + +\subsection{Symmetrization 2} +We symmetrize the Newton system by introducing the diagonal matrix $W := (B_v^+)^{1/2}$ +and introducing auxiliary variable $\Delta v = W^{-1}\Delta \tilde{v}$. +\begin{equation} +\begin{bmatrix} + Q & 0 & 0 & A^\top & G^\top & L^\top & R^\top \\ + 0 & B_v^- & 0 & 0 & -W & 0 & 0 \\ + 0 & 0 & \diag{(-b''_\kappa(\sigma) \odot \tau_L - b''_\kappa(-\sigma) \odot \tau_R)} & 0 & 0 & -B_\sigma^+ & B_\sigma^- \\ + A & 0 & 0 & -\rho^{-1} I & 0 & 0 & 0 \\ + G & -W & 0 & 0 & -\rho^{-1} I & 0 & 0 \\ + L & 0 & -B_\sigma^+ & 0 & 0 & -\rho^{-1} I & 0 \\ + R & 0 & B_\sigma^- & 0 & 0 & 0 & -\rho^{-1} I +\end{bmatrix} +\begin{bmatrix} + \Delta x \\ \Delta \tilde{v} \\ \Delta \sigma \\ \Delta \lambda \\ \Delta \mu \\ \Delta \tau_L \\ \Delta \tau_R +\end{bmatrix} += +-\begin{bmatrix} + r_x \\ -Wr_v \\ r_\sigma \\ r_\lambda \\ r_\mu \\ r_{\tau_L} \\ r_{\tau_R} +\end{bmatrix} +\end{equation} +and we recover $\Delta v = W^{-1}\Delta \tilde{v}$ after solving the system. + +\end{document} \ No newline at end of file diff --git a/include/problem.h b/include/problem.h index 3cd1f65..cf39752 100644 --- a/include/problem.h +++ b/include/problem.h @@ -34,12 +34,11 @@ class Problem { Vec c_eq; SMat J_ineq; Vec c_ineq; - SMat J_comp; - Vec c_comp; - - // Complementarity indices - Eigen::VectorXi comp_L_inds; - Eigen::VectorXi comp_R_inds; + // Complementarity blocks 0 <= L_comp x + l_comp \perp R_comp x + r_comp >= 0 + SMat L_comp; + Vec l_comp; + SMat R_comp; + Vec r_comp; //Constructors Problem(SMat cost_hessian, Vec cost_gradient, double cost_const, @@ -50,9 +49,6 @@ class Problem { Mat J_eq, Vec c_eq, Mat J_ineq, Vec c_ineq, Mat L, Vec l, Mat R, Vec r); - // Utilities to stack J_comp and c_comp from L, R, l, and r - void build_c_comp(const Vec& l, const Vec& r); - /* Returns the objective given primal variables z*/ double obj(const Vec& z) const; diff --git a/include/solver.h b/include/solver.h index 52ca131..783b334 100644 --- a/include/solver.h +++ b/include/solver.h @@ -28,7 +28,8 @@ struct SolveResult { Vec s_comp; // Complementarity slack solution Vec m_eq; // Equality multiplier solution Vec m_ineq; // Inequality multiplier solution - Vec m_comp; // Complementarity multiplier solution + Vec m_comp_L; // Complementarity multiplier solution (left / L_comp side) + Vec m_comp_R; // Complementarity multiplier solution (right / R_comp side) }; class Solver { @@ -110,12 +111,8 @@ class Solver { Eigen::VectorXi s_comp_inds; // Complementarity slacks Eigen::VectorXi m_eq_inds; // Equality multipliers Eigen::VectorXi m_ineq_inds; // Inequality multipliers - Eigen::VectorXi m_comp_inds; // Complementarity multipliers - - // Indices into the complementarity residual for extracting the comp residual violation for filter evaluation - // TODO: currently a duplicate of the one in Problems, remove - Eigen::VectorXi comp_L_inds; - Eigen::VectorXi comp_R_inds; + Eigen::VectorXi m_comp_L_inds; // Complementarity multipliers (left / L_comp side) + Eigen::VectorXi m_comp_R_inds; // Complementarity multipliers (right / R_comp side) // Indices into the sparse KKT matrix valuePtr for jacobians of the KKT residual that are updated // based on the nonlinear terms (s_ineq, s_comp, relaxation_param, and penalty_param) @@ -123,7 +120,8 @@ class Solver { Eigen::VectorXi s_ineq_s_ineq_inds; // Diagonal matrix Eigen::VectorXi s_ineq_m_ineq_inds; // Diagonal matrix Eigen::VectorXi s_comp_s_comp_inds; // Diagonal matrix - Eigen::VectorXi s_comp_m_comp_inds; + Eigen::VectorXi s_comp_m_comp_L_inds; // Diagonal matrix (s_comp row, left multiplier) + Eigen::VectorXi s_comp_m_comp_R_inds; // Diagonal matrix (s_comp row, right multiplier) Eigen::VectorXi penalty_inds; Eigen::VectorXi regularizer_inds; @@ -136,27 +134,27 @@ class Solver { /** * Retraction map (elementwise) */ - Vec retract(const Vec& s, double relax_param) const; + Vec retract(const Eigen::Ref& s, double relax_param) const; /** * Retraction map derivative (elementwise) */ - Vec retract_deriv(const Vec& s, double relax_param) const; + Vec retract_deriv(const Eigen::Ref& s, double relax_param) const; /** * Retraction map second derivative (elementwise) */ - Vec retract_second_deriv(const Vec& s, double relax_param) const; + Vec retract_second_deriv(const Eigen::Ref& s, double relax_param) const; /** * Derivative of the retraction map wrt the relaxation parameter kappa (elementwise) */ - Vec retract_drelax(const Vec& s, double relax_param) const; + Vec retract_drelax(const Eigen::Ref& s, double relax_param) const; /** * Mixed derivative of the retraction map wrt s and the relaxation parameter kappa (elementwise) */ - Vec retract_deriv_drelax(const Vec& s, double relax_param) const; + Vec retract_deriv_drelax(const Eigen::Ref& s, double relax_param) const; /** * Ruiz equilibration for current problem data using copies of H and J_*. @@ -171,11 +169,6 @@ class Solver { */ void set_problem(Problem problem, Solver::Options& options); - /** - * Populates the KKT system, computes sparsity indexing - */ - void set_problem(const Solver::Options& options); - /** * Returns the problem currently set for the solver */ @@ -203,12 +196,13 @@ class Solver { /** * Update the KKT terms associated with s_ineq (no dependence on m_ineq) */ - void update_KKT_ineq(const Vec& s_ineq, double relax_param); + void update_KKT_ineq(const Eigen::Ref& s_ineq, double relax_param); /** * Update the KKT terms associated with s_comp and m_comp */ - void update_KKT_comp(const Vec& s_comp, const Vec& m_comp, double relax_param); + void update_KKT_comp(const Eigen::Ref& s_comp, const Eigen::Ref& m_comp_L, + const Eigen::Ref& m_comp_R, double relax_param); /** * Update the KKT penalty diagonal @@ -237,12 +231,6 @@ class Solver { */ bool check_inertia(); - /** - * Solve the KKT system using the factorized matrix, populating the solution - * in workspace->newton_step with rhs -kkt_residual. - */ - void backsolve(); - /** * Solve K x = b using the currently factorized KKT matrix, where K is the * unscaled system (the Ruiz scaling stored in workspace->scaling is applied @@ -251,7 +239,7 @@ class Solver { * @param b right-hand side vector (length n_vars) * @param x solution vector to populate (length n_vars); must not alias b */ - void backsolve(const Vec& b, Vec& x); + void backsolve(const Eigen::Ref& b, Vec& x); /** * Compute AMD ordering diff --git a/include/workspace.h b/include/workspace.h index 1e78295..83bf239 100644 --- a/include/workspace.h +++ b/include/workspace.h @@ -22,12 +22,14 @@ class Workspace { Eigen::Map s_comp; /** Complementarity slacks (in the retraction domain) */ Eigen::Map m_eq; /** Equality multipliers */ Eigen::Map m_ineq; /** Inequality multipliers */ - Eigen::Map m_comp; /** Complementarity multipliers */ + Eigen::Map m_comp_L; /** Complementarity multipliers (left / L_comp side) */ + Eigen::Map m_comp_R; /** Complementarity multipliers (right / R_comp side) */ // Current multiplier estimates for AL Vec m_eq_est; /** Equality multiplier estimates for AL */ Vec m_ineq_est; /** Inequality multiplier estimates for AL */ - Vec m_comp_est; /** Complementarity multiplier estimates for AL */ + Vec m_comp_L_est; /** Complementarity (left) multiplier estimates for AL */ + Vec m_comp_R_est; /** Complementarity (right) multiplier estimates for AL */ Vec dkkt_residual_drelax; Vec kkt_residual; /** KKT residual, driven to 0 in each subproblem solve */ @@ -40,7 +42,8 @@ class Workspace { // Constraint evaluations Vec residual_eq; /** Equality constraint residuals */ Vec residual_ineq; /** Inequality constraint residuals */ - Vec residual_comp; /** Complementarity constraint residuals */ + Vec residual_comp_L; /** Complementarity constraint residuals, left (L_comp x + l_comp) */ + Vec residual_comp_R; /** Complementarity constraint residuals, right (R_comp x + r_comp) */ // Relaxation and penalty parameters double relax_param; /** Relaxation parameter for the retraction map */ @@ -61,6 +64,7 @@ class Workspace { // KKT step Vec newton_step; /** Newton step for the KKT system (possibly computed with regularization) */ Vec dsolution_drelax; /** Derivative of the solution with respect to the relaxation parameter, computed using IFT */ + Vec backsolve_scratch; /** Reused buffer for the unpermute/scale step in backsolve, keeps it allocation-free */ // Work arrays for QDLDL // Workspace arrays required by QDLDL diff --git a/python/marble/_core.pyi b/python/marble/_core.pyi index b350170..435ee5c 100644 --- a/python/marble/_core.pyi +++ b/python/marble/_core.pyi @@ -139,10 +139,6 @@ class Solver: ... def analytical_factorization(self) -> bool: ... - @typing.overload - def backsolve(self) -> None: - ... - @typing.overload def backsolve(self, b: numpy.ndarray) -> numpy.ndarray: ... def check_inertia(self) -> bool: diff --git a/src/problem.cpp b/src/problem.cpp index 78e2e23..e9ab0c6 100644 --- a/src/problem.cpp +++ b/src/problem.cpp @@ -10,98 +10,71 @@ std::string dims2(long rows, long cols) { } // Verify that every block has consistent dimensions before any indexing happens -void validate_problem_dims(long H_rows, long H_cols, long grad, - long Jeq_rows, long Jeq_cols, long ceq, - long Jineq_rows, long Jineq_cols, long cineq, - long L_rows, long L_cols, long l_size, - long R_rows, long R_cols, long r_size) { - if (H_rows != H_cols) +void validate_problem_dims(const SMat& H, const Vec& grad, + const SMat& J_eq, const Vec& c_eq, + const SMat& J_ineq, const Vec& c_ineq, + const SMat& L, const Vec& l, + const SMat& R, const Vec& r) { + if (H.rows() != H.cols()) throw std::invalid_argument( - "Marble problem: cost Hessian Q must be square, got " + dims2(H_rows, H_cols)); - const long nz = H_cols; - if (grad != nz) + "Marble problem: cost Hessian Q must be square, got " + dims2(H.rows(), H.cols())); + const long nz = H.cols(); + if (grad.size() != nz) throw std::invalid_argument( - "Marble problem: cost gradient q has length " + std::to_string(grad) + + "Marble problem: cost gradient q has length " + std::to_string(grad.size()) + " but Q is " + dims2(nz, nz) + "; expected length " + std::to_string(nz)); - if (ceq != Jeq_rows) + if (c_eq.size() != J_eq.rows()) throw std::invalid_argument( - "Marble problem: J_eq has " + std::to_string(Jeq_rows) + - " rows but c_eq/b_eq has length " + std::to_string(ceq) + "; they must match"); - if (Jeq_rows > 0 && Jeq_cols != nz) + "Marble problem: J_eq has " + std::to_string(J_eq.rows()) + + " rows but c_eq/b_eq has length " + std::to_string(c_eq.size()) + "; they must match"); + if (J_eq.rows() > 0 && J_eq.cols() != nz) throw std::invalid_argument( - "Marble problem: J_eq has " + std::to_string(Jeq_cols) + + "Marble problem: J_eq has " + std::to_string(J_eq.cols()) + " columns but expected " + std::to_string(nz)); - if (cineq != Jineq_rows) + if (c_ineq.size() != J_ineq.rows()) throw std::invalid_argument( - "Marble problem: J_ineq has " + std::to_string(Jineq_rows) + - " rows but c_ineq/b_ineq has length " + std::to_string(cineq) + "; they must match"); - if (Jineq_rows > 0 && Jineq_cols != nz) + "Marble problem: J_ineq has " + std::to_string(J_ineq.rows()) + + " rows but c_ineq/b_ineq has length " + std::to_string(c_ineq.size()) + "; they must match"); + if (J_ineq.rows() > 0 && J_ineq.cols() != nz) throw std::invalid_argument( - "Marble problem: J_ineq has " + std::to_string(Jineq_cols) + + "Marble problem: J_ineq has " + std::to_string(J_ineq.cols()) + " columns but expected " + std::to_string(nz)); - if (!(L_rows == R_rows && L_rows == l_size && L_rows == r_size)) + if (!(L.rows() == R.rows() && L.rows() == l.size() && L.rows() == r.size())) throw std::invalid_argument( "Marble problem: complementarity blocks L, l, R, r must share the same number of " - "rows; got L rows=" + std::to_string(L_rows) + - ", l length=" + std::to_string(l_size) + - ", R rows=" + std::to_string(R_rows) + - ", r length=" + std::to_string(r_size)); - if (L_rows > 0) { - if (L_cols != nz) + "rows; got L rows=" + std::to_string(L.rows()) + + ", l length=" + std::to_string(l.size()) + + ", R rows=" + std::to_string(R.rows()) + + ", r length=" + std::to_string(r.size())); + if (L.rows() > 0) { + if (L.cols() != nz) throw std::invalid_argument( - "Marble problem: L has " + std::to_string(L_cols) + + "Marble problem: L has " + std::to_string(L.cols()) + " columns but expected " + std::to_string(nz)); - if (R_cols != nz) + if (R.cols() != nz) throw std::invalid_argument( - "Marble problem: R has " + std::to_string(R_cols) + + "Marble problem: R has " + std::to_string(R.cols()) + " columns but expected " + std::to_string(nz)); } } } // namespace -static SMat build_J_comp(const SMat& L, const SMat& R) { - int n_comp = L.rows(); - int nz = L.cols(); - std::vector> triplets; - triplets.reserve(L.nonZeros() + R.nonZeros()); - for (int j = 0; j < L.outerSize(); ++j) - for (SMat::InnerIterator it(L, j); it; ++it) - triplets.emplace_back(2 * it.row(), it.col(), it.value()); - for (int j = 0; j < R.outerSize(); ++j) - for (SMat::InnerIterator it(R, j); it; ++it) - triplets.emplace_back(2 * it.row() + 1, it.col(), it.value()); - SMat result(2 * n_comp, nz); - result.setFromTriplets(triplets.begin(), triplets.end()); - return result; -} - -void Problem::build_c_comp(const Vec& l, const Vec& r) { - comp_L_inds = 2 * Eigen::VectorXi::LinSpaced(n_comp, 0, n_comp - 1); - comp_R_inds = comp_L_inds.array() + 1; - c_comp.resize(2 * n_comp); - c_comp(comp_L_inds) = l; - c_comp(comp_R_inds) = r; -} - Problem::Problem(SMat cost_hessian, Vec cost_gradient, double cost_const, SMat J_eq, Vec c_eq, SMat J_ineq, Vec c_ineq, SMat L, Vec l, SMat R, Vec r) : nz(cost_hessian.cols()), n_eq(J_eq.rows()), n_ineq(J_ineq.rows()), n_comp(L.rows()), cost_hessian(std::move(cost_hessian)), cost_gradient(std::move(cost_gradient)), cost_const(cost_const), J_eq(std::move(J_eq)), c_eq(std::move(c_eq)), - J_ineq(std::move(J_ineq)), c_ineq(std::move(c_ineq)) { - validate_problem_dims(this->cost_hessian.rows(), this->cost_hessian.cols(), this->cost_gradient.size(), - this->J_eq.rows(), this->J_eq.cols(), this->c_eq.size(), - this->J_ineq.rows(), this->J_ineq.cols(), this->c_ineq.size(), - L.rows(), L.cols(), l.size(), - R.rows(), R.cols(), r.size()); - J_comp = build_J_comp(L, R); - build_c_comp(l, r); + J_ineq(std::move(J_ineq)), c_ineq(std::move(c_ineq)), + L_comp(std::move(L)), l_comp(std::move(l)), R_comp(std::move(R)), r_comp(std::move(r)) { cost_hessian_diag = this->cost_hessian.diagonal(); + validate_problem_dims(this->cost_hessian, this->cost_gradient, + this->J_eq, this->c_eq, this->J_ineq, this->c_ineq, + this->L_comp, this->l_comp, this->R_comp, this->r_comp); } Problem::Problem(Mat cost_hessian, Vec cost_gradient, double cost_const, @@ -110,18 +83,12 @@ Problem::Problem(Mat cost_hessian, Vec cost_gradient, double cost_const, : nz(cost_hessian.cols()), n_eq(J_eq.rows()), n_ineq(J_ineq.rows()), n_comp(L.rows()), cost_hessian(cost_hessian.sparseView()), cost_gradient(std::move(cost_gradient)), cost_const(cost_const), J_eq(J_eq.sparseView()), c_eq(std::move(c_eq)), - J_ineq(J_ineq.sparseView()), c_ineq(std::move(c_ineq)) { - validate_problem_dims(this->cost_hessian.rows(), this->cost_hessian.cols(), this->cost_gradient.size(), - this->J_eq.rows(), this->J_eq.cols(), this->c_eq.size(), - this->J_ineq.rows(), this->J_ineq.cols(), this->c_ineq.size(), - L.rows(), L.cols(), l.size(), - R.rows(), R.cols(), r.size()); - Mat J_comp_dense(2 * n_comp, nz); - J_comp_dense(Eigen::seq(0, Eigen::last, 2), Eigen::all) = L; - J_comp_dense(Eigen::seq(1, Eigen::last, 2), Eigen::all) = R; - J_comp = J_comp_dense.sparseView(); - build_c_comp(l, r); + J_ineq(J_ineq.sparseView()), c_ineq(std::move(c_ineq)), + L_comp(L.sparseView()), l_comp(std::move(l)), R_comp(R.sparseView()), r_comp(std::move(r)) { cost_hessian_diag = this->cost_hessian.diagonal(); + validate_problem_dims(this->cost_hessian, this->cost_gradient, + this->J_eq, this->c_eq, this->J_ineq, this->c_ineq, + this->L_comp, this->l_comp, this->R_comp, this->r_comp); } double Problem::obj(const Vec& z) const { @@ -137,6 +104,5 @@ Vec Problem::residual_ineq(const Vec& z) const { } Vec Problem::residual_comp(const Vec& z) const { - Vec res = J_comp * z + c_comp; - return res(comp_L_inds).cwiseProduct(res(comp_R_inds)); + return (L_comp * z + l_comp).cwiseProduct(R_comp * z + r_comp); } \ No newline at end of file diff --git a/src/solver.cpp b/src/solver.cpp index 3935cfb..cb1de56 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -59,35 +59,35 @@ namespace { } } -Vec Solver::retract(const Vec& s, double relax_param) const { +Vec Solver::retract(const Eigen::Ref& s, double relax_param) const { // Vectorized retraction map for both inequality and complementarity slacks // p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa)), kappa = relax_param const double four_kappa = 4.0 * relax_param; return (0.5 * (s.array() + (s.array().square() + four_kappa).sqrt())).matrix(); } -Vec Solver::retract_deriv(const Vec& s, double relax_param) const { +Vec Solver::retract_deriv(const Eigen::Ref& s, double relax_param) const { // Derivative of the vectorized retraction map above // p'(s) = 0.5 * (1 + s / sqrt(s^2 + 4*kappa)) const double four_kappa = 4.0 * relax_param; return (0.5 * (1.0 + s.array() / (s.array().square() + four_kappa).sqrt())).matrix(); } -Vec Solver::retract_second_deriv(const Vec& s, double relax_param) const { +Vec Solver::retract_second_deriv(const Eigen::Ref& s, double relax_param) const { // Second derivative of the vectorized retraction map above // p''(s) = 2*kappa / (s^2 + 4*kappa)^(3/2) const double kappa = relax_param; return (2.0 * kappa * (s.array().square() + 4.0 * kappa).pow(-1.5)).matrix(); } -Vec Solver::retract_drelax(const Vec& s, double relax_param) const { +Vec Solver::retract_drelax(const Eigen::Ref& s, double relax_param) const { // Derivative of the retraction map wrt the relaxation parameter kappa = relax_param // dp/dkappa = 1 / sqrt(s^2 + 4*kappa) const double four_kappa = 4.0 * relax_param; return (s.array().square() + four_kappa).rsqrt().matrix(); } -Vec Solver::retract_deriv_drelax(const Vec& s, double relax_param) const { +Vec Solver::retract_deriv_drelax(const Eigen::Ref& s, double relax_param) const { // Mixed derivative of the retraction map wrt s and kappa = relax_param // d/dkappa p'(s) = -s / (s^2 + 4*kappa)^(3/2) const double four_kappa = 4.0 * relax_param; @@ -96,10 +96,7 @@ Vec Solver::retract_deriv_drelax(const Vec& s, double relax_param) const { void Solver::set_problem(Problem problem, Solver::Options& options) { this->prob = std::make_shared(std::move(problem)); - set_problem(options); -} -void Solver::set_problem(const Solver::Options& options) { const auto t0 = std::chrono::steady_clock::now(); this->options = options; // Define subproblem dimensions @@ -118,16 +115,8 @@ void Solver::set_problem(const Solver::Options& options) { s_comp_inds = safe_linspaced(this->prob->n_comp, total_inds); total_inds += this->prob->n_comp; m_eq_inds = safe_linspaced(this->prob->n_eq, total_inds); total_inds += this->prob->n_eq; m_ineq_inds = safe_linspaced(this->prob->n_ineq, total_inds); total_inds += this->prob->n_ineq; - m_comp_inds = safe_linspaced(2 * this->prob->n_comp, total_inds); total_inds += 2 * this->prob->n_comp; - - // Indices into the complementarity residual for extracting the comp residual violation for filter evaluation - if (this->prob->n_comp == 0) { - comp_L_inds = Eigen::VectorXi(0); - comp_R_inds = Eigen::VectorXi(0); - } else { - comp_L_inds = 2 * Eigen::VectorXi::LinSpaced(this->prob->n_comp, 0, this->prob->n_comp - 1); - comp_R_inds = comp_L_inds.array() + 1; - } + m_comp_L_inds = safe_linspaced(this->prob->n_comp, total_inds); total_inds += this->prob->n_comp; + m_comp_R_inds = safe_linspaced(this->prob->n_comp, total_inds); total_inds += this->prob->n_comp; // Allocate for solution vector, multiplier estimates, and KKT residual // Init workspace @@ -152,7 +141,7 @@ void Solver::initialize_kkt_sparsity() { workspace->kkt_system = SMat(n_vars, n_vars); std::vector> triplets; - // Populate stationarity Hz + J_eq'*m_eq + J_ineq'*m_ineq + J_comp'*m_comp + // Populate stationarity Hz + J_eq'*m_eq + J_ineq'*m_ineq + L_comp'*m_comp_L + R_comp'*m_comp_R workspace->appendBlockTriplets(triplets, prob->cost_hessian, z_inds[0], z_inds[0]); // Guard every block that touches an empty constraint set @@ -165,8 +154,10 @@ void Solver::initialize_kkt_sparsity() { workspace->appendBlockTriplets(triplets, prob->J_ineq, m_ineq_inds[0], z_inds[0]); } if (prob->n_comp > 0) { - workspace->appendBlockTriplets(triplets, prob->J_comp.transpose(), z_inds[0], m_comp_inds[0]); - workspace->appendBlockTriplets(triplets, prob->J_comp, m_comp_inds[0], z_inds[0]); + workspace->appendBlockTriplets(triplets, prob->L_comp.transpose(), z_inds[0], m_comp_L_inds[0]); + workspace->appendBlockTriplets(triplets, prob->L_comp, m_comp_L_inds[0], z_inds[0]); + workspace->appendBlockTriplets(triplets, prob->R_comp.transpose(), z_inds[0], m_comp_R_inds[0]); + workspace->appendBlockTriplets(triplets, prob->R_comp, m_comp_R_inds[0], z_inds[0]); } // Populate stationarity for inequality slacks with dummy variables @@ -179,19 +170,16 @@ void Solver::initialize_kkt_sparsity() { } // Populate stationarity for complementarity slacks with dummy variables - // p'(s_comp)*m1 - p'(-s_comp)*m2 - // where m1 and m2 are subsets of m_comp corresponding to the left and right - // side of the complementarity constraint. - // TODO: define this indexing somewhere and/or make it more general + // p'(s_comp)*m_comp_L - p'(-s_comp)*m_comp_R for (int i = 0; i < prob->n_comp; i++) { // Derivative with respect to the slacks (diagonal) triplets.emplace_back(s_comp_inds[i], s_comp_inds[i], 1.0); - // Derivative with respect to multipliers (n_comp by 2*n_comp) - triplets.emplace_back(s_comp_inds[i], m_comp_inds[i*2], 1.0); - triplets.emplace_back(s_comp_inds[i], m_comp_inds[i*2 + 1], 1.0); - triplets.emplace_back(m_comp_inds[i*2], s_comp_inds[i], 1.0); - triplets.emplace_back(m_comp_inds[i*2 + 1], s_comp_inds[i], 1.0); + // Derivative with respect to the left and right multipliers + triplets.emplace_back(s_comp_inds[i], m_comp_L_inds[i], 1.0); + triplets.emplace_back(s_comp_inds[i], m_comp_R_inds[i], 1.0); + triplets.emplace_back(m_comp_L_inds[i], s_comp_inds[i], 1.0); + triplets.emplace_back(m_comp_R_inds[i], s_comp_inds[i], 1.0); } // Populate AL regularizer for multipliers @@ -201,8 +189,9 @@ void Solver::initialize_kkt_sparsity() { for (int i = 0; i < prob->n_ineq; i++) { triplets.emplace_back(m_ineq_inds[i], m_ineq_inds[i], 1.0); } - for (int i = 0; i < 2 * prob->n_comp; i++) { - triplets.emplace_back(m_comp_inds[i], m_comp_inds[i], 1.0); + for (int i = 0; i < prob->n_comp; i++) { + triplets.emplace_back(m_comp_L_inds[i], m_comp_L_inds[i], 1.0); + triplets.emplace_back(m_comp_R_inds[i], m_comp_R_inds[i], 1.0); } // TODO: more efficient way to make sure that every diagonal element exists @@ -242,11 +231,12 @@ void Solver::initialize_kkt_sparsity() { } s_comp_s_comp_inds.resize(prob->n_comp); - s_comp_m_comp_inds.resize(2 * prob->n_comp); + s_comp_m_comp_L_inds.resize(prob->n_comp); + s_comp_m_comp_R_inds.resize(prob->n_comp); for (int i = 0; i < prob->n_comp; i++) { s_comp_s_comp_inds[i] = workspace->findValuePtrIndex(s_comp_inds[i], s_comp_inds[i]); - s_comp_m_comp_inds[i * 2] = workspace->findValuePtrIndex(s_comp_inds[i], m_comp_inds[i * 2]); - s_comp_m_comp_inds[i * 2 + 1] = workspace->findValuePtrIndex(s_comp_inds[i], m_comp_inds[i * 2 + 1]); + s_comp_m_comp_L_inds[i] = workspace->findValuePtrIndex(s_comp_inds[i], m_comp_L_inds[i]); + s_comp_m_comp_R_inds[i] = workspace->findValuePtrIndex(s_comp_inds[i], m_comp_R_inds[i]); } penalty_inds.resize(prob->n_eq + prob->n_ineq + 2 * prob->n_comp); @@ -256,8 +246,11 @@ void Solver::initialize_kkt_sparsity() { for (int i = 0; i < prob->n_ineq; i++) { penalty_inds[prob->n_eq + i] = workspace->findValuePtrIndex(m_ineq_inds[i], m_ineq_inds[i]); } - for (int i = 0; i < 2 * prob->n_comp; i++) { - penalty_inds[prob->n_eq + prob->n_ineq + i] = workspace->findValuePtrIndex(m_comp_inds[i], m_comp_inds[i]); + for (int i = 0; i < prob->n_comp; i++) { + penalty_inds[prob->n_eq + prob->n_ineq + i] = workspace->findValuePtrIndex(m_comp_L_inds[i], m_comp_L_inds[i]); + } + for (int i = 0; i < prob->n_comp; i++) { + penalty_inds[prob->n_eq + prob->n_ineq + prob->n_comp + i] = workspace->findValuePtrIndex(m_comp_R_inds[i], m_comp_R_inds[i]); } regularizer_inds.resize(n_primals); @@ -279,13 +272,15 @@ void Solver::update_KKT_residual(double relax_param, double inv_penalty_param) { // just need to compute these in the very beginning before we've run the first linesearch workspace->residual_eq = prob->J_eq * workspace->z + prob->c_eq; workspace->residual_ineq = prob->J_ineq * workspace->z + prob->c_ineq; - workspace->residual_comp = prob->J_comp * workspace->z + prob->c_comp; + workspace->residual_comp_L = prob->L_comp * workspace->z + prob->l_comp; + workspace->residual_comp_R = prob->R_comp * workspace->z + prob->r_comp; // z stationarity - workspace->kkt_residual(z_inds) = prob->cost_hessian * workspace->z + prob->cost_gradient + + workspace->kkt_residual(z_inds) = prob->cost_hessian * workspace->z + prob->cost_gradient + prob->J_eq.transpose() * workspace->m_eq + - prob->J_ineq.transpose() * workspace->m_ineq + - prob->J_comp.transpose() * workspace->m_comp; + prob->J_ineq.transpose() * workspace->m_ineq + + prob->L_comp.transpose() * workspace->m_comp_L + + prob->R_comp.transpose() * workspace->m_comp_R; // Inequality slack stationarity Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); @@ -296,7 +291,7 @@ void Solver::update_KKT_residual(double relax_param, double inv_penalty_param) { Vec d_p_comp = retract_deriv(workspace->s_comp, relax_param); for (int i = 0; i < prob->n_comp; i++) { workspace->kkt_residual(s_comp_inds[i]) = - -d_p_comp[i] * workspace->m_comp[2 * i] + (1 - d_p_comp[i]) * workspace->m_comp[2 * i + 1]; + -d_p_comp[i] * workspace->m_comp_L[i] + (1 - d_p_comp[i]) * workspace->m_comp_R[i]; } // Equality primal feasibility @@ -310,12 +305,11 @@ void Solver::update_KKT_residual(double relax_param, double inv_penalty_param) { // Complementarity primal feasibility Vec p_comp = retract(workspace->s_comp, relax_param); - workspace->kkt_residual(m_comp_inds) = - workspace->residual_comp - inv_penalty_param * (workspace->m_comp - workspace->m_comp_est); - for (int i = 0; i < prob->n_comp; i++) { - workspace->kkt_residual(m_comp_inds[2 * i]) += -p_comp[i]; // p(s) - workspace->kkt_residual(m_comp_inds[2 * i + 1]) += -(p_comp[i] - workspace->s_comp[i]); // p(s) - p(-s) = s - } + workspace->kkt_residual(m_comp_L_inds) = workspace->residual_comp_L - p_comp - + inv_penalty_param * (workspace->m_comp_L - workspace->m_comp_L_est); + workspace->kkt_residual(m_comp_R_inds) = workspace->residual_comp_R - + (p_comp - workspace->s_comp) - + inv_penalty_param * (workspace->m_comp_R - workspace->m_comp_R_est); } void Solver::update_dKKT_residual_drelax(double relax_param) { @@ -338,7 +332,7 @@ void Solver::update_dKKT_residual_drelax(double relax_param) { Vec dd_p_comp_dk = retract_deriv_drelax(workspace->s_comp, relax_param); for (int i = 0; i < prob->n_comp; i++) { workspace->dkkt_residual_drelax(s_comp_inds[i]) = - -dd_p_comp_dk[i] * (workspace->m_comp[2 * i] + workspace->m_comp[2 * i + 1]); + -dd_p_comp_dk[i] * (workspace->m_comp_L[i] + workspace->m_comp_R[i]); } // Inequality primal feasibility: r = ... - (s + p(-s)) - ... @@ -349,8 +343,8 @@ void Solver::update_dKKT_residual_drelax(double relax_param) { // row 2i += -p(s) -> d/dkappa = -p_kappa(s) // row 2i+1 += -(p(s) - s) -> d/dkappa = -p_kappa(s) for (int i = 0; i < prob->n_comp; i++) { - workspace->dkkt_residual_drelax(m_comp_inds[2 * i]) = -dp_comp_dk[i]; - workspace->dkkt_residual_drelax(m_comp_inds[2 * i + 1]) = -dp_comp_dk[i]; + workspace->dkkt_residual_drelax(m_comp_L_inds[i]) = -dp_comp_dk[i]; + workspace->dkkt_residual_drelax(m_comp_R_inds[i]) = -dp_comp_dk[i]; } } @@ -358,11 +352,11 @@ void Solver::update_KKT_system(double relax_param, double inv_penalty_param) { // Update KKT system terms that depend on the solution, which are the nonlinear terms associated with the inequality // and complementarity slacks and multipliers, as well as the penalty terms update_KKT_ineq(workspace->s_ineq, relax_param); - update_KKT_comp(workspace->s_comp, workspace->m_comp, relax_param); + update_KKT_comp(workspace->s_comp, workspace->m_comp_L, workspace->m_comp_R, relax_param); update_KKT_penalty(inv_penalty_param); } -void Solver::update_KKT_ineq(const Vec& s_ineq, double relax_param) { +void Solver::update_KKT_ineq(const Eigen::Ref& s_ineq, double relax_param) { Eigen::Map nzval(workspace->kkt_system.valuePtr(), workspace->kkt_system.nonZeros()); Eigen::Ref scaling = workspace->scaling; Vec d_p = retract_deriv(s_ineq, relax_param); @@ -375,22 +369,22 @@ void Solver::update_KKT_ineq(const Vec& s_ineq, double relax_param) { } } -// TODO: fix indexing into m_comp so that it can be a const reference -void Solver::update_KKT_comp(const Vec& s_comp, const Vec& m_comp, double relax_param) { +void Solver::update_KKT_comp(const Eigen::Ref& s_comp, const Eigen::Ref& m_comp_L, + const Eigen::Ref& m_comp_R, double relax_param) { Eigen::Map nzval(workspace->kkt_system.valuePtr(), workspace->kkt_system.nonZeros()); Eigen::Ref scaling = workspace->scaling; Vec d_p = retract_deriv(s_comp, relax_param); Vec dd_p = retract_second_deriv(s_comp, relax_param); for (int i = 0; i < prob->n_comp; i++) { - // Derivative of -p'(s)*m1 + p'(-s)*m2 wrt s - // is -(p''(s)*m1 + p''(s)*m2) but p''(s) = p''(-s) so its -p''(s)*(m1 + m2) - workspace->s_comp_stationarity[i] = -dd_p[i]*(m_comp[2*i] + m_comp[2*i + 1]); // stored for diag updating + // Derivative of -p'(s)*m_L + p'(-s)*m_R wrt s + // is -(p''(s)*m_L + p''(s)*m_R) but p''(s) = p''(-s) so its -p''(s)*(m_L + m_R) + workspace->s_comp_stationarity[i] = -dd_p[i]*(m_comp_L[i] + m_comp_R[i]); // stored for diag updating nzval(s_comp_s_comp_inds[i]) = scaling(s_comp_inds[i]) * workspace->s_comp_stationarity[i] * scaling(s_comp_inds[i]); - // Derivative wrt to m1 and m2 is just -d_p and -d_neg_p respectively - nzval(s_comp_m_comp_inds[2 * i]) = scaling(s_comp_inds[i]) * -d_p[i] * scaling(m_comp_inds[2 * i]); - nzval(s_comp_m_comp_inds[2 * i + 1]) = scaling(s_comp_inds[i]) * (1 - d_p[i]) * scaling(m_comp_inds[2 * i + 1]); // d_neg_p = 1 - d_p + // Derivative wrt to m_L and m_R is just -d_p and -d_neg_p respectively + nzval(s_comp_m_comp_L_inds[i]) = scaling(s_comp_inds[i]) * -d_p[i] * scaling(m_comp_L_inds[i]); + nzval(s_comp_m_comp_R_inds[i]) = scaling(s_comp_inds[i]) * (1 - d_p[i]) * scaling(m_comp_R_inds[i]); // d_neg_p = 1 - d_p } } @@ -460,25 +454,19 @@ bool Solver::check_inertia() { return (workspace->D.array() > 1e-10).count() == n_primals && (workspace->D.array() < -1e-10).count() == n_duals; } -void Solver::backsolve() { - // Newton step: solve K * newton_step = -kkt_residual - backsolve(-workspace->kkt_residual, workspace->newton_step); -} - -void Solver::backsolve(const Vec& b, Vec& x) { +void Solver::backsolve(const Eigen::Ref& b, Vec& x) { // The factorization is of the scaled system D*K*D (D = diag(scaling)), so to // solve K x = b we solve (D*K*D) y = D*b for y and recover x = D*y. // The RHS is also permuted into AMD ordering; the result is unpermuted after. - // eval() guards against aliasing between b and x. - x = (b.cwiseProduct(workspace->scaling))(workspace->amd_perm_vec).eval(); + // b never aliases x, so scaling+permuting the RHS straight into x needs no temp + x.noalias() = b.cwiseProduct(workspace->scaling)(workspace->amd_perm_vec); // Solve system QDLDL_solve(n_vars, workspace->Lp.data(), workspace->Li.data(), workspace->Lx.data(), workspace->Dinv.data(), x.data()); - // Unpermute solution and recover x = D*y - x = x(workspace->amd_iperm_vec).eval(); - x = x.cwiseProduct(workspace->scaling).eval(); + workspace->backsolve_scratch = x(workspace->amd_iperm_vec).cwiseProduct(workspace->scaling); + x.swap(workspace->backsolve_scratch); } void Solver::compute_amd_ordering() { @@ -499,7 +487,7 @@ bool Solver::convergence(const Solver::Options& options) { double eq_violation = workspace->residual_eq.lpNorm(); double ineq_violation = workspace->residual_ineq.cwiseMin(0).lpNorm(); - double comp_violation = (workspace->residual_comp(comp_L_inds).cwiseProduct(workspace->residual_comp(comp_R_inds))) + double comp_violation = workspace->residual_comp_L.cwiseProduct(workspace->residual_comp_R) .lpNorm(); return kkt_norm < options.convergence_kkt_norm && eq_violation < options.convergence_eq_violation && @@ -524,14 +512,13 @@ SolveResult Solver::solve() { } workspace->m_eq_est.setZero(); workspace->m_ineq_est.setZero(); - workspace->m_comp_est.setZero(); + workspace->m_comp_L_est.setZero(); + workspace->m_comp_R_est.setZero(); filter->clear(); int n_iter_outer = 0; int n_iter_inner = 0; - double theta_prev = std::numeric_limits::max(); - const bool verbose = options.verbosity >= 1; const char* last_step_type = "---"; double last_regularizer = NAN; @@ -569,7 +556,7 @@ SolveResult Solver::solve() { double eq_vio = prob->n_eq > 0 ? workspace->residual_eq.lpNorm() : 0.0; double ineq_vio= prob->n_ineq > 0 ? workspace->residual_ineq.cwiseMin(0).lpNorm() : 0.0; double comp_vio= prob->n_comp > 0 - ? (workspace->residual_comp(comp_L_inds).cwiseProduct(workspace->residual_comp(comp_R_inds))) + ? workspace->residual_comp_L.cwiseProduct(workspace->residual_comp_R) .lpNorm() : 0.0; double obj = 0.5 * workspace->z.dot(prob->cost_hessian * workspace->z) @@ -617,7 +604,8 @@ SolveResult Solver::solve() { rec["s_comp"] = vec_to_json(workspace->s_comp); rec["m_eq"] = vec_to_json(workspace->m_eq); rec["m_ineq"] = vec_to_json(workspace->m_ineq); - rec["m_comp"] = vec_to_json(workspace->m_comp); + rec["m_comp_L"] = vec_to_json(workspace->m_comp_L); + rec["m_comp_R"] = vec_to_json(workspace->m_comp_R); debug_file << rec.dump() << "\n"; } } @@ -667,7 +655,8 @@ SolveResult Solver::solve() { // If we are at the maximum penalty, we just update multiplier estimates without increasing penalty workspace->m_eq_est = workspace->m_eq; workspace->m_ineq_est = workspace->m_ineq; - workspace->m_comp_est = workspace->m_comp; + workspace->m_comp_L_est = workspace->m_comp_L; + workspace->m_comp_R_est = workspace->m_comp_R; // Scale relaxation parameter workspace->relax_param = relax_param_new; @@ -720,7 +709,7 @@ SolveResult Solver::solve() { any_inertia_succeeded = true; - backsolve(); + backsolve(-workspace->kkt_residual, workspace->newton_step); linesearch_succeeded = filter_linesearch( relaxation_param, @@ -775,7 +764,8 @@ SolveResult Solver::solve() { footer["s_comp"] = vec_to_json(workspace->s_comp); footer["m_eq"] = vec_to_json(workspace->m_eq); footer["m_ineq"] = vec_to_json(workspace->m_ineq); - footer["m_comp"] = vec_to_json(workspace->m_comp); + footer["m_comp_L"] = vec_to_json(workspace->m_comp_L); + footer["m_comp_R"] = vec_to_json(workspace->m_comp_R); debug_file << footer.dump() << "\n"; } } @@ -795,7 +785,8 @@ SolveResult Solver::solve() { Vec(workspace->s_comp), Vec(workspace->m_eq), Vec(workspace->m_ineq), - Vec(workspace->m_comp), + Vec(workspace->m_comp_L), + Vec(workspace->m_comp_R), }; } @@ -807,23 +798,27 @@ Filter::Entry Solver::entry_from_solution(double relax_param, double inv_penalty inv_penalty_param * (workspace->m_ineq - workspace->m_ineq_est); Vec p_comp = retract(workspace->s_comp, relax_param); - Vec m_comp_primal_feas = - workspace->residual_comp - inv_penalty_param * (workspace->m_comp - workspace->m_comp_est); + Vec m_comp_L_primal_feas = + workspace->residual_comp_L - inv_penalty_param * (workspace->m_comp_L - workspace->m_comp_L_est); + Vec m_comp_R_primal_feas = + workspace->residual_comp_R - inv_penalty_param * (workspace->m_comp_R - workspace->m_comp_R_est); for (int i = 0; i < prob->n_comp; i++) { - m_comp_primal_feas[2 * i] += -p_comp[i]; // p(s) - m_comp_primal_feas[2 * i + 1] += -(p_comp[i] - workspace->s_comp[i]); // p(s) - p(-s) = s + m_comp_L_primal_feas[i] += -p_comp[i]; // p(s) + m_comp_R_primal_feas[i] += -(p_comp[i] - workspace->s_comp[i]); // p(s) - p(-s) = s } double candidate_constraint_violation = n_duals == 0 ? 0.0 : - (m_eq_primal_feas.lpNorm<1>() + m_ineq_primal_feas.lpNorm<1>() + m_comp_primal_feas.lpNorm<1>()) / n_duals; + (m_eq_primal_feas.lpNorm<1>() + m_ineq_primal_feas.lpNorm<1>() + + m_comp_L_primal_feas.lpNorm<1>() + m_comp_R_primal_feas.lpNorm<1>()) / n_duals; double candidate_objective = 0.5 * workspace->z.transpose() * prob->cost_hessian * workspace->z + prob->cost_gradient.dot(workspace->z) + prob->cost_const - relax_param * p_ineq.array().log().sum() + 0.5 * inv_penalty_param * - (workspace->m_eq.squaredNorm() + workspace->m_ineq.squaredNorm() + workspace->m_comp.squaredNorm()); + (workspace->m_eq.squaredNorm() + workspace->m_ineq.squaredNorm() + + workspace->m_comp_L.squaredNorm() + workspace->m_comp_R.squaredNorm()); return { candidate_constraint_violation, @@ -844,7 +839,8 @@ bool Solver::filter_linesearch(double relax_param, double inv_penalty_param, int // Update constraint residuals from candidate solution workspace->residual_eq = prob->J_eq * workspace->z + prob->c_eq; workspace->residual_ineq = prob->J_ineq * workspace->z + prob->c_ineq; - workspace->residual_comp = prob->J_comp * workspace->z + prob->c_comp; + workspace->residual_comp_L = prob->L_comp * workspace->z + prob->l_comp; + workspace->residual_comp_R = prob->R_comp * workspace->z + prob->r_comp; const Filter::Entry candidate = entry_from_solution(relax_param, inv_penalty_param); @@ -868,7 +864,8 @@ void Solver::ruiz_equilibration(int niter) { SMat H_bar = prob->cost_hessian; SMat J_eq_bar = prob->J_eq; SMat J_ineq_bar = prob->J_ineq; - SMat J_comp_bar = prob->J_comp; + SMat L_comp_bar = prob->L_comp; + SMat R_comp_bar = prob->R_comp; const int nz = prob->nz; const int n_eq = prob->n_eq; @@ -879,7 +876,8 @@ void Solver::ruiz_equilibration(int niter) { Eigen::VectorBlock d = workspace->scaling.head(nz); Eigen::VectorBlock e_eq = workspace->scaling.segment(nz + n_ineq + n_comp, n_eq); Eigen::VectorBlock e_ineq = workspace->scaling.segment(nz + n_ineq + n_comp + n_eq, n_ineq); - Eigen::VectorBlock e_comp = workspace->scaling.segment(nz + n_ineq + n_comp + n_eq + n_ineq, 2*n_comp); + Eigen::VectorBlock e_comp_L = workspace->scaling.segment(nz + n_ineq + n_comp + n_eq + n_ineq, n_comp); + Eigen::VectorBlock e_comp_R = workspace->scaling.segment(nz + n_ineq + n_comp + n_eq + n_ineq + n_comp, n_comp); // Helper functions: Inf-norm column/row reductions using sparse nonzero iteration for (int iter = 0; iter < niter; ++iter) { @@ -901,8 +899,13 @@ void Solver::ruiz_equilibration(int niter) { d_temp[col] = std::max(d_temp[col], std::abs(it.value())); } } - for (int col = 0; col < J_comp_bar.outerSize(); ++col) { - for (SMat::InnerIterator it(J_comp_bar, col); it; ++it) { + for (int col = 0; col < L_comp_bar.outerSize(); ++col) { + for (SMat::InnerIterator it(L_comp_bar, col); it; ++it) { + d_temp[col] = std::max(d_temp[col], std::abs(it.value())); + } + } + for (int col = 0; col < R_comp_bar.outerSize(); ++col) { + for (SMat::InnerIterator it(R_comp_bar, col); it; ++it) { d_temp[col] = std::max(d_temp[col], std::abs(it.value())); } } @@ -910,7 +913,8 @@ void Solver::ruiz_equilibration(int niter) { // Compute row-wise norms of second part of KKT system (feasibility) Vec e_eq_temp = Vec::Zero(n_eq); Vec e_ineq_temp = Vec::Zero(n_ineq); - Vec e_comp_temp = Vec::Zero(2*n_comp); + Vec e_comp_L_temp = Vec::Zero(n_comp); + Vec e_comp_R_temp = Vec::Zero(n_comp); for (int col = 0; col < J_eq_bar.outerSize(); ++col) { for (SMat::InnerIterator it(J_eq_bar, col); it; ++it) { e_eq_temp[it.row()] = std::max(e_eq_temp[it.row()], std::abs(it.value())); @@ -921,9 +925,14 @@ void Solver::ruiz_equilibration(int niter) { e_ineq_temp[it.row()] = std::max(e_ineq_temp[it.row()], std::abs(it.value())); } } - for (int col = 0; col < J_comp_bar.outerSize(); ++col) { - for (SMat::InnerIterator it(J_comp_bar, col); it; ++it) { - e_comp_temp[it.row()] = std::max(e_comp_temp[it.row()], std::abs(it.value())); + for (int col = 0; col < L_comp_bar.outerSize(); ++col) { + for (SMat::InnerIterator it(L_comp_bar, col); it; ++it) { + e_comp_L_temp[it.row()] = std::max(e_comp_L_temp[it.row()], std::abs(it.value())); + } + } + for (int col = 0; col < R_comp_bar.outerSize(); ++col) { + for (SMat::InnerIterator it(R_comp_bar, col); it; ++it) { + e_comp_R_temp[it.row()] = std::max(e_comp_R_temp[it.row()], std::abs(it.value())); } } @@ -931,13 +940,15 @@ void Solver::ruiz_equilibration(int niter) { d_temp = d_temp.cwiseMax(1e-4).cwiseMin(1e4); e_eq_temp = e_eq_temp.cwiseMax(1e-4).cwiseMin(1e4); e_ineq_temp = e_ineq_temp.cwiseMax(1e-4).cwiseMin(1e4); - e_comp_temp = e_comp_temp.cwiseMax(1e-4).cwiseMin(1e4); + e_comp_L_temp = e_comp_L_temp.cwiseMax(1e-4).cwiseMin(1e4); + e_comp_R_temp = e_comp_R_temp.cwiseMax(1e-4).cwiseMin(1e4); // Take square roots, reciprocal, turn into diag vectors d_temp = d_temp.array().rsqrt().matrix(); e_eq_temp = e_eq_temp.array().rsqrt().matrix(); e_ineq_temp = e_ineq_temp.array().rsqrt().matrix(); - e_comp_temp = e_comp_temp.array().rsqrt().matrix(); + e_comp_L_temp = e_comp_L_temp.array().rsqrt().matrix(); + e_comp_R_temp = e_comp_R_temp.array().rsqrt().matrix(); // Update problem data for (int col = 0; col < H_bar.outerSize(); ++col) { @@ -955,9 +966,14 @@ void Solver::ruiz_equilibration(int niter) { it.valueRef() *= e_ineq_temp[it.row()] * d_temp[col]; } } - for (int col = 0; col < J_comp_bar.outerSize(); ++col) { - for (SMat::InnerIterator it(J_comp_bar, col); it; ++it) { - it.valueRef() *= e_comp_temp[it.row()] * d_temp[col]; + for (int col = 0; col < L_comp_bar.outerSize(); ++col) { + for (SMat::InnerIterator it(L_comp_bar, col); it; ++it) { + it.valueRef() *= e_comp_L_temp[it.row()] * d_temp[col]; + } + } + for (int col = 0; col < R_comp_bar.outerSize(); ++col) { + for (SMat::InnerIterator it(R_comp_bar, col); it; ++it) { + it.valueRef() *= e_comp_R_temp[it.row()] * d_temp[col]; } } @@ -965,7 +981,8 @@ void Solver::ruiz_equilibration(int niter) { d = d.cwiseProduct(d_temp); e_eq = e_eq.cwiseProduct(e_eq_temp); e_ineq = e_ineq.cwiseProduct(e_ineq_temp); - e_comp = e_comp.cwiseProduct(e_comp_temp); + e_comp_L = e_comp_L.cwiseProduct(e_comp_L_temp); + e_comp_R = e_comp_R.cwiseProduct(e_comp_R_temp); } } diff --git a/src/workspace.cpp b/src/workspace.cpp index d4104d5..9685cd7 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -8,12 +8,14 @@ Workspace::Workspace(const Problem& prob) s_comp(solution.data() + prob.nz + prob.n_ineq, prob.n_comp), m_eq(solution.data() + prob.nz + prob.n_ineq + prob.n_comp, prob.n_eq), m_ineq(solution.data() + prob.nz + prob.n_ineq + prob.n_comp + prob.n_eq, prob.n_ineq), - m_comp(solution.data() + prob.nz + prob.n_ineq + prob.n_comp + prob.n_eq + prob.n_ineq, 2 * prob.n_comp) + m_comp_L(solution.data() + prob.nz + prob.n_ineq + prob.n_comp + prob.n_eq + prob.n_ineq, prob.n_comp), + m_comp_R(solution.data() + prob.nz + prob.n_ineq + prob.n_comp + prob.n_eq + prob.n_ineq + prob.n_comp, prob.n_comp) { m_eq_est.resize(prob.n_eq); m_ineq_est.resize(prob.n_ineq); - m_comp_est.resize(2 * prob.n_comp); + m_comp_L_est.resize(prob.n_comp); + m_comp_R_est.resize(prob.n_comp); int n_vars = prob.nz + prob.n_ineq + prob.n_comp + prob.n_eq + prob.n_ineq + 2 * prob.n_comp; kkt_residual.resize(n_vars); @@ -22,21 +24,25 @@ Workspace::Workspace(const Problem& prob) s_ineq_stationarity.resize(prob.n_ineq); newton_step.resize(n_vars); dsolution_drelax.resize(n_vars); + backsolve_scratch.resize(n_vars); residual_eq.resize(prob.n_eq); residual_ineq.resize(prob.n_ineq); - residual_comp.resize(2 * prob.n_comp); + residual_comp_L.resize(prob.n_comp); + residual_comp_R.resize(prob.n_comp); // Initialize solution and multiplier estimates to 0 solution.setZero(); m_eq_est.setZero(); m_ineq_est.setZero(); - m_comp_est.setZero(); + m_comp_L_est.setZero(); + m_comp_R_est.setZero(); // Initialize workspace constraint residuals residual_eq = prob.J_eq * z + prob.c_eq; residual_ineq = prob.J_ineq * z + prob.c_ineq; - residual_comp = prob.J_comp * z + prob.c_comp; + residual_comp_L = prob.L_comp * z + prob.l_comp; + residual_comp_R = prob.R_comp * z + prob.r_comp; // Allocate for linear system solve etree.resize(n_vars); From 582a870f875552390a1770ec17f4301b9fbfeabb Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Mon, 13 Jul 2026 02:00:32 -0400 Subject: [PATCH 10/35] wip new penalty update working on it --- CMakeLists.txt | 15 +- bindings/julia_bindings.cpp | 7 +- bindings/python_bindings.cpp | 6 - include/solver.h | 23 +-- include/workspace.h | 13 +- julia/src/Marble.jl | 7 +- julia/src/debug.jl | 61 ------- python/marble/_core.pyi | 4 - src/solver.cpp | 339 ++++++++++++++++++++--------------- 9 files changed, 231 insertions(+), 244 deletions(-) delete mode 100644 julia/src/debug.jl diff --git a/CMakeLists.txt b/CMakeLists.txt index af8acb9..108671b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,18 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) include(FetchContent) find_package(Eigen3 3.3 REQUIRED NO_MODULE) -find_package(nlohmann_json CONFIG REQUIRED) + +# spdlog – prefer a system install, otherwise fetch it. +find_package(spdlog CONFIG QUIET) +if(NOT spdlog_FOUND) + FetchContent_Declare( + spdlog + GIT_REPOSITORY https://github.com/gabime/spdlog.git + GIT_TAG v1.14.1 + EXCLUDE_FROM_ALL + ) + FetchContent_MakeAvailable(spdlog) +endif() # QDLDL – prefer a system install, otherwise fetch as static-only. # EXCLUDE_FROM_ALL suppresses QDLDL's cmake --install rules so they don't @@ -73,7 +84,7 @@ add_library(marble STATIC src/filter.cpp ) target_include_directories(marble PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) -target_link_libraries(marble PUBLIC Eigen3::Eigen nlohmann_json::nlohmann_json marble_qdldl) +target_link_libraries(marble PUBLIC Eigen3::Eigen spdlog::spdlog marble_qdldl) # --------------------------------------------------------------------------- # Python bindings (cmake -DMARBLE_BUILD_PYTHON=ON — default ON) diff --git a/bindings/julia_bindings.cpp b/bindings/julia_bindings.cpp index ef203a7..e99d6d8 100644 --- a/bindings/julia_bindings.cpp +++ b/bindings/julia_bindings.cpp @@ -167,12 +167,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { OPTION_RW(comp_init_random, bool) OPTION_RW(comp_init_seed, int) OPTION_RW(verbosity, int) - OPTION_RW(print_every, int) - OPTION_RW(debug, bool) - OPTION_RW(debug_output_path, std::string) - OPTION_RW(debug_log_every, int) - .method("output_dir", [](const Solver::Options& o) { return o.output_dir.string(); }) - .method("output_dir!", [](Solver::Options& o, const std::string& v) { o.output_dir = v; }); + OPTION_RW(print_every, int); #undef OPTION_RW diff --git a/bindings/python_bindings.cpp b/bindings/python_bindings.cpp index eed7dc0..2f328a0 100644 --- a/bindings/python_bindings.cpp +++ b/bindings/python_bindings.cpp @@ -172,12 +172,6 @@ PYBIND11_MODULE(_core, m) { .def_readwrite("comp_init_seed", &Solver::Options::comp_init_seed) .def_readwrite("verbosity", &Solver::Options::verbosity) .def_readwrite("print_every", &Solver::Options::print_every) - .def_readwrite("debug", &Solver::Options::debug) - .def_readwrite("debug_output_path", &Solver::Options::debug_output_path) - .def_readwrite("debug_log_every", &Solver::Options::debug_log_every) - .def_property("output_dir", - [](const Solver::Options& o) { return o.output_dir.string(); }, - [](Solver::Options& o, const std::string& v) { o.output_dir = v; }) .def("__repr__", [](const Solver::Options& o) { return ""; diff --git a/include/solver.h b/include/solver.h index 783b334..dadd2b5 100644 --- a/include/solver.h +++ b/include/solver.h @@ -7,7 +7,6 @@ #include "workspace.h" #include "filter.h" #include -#include #include /** @@ -78,24 +77,20 @@ class Solver { /// Seed for the small random noise used to initialize s_comp /// (negative leaves the RNG unseeded, i.e. non-deterministic across runs) int comp_init_seed{-1}; - /// Output directory for solution and solve information - std::filesystem::path output_dir{"/dev/null"}; - /// Verbosity level: 0=silent, 1=per-iteration table + footer + /// Verbosity level, maps to spdlog thresholds: + /// 0 = silent + /// 1 = errors only (reason for non-convergence) + /// 2 = + warnings (regularization bumps, penalty capped, ...) + /// 3 = + solver header and per-iteration table int verbosity{0}; - /// Print a row every N iterations (only used when verbosity >= 1) + /// Print a per-iteration row every N iterations (only used at verbosity >= 3) int print_every{1}; - /// Write a JSONL debug log with iterates and solver state (one JSON object per line) - bool debug{false}; - /// Path to the debug log file (used when debug=true) - std::string debug_output_path{"solver_debug.jsonl"}; - /// Log every N iterations (1 = every iteration) - int debug_log_every{1}; Options() = default; }; // Problem instance - std::shared_ptr prob; + std::shared_ptr prob; // Workspace for solve std::shared_ptr workspace; @@ -172,7 +167,7 @@ class Solver { /** * Returns the problem currently set for the solver */ - Problem& get_problem() { + const Problem& get_problem() { return *prob; } @@ -284,7 +279,7 @@ class Solver { /** * Determine if the solver has converged based on KKT residual norm, constraint satisfaction */ - bool convergence(const Options &options); + bool convergence() const; // Solver options Options options; diff --git a/include/workspace.h b/include/workspace.h index 83bf239..fa6f492 100644 --- a/include/workspace.h +++ b/include/workspace.h @@ -40,10 +40,15 @@ class Workspace { Vec s_comp_stationarity; /** Complementarity stationarity terms */ // Constraint evaluations - Vec residual_eq; /** Equality constraint residuals */ - Vec residual_ineq; /** Inequality constraint residuals */ - Vec residual_comp_L; /** Complementarity constraint residuals, left (L_comp x + l_comp) */ - Vec residual_comp_R; /** Complementarity constraint residuals, right (R_comp x + r_comp) */ + Vec residual_eq; /** Ax + b */ + Vec residual_ineq; /** Gx + h */ + Vec residual_comp_L; /** Lx + l */ + Vec residual_comp_R; /** Rx + r */ + + Vec subproblem_residual_eq; /** Ax + b */ + Vec subproblem_residual_ineq; /** Gx + h - p(v) */ + Vec subproblem_residual_comp_L; /** Lx + l - p(sigma)*/ + Vec subproblem_residual_comp_R; /** Rx + r - p(-sigma) */ // Relaxation and penalty parameters double relax_param; /** Relaxation parameter for the retraction map */ diff --git a/julia/src/Marble.jl b/julia/src/Marble.jl index 7ecc1a3..8b47f9c 100644 --- a/julia/src/Marble.jl +++ b/julia/src/Marble.jl @@ -99,8 +99,7 @@ module Marble :max_iters, :max_iters_linesearch, :gamma_objective, :gamma_constraint, :ruiz_iterations, :inertia_warmstart, - :output_dir, :verbosity, :print_every, :debug, - :debug_output_path, :debug_log_every + :verbosity, :print_every ] function update_settings!(solver::Marble.Solver; kwargs...) @@ -177,8 +176,4 @@ module Marble Marble.set_problem!(solver, prob, opts) return nothing end - - # Debug log loader - include("debug.jl") - export SolverDebugLog, load_debug_log, get_field, get_iterates end diff --git a/julia/src/debug.jl b/julia/src/debug.jl deleted file mode 100644 index 258a30b..0000000 --- a/julia/src/debug.jl +++ /dev/null @@ -1,61 +0,0 @@ -using JSON - -struct SolverDebugLog - header::Dict{String,Any} - iterates::Vector{Dict{String,Any}} - footer::Dict{String,Any} -end - -""" - load_debug_log(path) -> SolverDebugLog - -Read a JSONL debug log written by the C++ solver when `debug=true`. -Returns a `SolverDebugLog` with fields: -- `header` – problem dimensions and solver parameters -- `iterates` – one Dict per logged iteration (z, multipliers, violations, etc.) -- `footer` – final iterate + convergence summary -""" -function load_debug_log(path::AbstractString) - header = nothing - iterates = Dict{String,Any}[] - footer = nothing - - for line in eachline(path) - isempty(strip(line)) && continue - rec = JSON.parse(line) - t = rec["type"] - if t == "header" - header = rec - elseif t == "iterate" - push!(iterates, rec) - elseif t == "footer" - footer = rec - end - end - - header === nothing && error("Debug log missing header: $path") - footer === nothing && error("Debug log missing footer: $path") - - return SolverDebugLog(header, iterates, footer) -end - -""" - get_field(log, field) -> Vector - -Extract a scalar field (e.g. "kkt", "penalty_param") from every iterate as a Vector. -""" -function get_field(log::SolverDebugLog, field::AbstractString) - return [it[field] for it in log.iterates] -end - -""" - get_iterates(log, field) -> Matrix (n_iters × n_vars) - -Extract a vector field (e.g. "z", "m_eq") from every iterate. -Each row is one iteration. -""" -function get_iterates(log::SolverDebugLog, field::AbstractString) - vecs = [Float64.(it[field]) for it in log.iterates] - isempty(vecs) && return Matrix{Float64}(undef, 0, 0) - return reduce(hcat, vecs)' # (n_iters, n_vars) -end diff --git a/python/marble/_core.pyi b/python/marble/_core.pyi index 435ee5c..b5a1c9d 100644 --- a/python/marble/_core.pyi +++ b/python/marble/_core.pyi @@ -240,16 +240,12 @@ class SolverOptions: convergence_eq_violation: float convergence_ineq_violation: float convergence_kkt_norm: float - debug: bool - debug_log_every: int - debug_output_path: str gamma_constraint: float gamma_objective: float inertia_warmstart: bool max_iters: int max_iters_linesearch: int outer_step_kkt_norm: float - output_dir: str penalty_initial: float penalty_max: float penalty_scaling: float diff --git a/src/solver.cpp b/src/solver.cpp index cb1de56..0e8cd51 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -1,10 +1,11 @@ #include "solver.h" -#include -#include -#include #include #include #include +#include +#include +#include +#include namespace { Eigen::VectorXi safe_linspaced(int n, int start) { @@ -12,50 +13,37 @@ namespace { return Eigen::VectorXi::LinSpaced(n, start, start + n - 1); } - // ------------------------------------------------------------------------- - // IPOPT-style printing helpers - // ------------------------------------------------------------------------- - static const int COL_HEADER_REPRINT = 25; // reprint column headers every N rows - - static void print_col_header() { - printf("%5s %-5s %7s %7s %7s %12s %12s %12s %12s %12s\n", - "iter", "type", "lg(ρ)", "lg(κ)", "lg(reg)", - "||kkt||", "||eq||", "||ineq||", "||comp||", "obj"); - printf("%s\n", std::string(110, '-').c_str()); - } - - static void print_solve_header(int nz, int n_eq, int n_ineq, int n_comp) { - printf("\nMarble Solver [nz=%d, n_eq=%d, n_ineq=%d, n_comp=%d]\n\n", - nz, n_eq, n_ineq, n_comp); - print_col_header(); + // Per-iteration table column header. + constexpr const char* kColHeader = + " iter type lg(ρ) lg(κ) lg(reg) ||kkt|| ||eq|| ||ineq|| ||comp|| obj"; + + // Shared "marble" console logger; its level is set per-solve from Options::verbosity. + // The pattern is just the (level-colored) message so the table stays aligned. + std::shared_ptr solver_logger() { + auto lg = spdlog::get("marble"); + if (!lg) { + lg = spdlog::stdout_color_mt("marble"); + lg->set_pattern("%^%v%$"); + } + return lg; } - static void print_iter_row(int iter, const char* type, - double penalty, double relax, - double kkt, double eq_vio, double ineq_vio, - double comp_vio, double obj, - double regularizer) { - char reg_str[8] = " ---"; - if (!std::isnan(regularizer)) { - if (regularizer == 0.0) std::snprintf(reg_str, sizeof(reg_str), " 0"); - else std::snprintf(reg_str, sizeof(reg_str), "%7.0f", std::log10(regularizer)); + // verbosity -> spdlog threshold: + // 0 silent | 1 errors (non-convergence) | 2 + warnings | 3 + header & per-iteration + spdlog::level::level_enum level_from_verbosity(int verbosity) { + switch (verbosity) { + case 0: return spdlog::level::off; + case 1: return spdlog::level::err; + case 2: return spdlog::level::warn; + default: return spdlog::level::debug; } - printf("%5d %-5s %7.1f %7.1f %7s %12.3e %12.3e %12.3e %12.3e %12.3e\n", - iter, type, - std::log10(penalty), std::log10(relax), reg_str, - kkt, eq_vio, ineq_vio, comp_vio, obj); - std::fflush(stdout); } - static void print_solve_footer(bool converged, int n_outer, int n_inner, int n_fact, - double kkt, double eq_vio, double ineq_vio, - double comp_vio, double obj) { - printf("\nSolver %-20s %d iters (%d outer, %d inner), %d factorizations.\n", - converged ? "CONVERGED" : "MAX ITERS REACHED", - n_outer + n_inner, n_outer, n_inner, n_fact); - printf("Final ||kkt||=%.2e ||eq||=%.2e ||ineq||=%.2e ||comp||=%.2e obj=%.6e\n\n", - kkt, eq_vio, ineq_vio, comp_vio, obj); - std::fflush(stdout); + // Format the inertia-regularizer column as log10, or "---" (none) / "0" (exactly zero). + std::string fmt_reg(double regularizer) { + if (std::isnan(regularizer)) return "---"; + if (regularizer == 0.0) return "0"; + return fmt::format("{:.0f}", std::log10(regularizer)); } } @@ -479,19 +467,19 @@ void Solver::compute_amd_ordering() { } } -bool Solver::convergence(const Solver::Options& options) { - // KKT residual norm - double kkt_norm = workspace->kkt_residual.lpNorm(); +bool Solver::convergence() const { + // // KKT residual norm + // double kkt_norm = workspace->kkt_residual.lpNorm(); // Primal feasibility double eq_violation = workspace->residual_eq.lpNorm(); double ineq_violation = workspace->residual_ineq.cwiseMin(0).lpNorm(); - double comp_violation = workspace->residual_comp_L.cwiseProduct(workspace->residual_comp_R) - .lpNorm(); + double comp_violation = workspace->residual_comp_L.cwiseProduct(workspace->residual_comp_R).lpNorm(); - return kkt_norm < options.convergence_kkt_norm && eq_violation < options.convergence_eq_violation && - ineq_violation < options.convergence_ineq_violation && comp_violation < options.convergence_comp_violation; + return eq_violation < options.convergence_eq_violation && + ineq_violation < options.convergence_ineq_violation && + comp_violation < options.convergence_comp_violation; } SolveResult Solver::solve() { @@ -519,37 +507,31 @@ SolveResult Solver::solve() { int n_iter_outer = 0; int n_iter_inner = 0; - const bool verbose = options.verbosity >= 1; + auto log = solver_logger(); + log->set_level(level_from_verbosity(options.verbosity)); + const char* last_step_type = "---"; double last_regularizer = NAN; - int rows_printed = 0; - if (verbose) { - print_solve_header(prob->nz, prob->n_eq, prob->n_ineq, prob->n_comp); - } - - auto vec_to_json = [](const Eigen::Map& v) { - return std::vector(v.data(), v.data() + v.size()); - }; - - std::ofstream debug_file; - const bool debug = options.debug && !options.debug_output_path.empty(); - if (debug) { - debug_file.open(options.debug_output_path, std::ios::trunc); - nlohmann::json header; - header["type"] = "header"; - header["nz"] = prob->nz; - header["n_eq"] = prob->n_eq; - header["n_ineq"] = prob->n_ineq; - header["n_comp"] = prob->n_comp; - header["penalty_initial"] = options.penalty_initial; - header["penalty_max"] = options.penalty_max; - header["penalty_scaling"] = options.penalty_scaling; - header["relaxation_initial"] = options.relaxation_initial; - header["relaxation_min"] = options.relaxation_min; - header["relaxation_scaling"] = options.relaxation_scaling; - debug_file << header.dump() << "\n"; - } + // Solver info header (shown at verbosity >= 3) + log->info(""); + log->info("Marble Solver"); + log->info(" variables : {} total (nz={}, +{} ineq slacks, +{} comp slacks; {} duals)", + n_vars, prob->nz, prob->n_ineq, prob->n_comp, n_duals); + log->info(" constraints : {} equality, {} inequality, {} complementarity", + prob->n_eq, prob->n_ineq, prob->n_comp); + log->info(" penalty : init={:.1e} max={:.1e} scale={:.1f}", + options.penalty_initial, options.penalty_max, options.penalty_scaling); + log->info(" relaxation : init={:.1e} min={:.1e} scale={:.2f}", + options.relaxation_initial, options.relaxation_min, options.relaxation_scaling); + log->info(" convergence : kkt<{:.1e} eq<{:.1e} ineq<{:.1e} comp<{:.1e} (max_iters={})", + options.convergence_kkt_norm, options.convergence_eq_violation, + options.convergence_ineq_violation, options.convergence_comp_violation, options.max_iters); + log->info(""); + + // Per-iteration table header (shown at verbosity >= 3) + log->debug("{}", kColHeader); + log->debug("{}", std::string(110, '-')); auto compute_metrics = [&]() { double kkt = workspace->kkt_residual.lpNorm(); @@ -572,45 +554,16 @@ SolveResult Solver::solve() { update_KKT_residual(relaxation_param, inv_penalty_param); - const bool should_print = verbose && iter % options.print_every == 0; - const bool should_log = debug && iter % options.debug_log_every == 0; - if (should_print || should_log) { + if (log->should_log(spdlog::level::debug) && iter % std::max(1, options.print_every) == 0) { auto [kkt, eq_vio, ineq_vio, comp_vio, obj] = compute_metrics(); - if (should_print) { - if (rows_printed > 0 && rows_printed % COL_HEADER_REPRINT == 0) { - print_col_header(); - } - print_iter_row(iter, last_step_type, - workspace->penalty_param, workspace->relax_param, - kkt, eq_vio, ineq_vio, comp_vio, obj, - last_regularizer); - ++rows_printed; - } - if (should_log) { - nlohmann::json rec; - rec["type"] = "iterate"; - rec["iter"] = iter; - rec["step_type"] = std::string(last_step_type); - rec["penalty_param"] = workspace->penalty_param; - rec["relax_param"] = workspace->relax_param; - rec["regularizer"] = std::isnan(last_regularizer) ? nlohmann::json(nullptr) : nlohmann::json(last_regularizer); - rec["kkt"] = kkt; - rec["eq_vio"] = eq_vio; - rec["ineq_vio"] = ineq_vio; - rec["comp_vio"] = comp_vio; - rec["obj"] = obj; - rec["z"] = vec_to_json(workspace->z); - rec["s_ineq"] = vec_to_json(workspace->s_ineq); - rec["s_comp"] = vec_to_json(workspace->s_comp); - rec["m_eq"] = vec_to_json(workspace->m_eq); - rec["m_ineq"] = vec_to_json(workspace->m_ineq); - rec["m_comp_L"] = vec_to_json(workspace->m_comp_L); - rec["m_comp_R"] = vec_to_json(workspace->m_comp_R); - debug_file << rec.dump() << "\n"; - } + log->debug("{:5d} {:<5} {:7.1f} {:7.1f} {:>7} {:12.3e} {:12.3e} {:12.3e} {:12.3e} {:12.3e}", + iter, last_step_type, + std::log10(workspace->penalty_param), std::log10(workspace->relax_param), + fmt_reg(last_regularizer), + kkt, eq_vio, ineq_vio, comp_vio, obj); } - if (convergence(options)) { + if (convergence()) { converged = true; break; } @@ -692,6 +645,8 @@ SolveResult Solver::solve() { update_KKT_primal_regularizer(regularizer_to_try); if (!numerical_factorization()) { + log->warn("iter {}: numerical factorization failed (reg={:.1e}); increasing regularization", + iter, regularizer_to_try); regularizer_to_try = bump_reg(regularizer_to_try); continue; } @@ -699,6 +654,8 @@ SolveResult Solver::solve() { any_factorization_succeeded = true; if (!check_inertia()) { + log->warn("iter {}: wrong inertia (reg={:.1e}); increasing regularization", + iter, regularizer_to_try); regularizer_to_try = bump_reg(regularizer_to_try); continue; } @@ -722,51 +679,44 @@ SolveResult Solver::solve() { break; } + log->warn("iter {}: linesearch failed (reg={:.1e}); increasing regularization", + iter, regularizer_to_try); regularizer_to_try = bump_reg(regularizer_to_try); } if (!linesearch_succeeded) { if (!any_factorization_succeeded) { + log->error("iter {}: numerical factorization failed for all regularization values", iter); throw std::runtime_error("Numerical factorization failed for all regularization values!"); } if (!any_inertia_succeeded) { + log->error("iter {}: inertia could not be corrected for any regularization value", iter); throw std::runtime_error("Inertia correction failed for all regularization values!"); } + log->error("iter {}: linesearch failed for all regularization values", iter); throw std::runtime_error("Linesearch failed for all regularization values!"); } } } - if (verbose || debug) { - double relaxation_param = workspace->relax_param; - double inv_pen = 1.0 / workspace->penalty_param; - update_KKT_residual(relaxation_param, inv_pen); + const bool want_summary = log->should_log(spdlog::level::info); + const bool want_reason = !converged && log->should_log(spdlog::level::err); + if (want_summary || want_reason) { + // Recompute the residual so the final report reflects the returned iterate + update_KKT_residual(workspace->relax_param, 1.0 / workspace->penalty_param); auto [kkt, eq_vio, ineq_vio, comp_vio, obj] = compute_metrics(); - if (verbose) { - print_solve_footer(converged, n_iter_outer, n_iter_inner, n_factorizations, - kkt, eq_vio, ineq_vio, comp_vio, obj); + if (want_summary) { + log->info(""); + log->info("Marble {} | {} iters ({} outer, {} inner), {} factorizations", + converged ? "converged" : "stopped", + n_iter_outer + n_iter_inner, n_iter_outer, n_iter_inner, n_factorizations); + log->info(" final: ||kkt||={:.2e} ||eq||={:.2e} ||ineq||={:.2e} ||comp||={:.2e} obj={:.6e}", + kkt, eq_vio, ineq_vio, comp_vio, obj); + log->info(""); } - if (debug) { - nlohmann::json footer; - footer["type"] = "footer"; - footer["converged"] = converged; - footer["iterations"] = n_iter_outer + n_iter_inner; - footer["iterations_outer"]= n_iter_outer; - footer["iterations_inner"]= n_iter_inner; - footer["factorizations"] = n_factorizations; - footer["kkt"] = kkt; - footer["eq_vio"] = eq_vio; - footer["ineq_vio"] = ineq_vio; - footer["comp_vio"] = comp_vio; - footer["obj"] = obj; - footer["z"] = vec_to_json(workspace->z); - footer["s_ineq"] = vec_to_json(workspace->s_ineq); - footer["s_comp"] = vec_to_json(workspace->s_comp); - footer["m_eq"] = vec_to_json(workspace->m_eq); - footer["m_ineq"] = vec_to_json(workspace->m_ineq); - footer["m_comp_L"] = vec_to_json(workspace->m_comp_L); - footer["m_comp_R"] = vec_to_json(workspace->m_comp_R); - debug_file << footer.dump() << "\n"; + if (want_reason) { + log->error("Marble did not converge: reached max_iters={} (||kkt||={:.2e}, need < {:.1e})", + options.max_iters, kkt, options.convergence_kkt_norm); } } @@ -790,6 +740,113 @@ SolveResult Solver::solve() { }; } +void Solver::update_residuals() { + workspace->residual_eq = prob->J_eq * workspace->z + prob->c_eq; + workspace->residual_ineq = prob->J_ineq * workspace->z + prob->c_ineq; + workspace->residual_comp_L = prob->L_comp * workspace->z + prob->l_comp; + workspace->residual_comp_R = prob->R_comp * workspace->z + prob->r_comp; +} + +void Solver::update_subproblem_residuals(double relax_param) { + workspace->subproblem_residual_eq = workspace->residual_eq; + workspace->subproblem_residual_ineq = workspace->residual_ineq - retract(workspace->s_ineq, workspace->relax_param); + + const Vec p_comp = retract(workspace->s_comp, workspace->relax_param); + workspace->subproblem_residual_comp_L = workspace->residual_comp_L - p_comp; + workspace->subproblem_residual_comp_R = workspace->residual_comp_R - (p_comp - workspace->s_comp); +} + +double Solver::subproblem_feas(double relax_param) { + double subproblem_eq_viol = workspace->subproblem_residual_eq.lpNorm(); + double subproblem_ineq_viol = workspace->subproblem_residual_ineq.lpNorm(); + + const Vec p_comp = retract(workspace->s_comp, workspace->relax_param); + double subproblem_comp_L_viol = workspace->subproblem_residual_comp_L.lpNorm(); + double subproblem_comp_R_viol = workspace->subproblem_residual_comp_R.lpNorm(); + + return std::max({subproblem_eq_viol, subproblem_ineq_viol, subproblem_comp_L_viol, subproblem_comp_R_viol}); +} + +void Solver::update_primal_dual_multipliers(double penalty_param) { + double inv_penalty_param = 1.0 / penalty_param; + + workspace->m_eq = workspace->m_eq_est + inv_penalty_param * workspace->subproblem_residual_eq; + workspace->m_ineq = workspace->m_ineq_est + inv_penalty_param * workspace->subproblem_residual_ineq; + workspace->m_comp_L = workspace->m_comp_L_est + inv_penalty_param * workspace->subproblem_residual_comp_L; + workspace->m_comp_R = workspace->m_comp_R_est + inv_penalty_param * workspace->subproblem_residual_comp_R; +} + +SolveResult Solver::solve() { + print_solver_info(); + + // Initialize penalty and relaxation parameters + workspace->relax_param = options.relaxation_initial; + workspace->penalty_param = options.penalty_initial; + + // Initialize flags and counters + bool converged = false; + + update_residuals(); + update_subproblem_residuals(workspace->relax_param); + + double c_prev = subproblem_feas(workspace->relax_param); + + // LANCELOT parameters + double omega = 1.0 / workspace->penalty_param; + double eta = 1.0 / std::pow(workspace->penalty_param, 0.1); + + for (int iter = 0; iter < options.max_iters; ++iter) { + // Check for convergence, return if solved + if ((converged = convergence())) break; + if (workspace->penalty_param > options.penalty_max && workspace->relax_param < options.relaxation_min) { + // log->warn("Reached maximum penalty and minimum relaxation parameters without convergence."); + break; + } + + double eps_k = std::max({1e-12, 1e-1 * workspace->relax_param}); + + // Perform inner AL minimization + minimize_augmented_lagrangian(omega, c_prev); + + } + + return SolveResult{ + converged, + n_iter_outer + n_iter_inner, + n_iter_outer, + n_iter_inner, + n_factorizations, + setup_time_s, + solve_time_s, + Vec(workspace->z), + Vec(workspace->s_ineq), + Vec(workspace->s_comp), + Vec(workspace->m_eq), + Vec(workspace->m_ineq), + Vec(workspace->m_comp_L), + Vec(workspace->m_comp_R), + }; +} + +void Solver::minimize_augmented_lagrangian(double omega, double subproblem_feas_prev) { + // Compute the KKT residual and check convergence + for (int iter = 0; iter < options.max_iters; ++iter) { + update_KKT_residual(workspace->relax_param, 1.0/workspace->penalty_param); + double kkt_norm = workspace->kkt_residual.lpNorm(); + + // Inner problem has been solved to sufficient tolerance? + if (kkt_norm <= std::max({omega, 0.1 * subproblem_feas_prev})) { + break; + } + + // Do Newton step + } +} + +void Solver::newton_step(double relax_param, double penalty_param) { + +} + Filter::Entry Solver::entry_from_solution(double relax_param, double inv_penalty_param) const { Vec m_eq_primal_feas = workspace->residual_eq - inv_penalty_param * (workspace->m_eq - workspace->m_eq_est); From a82bddf9a981c7ee199e097cc2284596e326783d Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Mon, 13 Jul 2026 23:03:12 -0400 Subject: [PATCH 11/35] best perf on macmpec --- bindings/julia_bindings.cpp | 10 +- bindings/python_bindings.cpp | 18 +- include/solver.h | 68 +++- julia/examples/simple_test.jl | 2 +- julia/src/Marble.jl | 2 +- src/solver.cpp | 597 +++++++++++++++------------------- 6 files changed, 337 insertions(+), 360 deletions(-) diff --git a/bindings/julia_bindings.cpp b/bindings/julia_bindings.cpp index e99d6d8..daff6fb 100644 --- a/bindings/julia_bindings.cpp +++ b/bindings/julia_bindings.cpp @@ -130,7 +130,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("n_ineq", [](const Problem& p) { return p.n_ineq; }) .method("n_comp", [](const Problem& p) { return p.n_comp; }) .method("obj", [](const Problem& p, jlcxx::ArrayRef z) { return p.obj(to_eigen(z)); }) - .method("residual_eq", [](Problem& p, jlcxx::ArrayRef z) {return make_julia_owned(p.residual_eq(to_eigen(z))); }) + .method("residual_eq", [](const Problem& p, jlcxx::ArrayRef z) { return make_julia_owned(p.residual_eq(to_eigen(z))); }) .method("residual_ineq", [](const Problem& p, jlcxx::ArrayRef z) { return make_julia_owned(p.residual_ineq(to_eigen(z))); }) .method("residual_comp", [](const Problem& p, jlcxx::ArrayRef z) { return make_julia_owned(p.residual_comp(to_eigen(z))); }); // .method("cost_hessian", [](Problem& p) { @@ -166,8 +166,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { OPTION_RW(inertia_warmstart, bool) OPTION_RW(comp_init_random, bool) OPTION_RW(comp_init_seed, int) - OPTION_RW(verbosity, int) - OPTION_RW(print_every, int); + OPTION_RW(verbosity, int); #undef OPTION_RW @@ -305,6 +304,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { return std::vector(r.data(), r.data() + r.size()); }) // KKT updates + .method("update_residuals!", &Solver::update_residuals) .method("update_KKT_residual!", &Solver::update_KKT_residual) .method("update_KKT_system!", &Solver::update_KKT_system) .method("update_KKT_ineq!", [](Solver& s, jlcxx::ArrayRef s_ineq, double relax_param) { @@ -328,8 +328,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { }) // Linesearch .method("filter_linesearch!", &Solver::filter_linesearch) - .method("entry_from_solution", [](const Solver& s, double relax_param, double inv_penalty_param) { - Filter::Entry e = s.entry_from_solution(relax_param, inv_penalty_param); + .method("entry_from_solution", [](const Solver& s, double relax_param, double penalty_param) { + Filter::Entry e = s.entry_from_solution(relax_param, penalty_param); return std::make_tuple(e.feas, e.merit); }) // Dimensions diff --git a/bindings/python_bindings.cpp b/bindings/python_bindings.cpp index 2f328a0..3830be2 100644 --- a/bindings/python_bindings.cpp +++ b/bindings/python_bindings.cpp @@ -171,7 +171,6 @@ PYBIND11_MODULE(_core, m) { .def_readwrite("comp_init_random", &Solver::Options::comp_init_random) .def_readwrite("comp_init_seed", &Solver::Options::comp_init_seed) .def_readwrite("verbosity", &Solver::Options::verbosity) - .def_readwrite("print_every", &Solver::Options::print_every) .def("__repr__", [](const Solver::Options& o) { return ""; @@ -298,7 +297,7 @@ PYBIND11_MODULE(_core, m) { py::return_value_policy::reference_internal) // Main solve .def("solve", [](Solver& s) { return s.solve(); }) - .def("convergence", &Solver::convergence, py::arg("options")) + .def("convergence", &Solver::convergence) // Workspace / filter access .def("get_workspace", &Solver::get_workspace, py::return_value_policy::reference_internal) @@ -312,10 +311,11 @@ PYBIND11_MODULE(_core, m) { .def("retract_second_deriv", &Solver::retract_second_deriv, py::arg("s"), py::arg("relax_param")) // KKT updates + .def("update_residuals", &Solver::update_residuals) .def("update_KKT_residual", &Solver::update_KKT_residual, - py::arg("relax_param"), py::arg("inv_penalty_param")) + py::arg("relax_param"), py::arg("penalty_param")) .def("update_KKT_system", &Solver::update_KKT_system, - py::arg("relax_param"), py::arg("inv_penalty_param")) + py::arg("relax_param"), py::arg("penalty_param")) .def("update_KKT_ineq", [](Solver& s, const Vec& s_ineq, double relax_param) { s.update_KKT_ineq(s_ineq, relax_param); }, @@ -325,7 +325,7 @@ PYBIND11_MODULE(_core, m) { }, py::arg("s_comp"), py::arg("m_comp_L"), py::arg("m_comp_R"), py::arg("relax_param")) .def("update_KKT_penalty", &Solver::update_KKT_penalty, - py::arg("inv_penalty_param")) + py::arg("penalty_param")) .def("update_KKT_primal_regularizer", &Solver::update_KKT_primal_regularizer, py::arg("reg")) // Factorization and solve @@ -341,12 +341,12 @@ PYBIND11_MODULE(_core, m) { }, py::arg("b")) // Linesearch .def("filter_linesearch", &Solver::filter_linesearch, - py::arg("relax_param"), py::arg("inv_penalty_param"), py::arg("max_iters")) - .def("entry_from_solution", [](const Solver& s, double relax_param, double inv_penalty_param) { - Filter::Entry e = s.entry_from_solution(relax_param, inv_penalty_param); + py::arg("relax_param"), py::arg("penalty_param"), py::arg("max_iters")) + .def("entry_from_solution", [](const Solver& s, double relax_param, double penalty_param) { + Filter::Entry e = s.entry_from_solution(relax_param, penalty_param); return py::make_tuple(e.feas, e.merit); }, - py::arg("relax_param"), py::arg("inv_penalty_param")) + py::arg("relax_param"), py::arg("penalty_param")) // Dimension info .def_readonly("n_primals", &Solver::n_primals) .def_readonly("n_duals", &Solver::n_duals) diff --git a/include/solver.h b/include/solver.h index dadd2b5..8e684cb 100644 --- a/include/solver.h +++ b/include/solver.h @@ -8,6 +8,9 @@ #include "filter.h" #include #include +#include + +namespace spdlog { class logger; } /** * A brief description of your class. @@ -77,14 +80,12 @@ class Solver { /// Seed for the small random noise used to initialize s_comp /// (negative leaves the RNG unseeded, i.e. non-deterministic across runs) int comp_init_seed{-1}; - /// Verbosity level, maps to spdlog thresholds: + /// Verbosity level for solver logging: /// 0 = silent - /// 1 = errors only (reason for non-convergence) - /// 2 = + warnings (regularization bumps, penalty capped, ...) - /// 3 = + solver header and per-iteration table + /// 1 = final solve summary + /// 2 = + solver setup header + /// 3 = + per-iteration table int verbosity{0}; - /// Print a per-iteration row every N iterations (only used at verbosity >= 3) - int print_every{1}; Options() = default; }; @@ -177,16 +178,25 @@ class Solver { void initialize_kkt_sparsity(); /** - * Compute KKT residual given the current guess stored in the workspace + * Recompute the constraint residuals (residual_eq/ineq/comp_L/comp_R) for the current + * primal iterate z. Must be called wherever z changes before update_KKT_residual / + * convergence read them (initial point, filter linesearch, IFT relaxation predictor). + */ + void update_residuals(); + + /** + * Assemble the KKT residual from the current guess in the workspace. Assumes the + * constraint residuals are already up to date (see update_residuals). + * Takes the penalty parameter directly (inverted internally). */ - void update_KKT_residual(double relax_param, double inv_penalty_param); + void update_KKT_residual(double relax_param, double penalty_param); void update_dKKT_residual_drelax(double relax_param); /** * Update KKT system given the current guess stored in the workspace */ - void update_KKT_system(double relax_param, double inv_penalty_param); + void update_KKT_system(double relax_param, double penalty_param); /** * Update the KKT terms associated with s_ineq (no dependence on m_ineq) @@ -200,9 +210,9 @@ class Solver { const Eigen::Ref& m_comp_R, double relax_param); /** - * Update the KKT penalty diagonal + * Update the KKT penalty diagonal (takes the penalty parameter directly, inverted internally) */ - void update_KKT_penalty(const double inv_penalty_param); + void update_KKT_penalty(const double penalty_param); /** * Update the KKT regularizer @@ -257,25 +267,39 @@ class Solver { return *filter; } - Filter::Entry entry_from_solution(double relax_param, double inv_penalty_param) const; + Filter::Entry entry_from_solution(double relax_param, double penalty_param) const; /** * Perform backtracking filter linesearch given a step direction * * @param relax_param Complementarity and inequality relaxation parameter (kappa) - * @param inv_penalty_param Inverse of the AL penalty parameter + * @param penalty_param AL penalty parameter (inverted internally) * @param max_iters Maximum number of iterations for the linesearch * @warning This function modifies the workspace solution to store the candidate solution, and updates the constraint residuals based on the candidate solution, which are used to evaluate the filter conditions. If the linesearch fails, the workspace solution is restored to its original value before returning. * @return true Linesearch succeeded, new iterate is stored in workspace x_candidate * @return false Linesearch failed */ - bool filter_linesearch(const double relax_param, const double inv_penalty_param, int max_iters); + bool filter_linesearch(const double relax_param, const double penalty_param, int max_iters); /** * Solve the current problem instance. */ SolveResult solve(); + /** + * Run the inner augmented-Lagrangian minimization for the current penalty/relaxation: + * take regularized Newton steps until the KKT residual infinity norm drops below stat_tol. + * Returns the number of inner (Newton) iterations taken. + */ + int minimize_augmented_lagrangian(double stat_tol); + + /** + * Take a single regularized Newton step: update and factorize the KKT system, correcting + * inertia by increasing the primal regularizer as needed, backsolve, and run the filter + * linesearch. Updates last_regularizer for warm-starting the next step. + */ + void newton_step(double relax_param, double penalty_param); + /** * Determine if the solver has converged based on KKT residual norm, constraint satisfaction */ @@ -292,6 +316,22 @@ class Solver { double setup_time_s{0.0}; double solve_time_s{0.0}; + // Shared "marble" console logger; its level is set from Options::verbosity at the + // start of each solve(). Created lazily by log_solver_info(). + std::shared_ptr log; + + // Inertia regularizer carried between inner Newton steps to warm-start the next step's + // factorization (nullopt = no successful value yet this solve). + std::optional last_regularizer; + + // Logging helpers; each is a no-op unless Options::verbosity enables the relevant level. + // Kept out of solve()/minimize_augmented_lagrangian() so the loops stay readable. + void log_solver_info(); // header + per-iteration table header (once per solve) + void log_initial_step(); // initial data row before any solver iteration + void log_newton_step(int iter); // one "I" (inner) table row + void log_outer_step(int iter); // one "O" (outer) table row + void log_solve_summary(bool converged, int iterations_outer, int iterations_inner); // final solve summary + // KKT system regularizers to try in Newton step const std::vector kkt_system_regularizers = { 0, 1e-8, 1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1, 1.0, diff --git a/julia/examples/simple_test.jl b/julia/examples/simple_test.jl index c49bfea..92e2d26 100644 --- a/julia/examples/simple_test.jl +++ b/julia/examples/simple_test.jl @@ -27,7 +27,7 @@ mpcc = MPCC(model, solver = Marble.Solver() Marble.setup!(solver, mpcc; -verbosity = 1, +verbosity = 3, # comp_init_seed = 42 comp_init_random=false, relaxation_scaling=0.1, diff --git a/julia/src/Marble.jl b/julia/src/Marble.jl index 8b47f9c..fb556c6 100644 --- a/julia/src/Marble.jl +++ b/julia/src/Marble.jl @@ -99,7 +99,7 @@ module Marble :max_iters, :max_iters_linesearch, :gamma_objective, :gamma_constraint, :ruiz_iterations, :inertia_warmstart, - :verbosity, :print_every + :verbosity ] function update_settings!(solver::Marble.Solver; kwargs...) diff --git a/src/solver.cpp b/src/solver.cpp index 0e8cd51..3e64589 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -13,10 +14,6 @@ namespace { return Eigen::VectorXi::LinSpaced(n, start, start + n - 1); } - // Per-iteration table column header. - constexpr const char* kColHeader = - " iter type lg(ρ) lg(κ) lg(reg) ||kkt|| ||eq|| ||ineq|| ||comp|| obj"; - // Shared "marble" console logger; its level is set per-solve from Options::verbosity. // The pattern is just the (level-colored) message so the table stays aligned. std::shared_ptr solver_logger() { @@ -29,21 +26,67 @@ namespace { } // verbosity -> spdlog threshold: - // 0 silent | 1 errors (non-convergence) | 2 + warnings | 3 + header & per-iteration + // 0 silent | 1 final summary | 2 + setup header | 3 + per-iteration table spdlog::level::level_enum level_from_verbosity(int verbosity) { switch (verbosity) { case 0: return spdlog::level::off; - case 1: return spdlog::level::err; - case 2: return spdlog::level::warn; + case 1: + case 2: return spdlog::level::info; default: return spdlog::level::debug; } } - // Format the inertia-regularizer column as log10, or "---" (none) / "0" (exactly zero). - std::string fmt_reg(double regularizer) { - if (std::isnan(regularizer)) return "---"; - if (regularizer == 0.0) return "0"; - return fmt::format("{:.0f}", std::log10(regularizer)); + // Format the inertia-regularizer column in scientific notation, or "---" (no value / NaN) / "0" (exactly zero). + std::string fmt_reg(std::optional regularizer) { + if (!regularizer || std::isnan(*regularizer)) return "---"; + if (*regularizer == 0.0) return "0"; + return fmt::format("{:.1e}", *regularizer); + } + + std::string table_header() { + return fmt::format("{:<12} {:>7} {:>7} {:>9} {:>12} {:>12} {:>12} {:>12} {:>12}", + fmt::format("{:>5} {:<5}", "iter", "type"), + "lg(ρ)", "lg(κ)", "reg", + "||kkt||", "||eq||", "||ineq||", "||comp||", "obj"); + } + + std::string table_row(const std::string& label, + double log_penalty, + double log_relaxation, + const std::string& regularizer, + double kkt, + double eq_vio, + double ineq_vio, + double comp_vio, + double obj) { + return fmt::format("{:<12} {:>7.1f} {:>7.1f} {:>9} {:>12.3e} {:>12.3e} {:>12.3e} {:>12.3e} {:>12.3e}", + label, log_penalty, log_relaxation, regularizer, + kkt, eq_vio, ineq_vio, comp_vio, obj); + } + + std::string outer_label(int iter) { + return fmt::format("{:>5} {:<5}", iter, "O"); + } + + std::string inner_label(int iter) { + return fmt::format("{:>5} {:<5}", iter, "I"); + } + + // Convergence / reporting metrics for the current workspace iterate: + // (||kkt||_inf, ||eq||_inf, ||ineq^-||_inf, ||comp||_inf, objective). + // Empty constraint sets report 0 for that violation. + std::tuple + compute_metrics(const Workspace& ws, const Problem& prob) { + double kkt = ws.kkt_residual.lpNorm(); + double eq_vio = prob.n_eq > 0 ? ws.residual_eq.lpNorm() : 0.0; + double ineq_vio = prob.n_ineq > 0 ? ws.residual_ineq.cwiseMin(0).lpNorm() : 0.0; + double comp_vio = prob.n_comp > 0 + ? ws.residual_comp_L.cwiseProduct(ws.residual_comp_R).lpNorm() + : 0.0; + double obj = 0.5 * ws.z.dot(prob.cost_hessian * ws.z) + + prob.cost_gradient.dot(ws.z) + + prob.cost_const; + return {kkt, eq_vio, ineq_vio, comp_vio, obj}; } } @@ -253,15 +296,19 @@ void Solver::initialize_kkt_sparsity() { } } -void Solver::update_KKT_residual(double relax_param, double inv_penalty_param) { - // Compute the constraint residuals - - // TODO: we don't need to recompute these; they will have been already computed in the linesearch beforehand - // just need to compute these in the very beginning before we've run the first linesearch +void Solver::update_residuals() { + // Constraint residuals at the current primal iterate z. Kept separate from + // update_KKT_residual so they can be refreshed exactly where z changes (initial + // point, filter linesearch, IFT relaxation predictor) workspace->residual_eq = prob->J_eq * workspace->z + prob->c_eq; workspace->residual_ineq = prob->J_ineq * workspace->z + prob->c_ineq; workspace->residual_comp_L = prob->L_comp * workspace->z + prob->l_comp; workspace->residual_comp_R = prob->R_comp * workspace->z + prob->r_comp; +} + +void Solver::update_KKT_residual(double relax_param, double penalty_param) { + // Assumes the constraint residuals are already up to date for the current z + const double inv_penalty_param = 1.0 / penalty_param; // z stationarity workspace->kkt_residual(z_inds) = prob->cost_hessian * workspace->z + prob->cost_gradient + @@ -336,12 +383,12 @@ void Solver::update_dKKT_residual_drelax(double relax_param) { } } -void Solver::update_KKT_system(double relax_param, double inv_penalty_param) { +void Solver::update_KKT_system(double relax_param, double penalty_param) { // Update KKT system terms that depend on the solution, which are the nonlinear terms associated with the inequality // and complementarity slacks and multipliers, as well as the penalty terms update_KKT_ineq(workspace->s_ineq, relax_param); update_KKT_comp(workspace->s_comp, workspace->m_comp_L, workspace->m_comp_R, relax_param); - update_KKT_penalty(inv_penalty_param); + update_KKT_penalty(penalty_param); } void Solver::update_KKT_ineq(const Eigen::Ref& s_ineq, double relax_param) { @@ -376,7 +423,8 @@ void Solver::update_KKT_comp(const Eigen::Ref& s_comp, const Eigen::R } } -void Solver::update_KKT_penalty(const double inv_penalty_param) { +void Solver::update_KKT_penalty(const double penalty_param) { + const double inv_penalty_param = 1.0 / penalty_param; Eigen::Map nzval(workspace->kkt_system.valuePtr(), workspace->kkt_system.nonZeros()); Eigen::Ref scaling = workspace->scaling; for (int k = 0; k < penalty_inds.size(); k++) { @@ -468,8 +516,8 @@ void Solver::compute_amd_ordering() { } bool Solver::convergence() const { - // // KKT residual norm - // double kkt_norm = workspace->kkt_residual.lpNorm(); + // KKT residual norm + double kkt_norm = workspace->kkt_residual.lpNorm(); // Primal feasibility double eq_violation = workspace->residual_eq.lpNorm(); @@ -477,250 +525,181 @@ bool Solver::convergence() const { double comp_violation = workspace->residual_comp_L.cwiseProduct(workspace->residual_comp_R).lpNorm(); - return eq_violation < options.convergence_eq_violation && + return kkt_norm < options.convergence_kkt_norm && + eq_violation < options.convergence_eq_violation && ineq_violation < options.convergence_ineq_violation && comp_violation < options.convergence_comp_violation; } -SolveResult Solver::solve() { - const auto t0 = std::chrono::steady_clock::now(); - bool converged = false; - n_factorizations = 0; - - workspace->relax_param = options.relaxation_initial; - workspace->penalty_param = options.penalty_initial; - - int last_outer_step_iter = -1; - double outer_step_kkt_norm_adjustment = 1.0; - - workspace->solution.setZero(); - if (options.comp_init_random) { - if (options.comp_init_seed >= 0) std::srand(static_cast(options.comp_init_seed)); - workspace->s_comp = 0.01 * Vec::Random(prob->n_comp); - } - workspace->m_eq_est.setZero(); - workspace->m_ineq_est.setZero(); - workspace->m_comp_L_est.setZero(); - workspace->m_comp_R_est.setZero(); - filter->clear(); - - int n_iter_outer = 0; - int n_iter_inner = 0; - - auto log = solver_logger(); +void Solver::log_solver_info() { + // Bind (and lazily create) the shared logger, then set its level from the verbosity option + log = solver_logger(); log->set_level(level_from_verbosity(options.verbosity)); - const char* last_step_type = "---"; - double last_regularizer = NAN; - - // Solver info header (shown at verbosity >= 3) - log->info(""); - log->info("Marble Solver"); - log->info(" variables : {} total (nz={}, +{} ineq slacks, +{} comp slacks; {} duals)", - n_vars, prob->nz, prob->n_ineq, prob->n_comp, n_duals); - log->info(" constraints : {} equality, {} inequality, {} complementarity", - prob->n_eq, prob->n_ineq, prob->n_comp); - log->info(" penalty : init={:.1e} max={:.1e} scale={:.1f}", - options.penalty_initial, options.penalty_max, options.penalty_scaling); - log->info(" relaxation : init={:.1e} min={:.1e} scale={:.2f}", - options.relaxation_initial, options.relaxation_min, options.relaxation_scaling); - log->info(" convergence : kkt<{:.1e} eq<{:.1e} ineq<{:.1e} comp<{:.1e} (max_iters={})", - options.convergence_kkt_norm, options.convergence_eq_violation, - options.convergence_ineq_violation, options.convergence_comp_violation, options.max_iters); - log->info(""); + // Solver info header (shown at verbosity >= 2) + if (options.verbosity >= 2) { + log->info(""); + log->info("Marble Solver"); + log->info(" variables : {} total (nz={}, +{} ineq slacks, +{} comp slacks; {} duals)", + n_vars, prob->nz, prob->n_ineq, prob->n_comp, n_duals); + log->info(" constraints : {} equality, {} inequality, {} complementarity", + prob->n_eq, prob->n_ineq, prob->n_comp); + log->info(" penalty : init={:.1e} max={:.1e} scale={:.1f}", + options.penalty_initial, options.penalty_max, options.penalty_scaling); + log->info(" relaxation : init={:.1e} min={:.1e} scale={:.2f}", + options.relaxation_initial, options.relaxation_min, options.relaxation_scaling); + log->info(" convergence : kkt<{:.1e} eq<{:.1e} ineq<{:.1e} comp<{:.1e} (max_iters={})", + options.convergence_kkt_norm, options.convergence_eq_violation, + options.convergence_ineq_violation, options.convergence_comp_violation, options.max_iters); + log->info(""); + } // Per-iteration table header (shown at verbosity >= 3) - log->debug("{}", kColHeader); - log->debug("{}", std::string(110, '-')); - - auto compute_metrics = [&]() { - double kkt = workspace->kkt_residual.lpNorm(); - double eq_vio = prob->n_eq > 0 ? workspace->residual_eq.lpNorm() : 0.0; - double ineq_vio= prob->n_ineq > 0 ? workspace->residual_ineq.cwiseMin(0).lpNorm() : 0.0; - double comp_vio= prob->n_comp > 0 - ? workspace->residual_comp_L.cwiseProduct(workspace->residual_comp_R) - .lpNorm() - : 0.0; - double obj = 0.5 * workspace->z.dot(prob->cost_hessian * workspace->z) - + prob->cost_gradient.dot(workspace->z) - + prob->cost_const; - return std::make_tuple(kkt, eq_vio, ineq_vio, comp_vio, obj); - }; - - for (int iter = 0; iter < options.max_iters; ++iter) { - // Compute KKT residual and check convergence - double relaxation_param = workspace->relax_param; - double inv_penalty_param = 1.0 / workspace->penalty_param; - - update_KKT_residual(relaxation_param, inv_penalty_param); - - if (log->should_log(spdlog::level::debug) && iter % std::max(1, options.print_every) == 0) { - auto [kkt, eq_vio, ineq_vio, comp_vio, obj] = compute_metrics(); - log->debug("{:5d} {:<5} {:7.1f} {:7.1f} {:>7} {:12.3e} {:12.3e} {:12.3e} {:12.3e} {:12.3e}", - iter, last_step_type, - std::log10(workspace->penalty_param), std::log10(workspace->relax_param), - fmt_reg(last_regularizer), - kkt, eq_vio, ineq_vio, comp_vio, obj); - } + const std::string header = table_header(); + log->debug("{}", header); + log->debug("{}", std::string(header.size(), '-')); +} - if (convergence()) { - converged = true; - break; - } +void Solver::log_initial_step() { + if (!log->should_log(spdlog::level::debug)) return; - // Check if we are performing an inner or outer step based on KKT residual norm - if (workspace->kkt_residual.lpNorm() < outer_step_kkt_norm_adjustment * options.outer_step_kkt_norm) { - // Outer step: update multiplier estimates and increase penalty - n_iter_outer++; - last_step_type = "O"; - last_regularizer = NAN; - - // Check if we need to decrease the outer step KKT norm requirement, which is done only if - // there have been 2 consecutive outer steps without an inner step in between - if (iter > 0 && last_outer_step_iter == iter - 1 && workspace->relax_param <= options.relaxation_min) { - outer_step_kkt_norm_adjustment /= 10.0; - } + auto [kkt, eq_vio, ineq_vio, comp_vio, obj] = compute_metrics(*workspace, *prob); + log->debug("{}", + table_row("", + std::log10(workspace->penalty_param), + std::log10(workspace->relax_param), + fmt_reg(std::nullopt), + kkt, eq_vio, ineq_vio, comp_vio, obj)); +} - if (workspace->penalty_param >= options.penalty_max) { - - // Use the existing factorization to get an estmate of d(solution*)/d(relaxation_param) using IFT - update_dKKT_residual_drelax(workspace->relax_param); - backsolve(-workspace->dkkt_residual_drelax, workspace->dsolution_drelax); - - // Update relaxation parameter - double delta_relax_param = (options.relaxation_scaling - 1) * workspace->relax_param; - double relax_param_new = workspace->relax_param + delta_relax_param; - - workspace->solution += workspace->dsolution_drelax * delta_relax_param; - - // update_KKT_residual(relax_param_new, inv_penalty_param); - - // int predictor_backtracks = 0; - // while (workspace->kkt_residual.lpNorm() > 10.0 && - // ++predictor_backtracks < options.max_iters_linesearch) { - // delta_relax_param *= 0.5; - // relax_param_new = workspace->relax_param + delta_relax_param; - - // workspace->solution -= workspace->dsolution_drelax * delta_relax_param; - // update_KKT_residual(relax_param_new, inv_penalty_param); - // } - - // If we are at the maximum penalty, we just update multiplier estimates without increasing penalty - workspace->m_eq_est = workspace->m_eq; - workspace->m_ineq_est = workspace->m_ineq; - workspace->m_comp_L_est = workspace->m_comp_L; - workspace->m_comp_R_est = workspace->m_comp_R; - - // Scale relaxation parameter - workspace->relax_param = relax_param_new; - } else { - // Increase penalty parameter - workspace->penalty_param = std::min(workspace->penalty_param * options.penalty_scaling, options.penalty_max); - } +void Solver::log_newton_step(int iter) { + if (!log->should_log(spdlog::level::debug)) return; - // Clear the filter - // theta_prev = theta; - filter->clear(); - last_outer_step_iter = iter; - } else { - n_iter_inner++; - last_step_type = "I"; - bool linesearch_succeeded = false; - bool factorization_succeeded = false; - bool inertia_correction_succeeded = false; + auto [kkt, eq_vio, ineq_vio, comp_vio, obj] = compute_metrics(*workspace, *prob); + log->debug("{}", + table_row(inner_label(iter), + std::log10(workspace->penalty_param), + std::log10(workspace->relax_param), + fmt_reg(last_regularizer), + kkt, eq_vio, ineq_vio, comp_vio, obj)); +} - update_KKT_system(relaxation_param, inv_penalty_param); +void Solver::log_outer_step(int iter) { + if (!log->should_log(spdlog::level::debug)) return; - auto bump_reg = [](double r) { - return r == 0.0 ? 1e-8 : 10.0 * r; - }; + auto [kkt, eq_vio, ineq_vio, comp_vio, obj] = compute_metrics(*workspace, *prob); + log->debug("{}", + table_row(outer_label(iter), + std::log10(workspace->penalty_param), + std::log10(workspace->relax_param), + fmt_reg(std::nullopt), // outer rows carry no inertia regularizer + kkt, eq_vio, ineq_vio, comp_vio, obj)); +} - double regularizer_to_try = - (options.inertia_warmstart && !std::isnan(last_regularizer)) ? last_regularizer : 0.0; +void Solver::log_solve_summary(bool converged, int iterations_outer, int iterations_inner) { + if (!log->should_log(spdlog::level::info)) return; - bool any_factorization_succeeded = false; - bool any_inertia_succeeded = false; + const int iterations_total = iterations_outer + iterations_inner; + log->info(""); + log->info("Marble {}", converged ? "converged" : "did not converge"); + log->info(" iterations : {} total ({} outer, {} inner)", + iterations_total, iterations_outer, iterations_inner); + log->info(" factorizations: {}", n_factorizations); + log->info(" timing : setup={:.3e}s solve={:.3e}s total={:.3e}s", + setup_time_s, solve_time_s, setup_time_s + solve_time_s); +} - while (!linesearch_succeeded && regularizer_to_try <= 1e8) { - update_KKT_primal_regularizer(regularizer_to_try); +SolveResult Solver::solve() { + const auto t0 = std::chrono::steady_clock::now(); - if (!numerical_factorization()) { - log->warn("iter {}: numerical factorization failed (reg={:.1e}); increasing regularization", - iter, regularizer_to_try); - regularizer_to_try = bump_reg(regularizer_to_try); - continue; - } + log_solver_info(); - any_factorization_succeeded = true; + // Initialize penalty and relaxation parameters + workspace->relax_param = options.relaxation_initial; + workspace->penalty_param = options.penalty_initial; - if (!check_inertia()) { - log->warn("iter {}: wrong inertia (reg={:.1e}); increasing regularization", - iter, regularizer_to_try); - regularizer_to_try = bump_reg(regularizer_to_try); - continue; - } + // Reset per-solve state: solution, multiplier estimates, filter, regularizer, and counters + n_factorizations = 0; + last_regularizer = std::nullopt; - if (!any_inertia_succeeded) { - last_regularizer = regularizer_to_try <= 1e-8 ? 0.0 : regularizer_to_try / 10.0; - } + // Initialize solution and multiplier estimates + workspace->solution.setZero(); + if (options.comp_init_random) { + if (options.comp_init_seed >= 0) std::srand(static_cast(options.comp_init_seed)); + workspace->s_comp = 1e-3 * Vec::Random(prob->n_comp); + } + workspace->m_eq_est.setZero(); + workspace->m_ineq_est.setZero(); + workspace->m_comp_L_est.setZero(); + workspace->m_comp_R_est.setZero(); - any_inertia_succeeded = true; + update_residuals(); + update_KKT_residual(workspace->relax_param, workspace->penalty_param); - backsolve(-workspace->kkt_residual, workspace->newton_step); + // Clear the filter initially + filter->clear(); - linesearch_succeeded = filter_linesearch( - relaxation_param, - inv_penalty_param, - options.max_iters_linesearch - ); + // Initialize flags and counters + bool converged = false; + int n_iter_outer = 0; + int n_iter_inner = 0; - if (linesearch_succeeded) { - // last_regularizer = regularizer_to_try == 0.0 ? 0.0 : regularizer_to_try / 10.0; - break; - } + // Log the initial residuals (before any steps are taken) + log_initial_step(); - log->warn("iter {}: linesearch failed (reg={:.1e}); increasing regularization", - iter, regularizer_to_try); - regularizer_to_try = bump_reg(regularizer_to_try); - } + for (; n_iter_outer < options.max_iters; ++n_iter_outer) { + // Refresh the KKT residual for the current iterate, then check for convergence + if ((converged = convergence())) break; - if (!linesearch_succeeded) { - if (!any_factorization_succeeded) { - log->error("iter {}: numerical factorization failed for all regularization values", iter); - throw std::runtime_error("Numerical factorization failed for all regularization values!"); - } - if (!any_inertia_succeeded) { - log->error("iter {}: inertia could not be corrected for any regularization value", iter); - throw std::runtime_error("Inertia correction failed for all regularization values!"); - } - log->error("iter {}: linesearch failed for all regularization values", iter); - throw std::runtime_error("Linesearch failed for all regularization values!"); - } + // Perform inner AL minimization + double stat_tol = std::max(1e-14, 1e-1 * workspace->relax_param); + n_iter_inner += minimize_augmented_lagrangian(stat_tol); + + if (workspace->penalty_param >= options.penalty_max) { + // Use the existing factorization to get an estmate of d(solution*)/d(relaxation_param) using IFT + update_dKKT_residual_drelax(workspace->relax_param); + backsolve(-workspace->dkkt_residual_drelax, workspace->dsolution_drelax); + + // Update relaxation parameter + double relax_param_new = std::max(options.relaxation_min, workspace->relax_param * options.relaxation_scaling); + double delta_relax_param = relax_param_new - workspace->relax_param; + + workspace->solution += workspace->dsolution_drelax * delta_relax_param; + update_residuals(); + + // update_KKT_residual(relax_param_new, inv_penalty_param); + + // int predictor_backtracks = 0; + // while (workspace->kkt_residual.lpNorm() > 10.0 && + // ++predictor_backtracks < options.max_iters_linesearch) { + // delta_relax_param *= 0.5; + // relax_param_new = workspace->relax_param + delta_relax_param; + + // workspace->solution -= workspace->dsolution_drelax * delta_relax_param; + // update_KKT_residual(relax_param_new, inv_penalty_param); + // } + + // If we are at the maximum penalty, we update multiplier estimates without increasing penalty + workspace->m_eq_est = workspace->m_eq; + workspace->m_ineq_est = workspace->m_ineq; + workspace->m_comp_L_est = workspace->m_comp_L; + workspace->m_comp_R_est = workspace->m_comp_R; + + // Scale relaxation parameter + workspace->relax_param = relax_param_new; + } else { + // Increase penalty parameter + workspace->penalty_param = std::min(workspace->penalty_param * options.penalty_scaling, options.penalty_max); } - } - const bool want_summary = log->should_log(spdlog::level::info); - const bool want_reason = !converged && log->should_log(spdlog::level::err); - if (want_summary || want_reason) { - // Recompute the residual so the final report reflects the returned iterate - update_KKT_residual(workspace->relax_param, 1.0 / workspace->penalty_param); - auto [kkt, eq_vio, ineq_vio, comp_vio, obj] = compute_metrics(); - if (want_summary) { - log->info(""); - log->info("Marble {} | {} iters ({} outer, {} inner), {} factorizations", - converged ? "converged" : "stopped", - n_iter_outer + n_iter_inner, n_iter_outer, n_iter_inner, n_factorizations); - log->info(" final: ||kkt||={:.2e} ||eq||={:.2e} ||ineq||={:.2e} ||comp||={:.2e} obj={:.6e}", - kkt, eq_vio, ineq_vio, comp_vio, obj); - log->info(""); - } - if (want_reason) { - log->error("Marble did not converge: reached max_iters={} (||kkt||={:.2e}, need < {:.1e})", - options.max_iters, kkt, options.convergence_kkt_norm); - } + // Start each inner subproblem with a fresh filter (entries are penalty/relaxation dependent) + // last_regularizer = std::nullopt; + filter->clear(); + log_outer_step(n_iter_outer); } solve_time_s = std::chrono::duration(std::chrono::steady_clock::now() - t0).count(); + log_solve_summary(converged, n_iter_outer, n_iter_inner); return SolveResult{ converged, @@ -740,114 +719,73 @@ SolveResult Solver::solve() { }; } -void Solver::update_residuals() { - workspace->residual_eq = prob->J_eq * workspace->z + prob->c_eq; - workspace->residual_ineq = prob->J_ineq * workspace->z + prob->c_ineq; - workspace->residual_comp_L = prob->L_comp * workspace->z + prob->l_comp; - workspace->residual_comp_R = prob->R_comp * workspace->z + prob->r_comp; -} +int Solver::minimize_augmented_lagrangian(double stat_tol) { + for (int iter = 0; iter < options.max_iters; ++iter) { + // Compute KKT residual and check the inner stationarity tolerance + update_KKT_residual(workspace->relax_param, workspace->penalty_param); -void Solver::update_subproblem_residuals(double relax_param) { - workspace->subproblem_residual_eq = workspace->residual_eq; - workspace->subproblem_residual_ineq = workspace->residual_ineq - retract(workspace->s_ineq, workspace->relax_param); - - const Vec p_comp = retract(workspace->s_comp, workspace->relax_param); - workspace->subproblem_residual_comp_L = workspace->residual_comp_L - p_comp; - workspace->subproblem_residual_comp_R = workspace->residual_comp_R - (p_comp - workspace->s_comp); -} + if (workspace->kkt_residual.lpNorm() < stat_tol) { + return iter; + } -double Solver::subproblem_feas(double relax_param) { - double subproblem_eq_viol = workspace->subproblem_residual_eq.lpNorm(); - double subproblem_ineq_viol = workspace->subproblem_residual_ineq.lpNorm(); - - const Vec p_comp = retract(workspace->s_comp, workspace->relax_param); - double subproblem_comp_L_viol = workspace->subproblem_residual_comp_L.lpNorm(); - double subproblem_comp_R_viol = workspace->subproblem_residual_comp_R.lpNorm(); + newton_step(workspace->relax_param, workspace->penalty_param); + log_newton_step(iter); + } - return std::max({subproblem_eq_viol, subproblem_ineq_viol, subproblem_comp_L_viol, subproblem_comp_R_viol}); + log->error("exceeded maximum iterations during inner AL minimize: {}", options.max_iters); + throw std::runtime_error("Exceeded maximum iterations during inner AL minimize!"); } -void Solver::update_primal_dual_multipliers(double penalty_param) { - double inv_penalty_param = 1.0 / penalty_param; - - workspace->m_eq = workspace->m_eq_est + inv_penalty_param * workspace->subproblem_residual_eq; - workspace->m_ineq = workspace->m_ineq_est + inv_penalty_param * workspace->subproblem_residual_ineq; - workspace->m_comp_L = workspace->m_comp_L_est + inv_penalty_param * workspace->subproblem_residual_comp_L; - workspace->m_comp_R = workspace->m_comp_R_est + inv_penalty_param * workspace->subproblem_residual_comp_R; -} +void Solver::newton_step(double relax_param, double penalty_param) { + bool factorization_succeeded = false; + bool inertia_correction_succeeded = false; + bool linesearch_succeeded = false; -SolveResult Solver::solve() { - print_solver_info(); + update_KKT_system(relax_param, penalty_param); - // Initialize penalty and relaxation parameters - workspace->relax_param = options.relaxation_initial; - workspace->penalty_param = options.penalty_initial; + // Warm-start the regularizer one decade below the last successful value so we keep + // probing for a smaller regularizer each step (0 if that would drop to <= 1e-8). + double regularizer_to_try = (options.inertia_warmstart && last_regularizer) + ? (*last_regularizer <= 1e-8 ? 0.0 : *last_regularizer / 10.0) + : 0.0; + double inertia_regularizer = std::numeric_limits::infinity(); - // Initialize flags and counters - bool converged = false; + auto increase_regularizer = [](double& r) { r = (r == 0.0 ? 1e-8 : 10.0 * r); return true ; }; - update_residuals(); - update_subproblem_residuals(workspace->relax_param); + while (!linesearch_succeeded && regularizer_to_try <= 1e8) { + update_KKT_primal_regularizer(regularizer_to_try); - double c_prev = subproblem_feas(workspace->relax_param); + if (!numerical_factorization() && increase_regularizer(regularizer_to_try)) continue; + factorization_succeeded = true; - // LANCELOT parameters - double omega = 1.0 / workspace->penalty_param; - double eta = 1.0 / std::pow(workspace->penalty_param, 0.1); + if (!check_inertia() && increase_regularizer(regularizer_to_try)) continue; + inertia_correction_succeeded = true; - for (int iter = 0; iter < options.max_iters; ++iter) { - // Check for convergence, return if solved - if ((converged = convergence())) break; - if (workspace->penalty_param > options.penalty_max && workspace->relax_param < options.relaxation_min) { - // log->warn("Reached maximum penalty and minimum relaxation parameters without convergence."); - break; - } + inertia_regularizer = std::min(regularizer_to_try, inertia_regularizer); - double eps_k = std::max({1e-12, 1e-1 * workspace->relax_param}); + backsolve(-workspace->kkt_residual, workspace->newton_step); - // Perform inner AL minimization - minimize_augmented_lagrangian(omega, c_prev); - + if (!filter_linesearch(relax_param, penalty_param, options.max_iters_linesearch) && increase_regularizer(regularizer_to_try)) continue; + linesearch_succeeded = true; } - return SolveResult{ - converged, - n_iter_outer + n_iter_inner, - n_iter_outer, - n_iter_inner, - n_factorizations, - setup_time_s, - solve_time_s, - Vec(workspace->z), - Vec(workspace->s_ineq), - Vec(workspace->s_comp), - Vec(workspace->m_eq), - Vec(workspace->m_ineq), - Vec(workspace->m_comp_L), - Vec(workspace->m_comp_R), - }; -} - -void Solver::minimize_augmented_lagrangian(double omega, double subproblem_feas_prev) { - // Compute the KKT residual and check convergence - for (int iter = 0; iter < options.max_iters; ++iter) { - update_KKT_residual(workspace->relax_param, 1.0/workspace->penalty_param); - double kkt_norm = workspace->kkt_residual.lpNorm(); - - // Inner problem has been solved to sufficient tolerance? - if (kkt_norm <= std::max({omega, 0.1 * subproblem_feas_prev})) { - break; - } - - // Do Newton step + if (!factorization_succeeded) { + log->error("newton step: numerical factorization failed for all regularization values"); + throw std::runtime_error("Numerical factorization failed for all regularization values!"); + } else if (!inertia_correction_succeeded) { + log->error("newton step: inertia could not be corrected for any regularization value"); + throw std::runtime_error("Inertia correction failed for all regularization values!"); + } else if (!linesearch_succeeded) { + log->error("newton step: linesearch failed for all regularization values"); + throw std::runtime_error("Linesearch failed for all regularization values!"); } -} -void Solver::newton_step(double relax_param, double penalty_param) { - + last_regularizer = inertia_regularizer <= 1e-8 ? 0.0 : inertia_regularizer; } -Filter::Entry Solver::entry_from_solution(double relax_param, double inv_penalty_param) const { +Filter::Entry Solver::entry_from_solution(double relax_param, double penalty_param) const { + const double inv_penalty_param = 1.0 / penalty_param; + Vec m_eq_primal_feas = workspace->residual_eq - inv_penalty_param * (workspace->m_eq - workspace->m_eq_est); Vec p_ineq = retract(workspace->s_ineq, relax_param); @@ -883,9 +821,11 @@ Filter::Entry Solver::entry_from_solution(double relax_param, double inv_penalty }; } -bool Solver::filter_linesearch(double relax_param, double inv_penalty_param, int max_iters) { +bool Solver::filter_linesearch(double relax_param, double penalty_param, int max_iters) { double step_size = 1.0; + workspace->solution += step_size * workspace->newton_step; // Candidate solution for full step + update_residuals(); // TODO: this can be done much more efficiently due to the linearity // we should compute a delta for each constraint and the cost from the newton_step @@ -893,13 +833,7 @@ bool Solver::filter_linesearch(double relax_param, double inv_penalty_param, int // We should also re-use the terms in the bottom half of the KKT residual for (int i = 0; i < max_iters; ++i) { - // Update constraint residuals from candidate solution - workspace->residual_eq = prob->J_eq * workspace->z + prob->c_eq; - workspace->residual_ineq = prob->J_ineq * workspace->z + prob->c_ineq; - workspace->residual_comp_L = prob->L_comp * workspace->z + prob->l_comp; - workspace->residual_comp_R = prob->R_comp * workspace->z + prob->r_comp; - - const Filter::Entry candidate = entry_from_solution(relax_param, inv_penalty_param); + const Filter::Entry candidate = entry_from_solution(relax_param, penalty_param); if (filter->acceptable(candidate)) { filter->update(candidate); @@ -908,11 +842,14 @@ bool Solver::filter_linesearch(double relax_param, double inv_penalty_param, int // If not acceptable, shrink step size and try again step_size *= 0.5; + workspace->solution -= step_size * workspace->newton_step; + update_residuals(); } // Restore original solution before returning failure workspace->solution -= step_size * workspace->newton_step; + update_residuals(); return false; } From 8ba58538616c6b6a95448bcbebb36c2bfe8711c7 Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Fri, 17 Jul 2026 21:22:18 -0400 Subject: [PATCH 12/35] Fix spdlog install bug --- CMakeLists.txt | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 108671b..82f7007 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,17 +30,16 @@ include(FetchContent) find_package(Eigen3 3.3 REQUIRED NO_MODULE) -# spdlog – prefer a system install, otherwise fetch it. -find_package(spdlog CONFIG QUIET) -if(NOT spdlog_FOUND) - FetchContent_Declare( - spdlog - GIT_REPOSITORY https://github.com/gabime/spdlog.git - GIT_TAG v1.14.1 - EXCLUDE_FROM_ALL - ) - FetchContent_MakeAvailable(spdlog) -endif() +# Fetch a specific version of spdlog to avoid fmt/spdlog compatibility issues +FetchContent_Declare( + spdlog + GIT_REPOSITORY https://github.com/gabime/spdlog.git + GIT_TAG v1.12.0 # Or whatever version you prefer +) +# Make sure spdlog builds its bundled fmt instead of looking for the system one +set(SPDLOG_FMT_EXTERNAL OFF CACHE BOOL "Use bundled fmt" FORCE) +FetchContent_MakeAvailable(spdlog) +add_definitions(-DSPDLOG_COMPILED_LIB) # QDLDL – prefer a system install, otherwise fetch as static-only. # EXCLUDE_FROM_ALL suppresses QDLDL's cmake --install rules so they don't From 7964cba7fba0ba93f0879270233550fe86f7742d Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Fri, 17 Jul 2026 21:23:10 -0400 Subject: [PATCH 13/35] Init retraction map options, exp --- bindings/julia_bindings.cpp | 11 +++++- include/solver.h | 1 + julia/src/Marble.jl | 40 ++----------------- julia/test/Project.toml | 5 +++ julia/test/runtests.jl | 35 +++++++++++++---- src/solver.cpp | 78 ++++++++++++++++++++++++++++++------- 6 files changed, 110 insertions(+), 60 deletions(-) create mode 100644 julia/test/Project.toml diff --git a/bindings/julia_bindings.cpp b/bindings/julia_bindings.cpp index daff6fb..6b9cece 100644 --- a/bindings/julia_bindings.cpp +++ b/bindings/julia_bindings.cpp @@ -166,7 +166,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { OPTION_RW(inertia_warmstart, bool) OPTION_RW(comp_init_random, bool) OPTION_RW(comp_init_seed, int) - OPTION_RW(verbosity, int); + OPTION_RW(verbosity, int) + OPTION_RW(retraction_type, int); #undef OPTION_RW @@ -303,6 +304,14 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { Vec r = s.retract_second_deriv(to_eigen(v), relax_param); return std::vector(r.data(), r.data() + r.size()); }) + .method("retract_drelax", [](Solver& s, jlcxx::ArrayRef v, double relax_param) { + Vec r = s.retract_drelax(to_eigen(v), relax_param); + return std::vector(r.data(), r.data() + r.size()); + }) + .method("retract_deriv_drelax", [](Solver& s, jlcxx::ArrayRef v, double relax_param) { + Vec r = s.retract_deriv_drelax(to_eigen(v), relax_param); + return std::vector(r.data(), r.data() + r.size()); + }) // KKT updates .method("update_residuals!", &Solver::update_residuals) .method("update_KKT_residual!", &Solver::update_KKT_residual) diff --git a/include/solver.h b/include/solver.h index 8e684cb..321142e 100644 --- a/include/solver.h +++ b/include/solver.h @@ -86,6 +86,7 @@ class Solver { /// 2 = + solver setup header /// 3 = + per-iteration table int verbosity{0}; + int retraction_type{0}; // 0 = scaled softplus, 1 = exp Options() = default; }; diff --git a/julia/src/Marble.jl b/julia/src/Marble.jl index fb556c6..f545ea0 100644 --- a/julia/src/Marble.jl +++ b/julia/src/Marble.jl @@ -36,42 +36,10 @@ module Marble return nothing end - # Check that every block has consistent dimensions, throwing DimensionMismatch - # on any mismatch. The compiled core's Problem constructor performs the same - # check, but CxxWrap does not translate C++ exceptions into Julia exceptions - # (they call std::terminate and abort the process), so we must validate here :( - function _validate_problem_dims(Q, q, J_eq, b_eq, J_ineq, b_ineq, L, l, R, r) - n = length(q) - size(Q) == (n, n) || throw(DimensionMismatch( - "Q must have size ($n, $n) to match length(q)=$n, got $(size(Q))")) - - for (Jname, J, cname, c) in (("J_eq", J_eq, "b_eq", b_eq), - ("J_ineq", J_ineq, "b_ineq", b_ineq)) - size(J, 1) == length(c) || throw(DimensionMismatch( - "$Jname has $(size(J, 1)) rows but $cname has length $(length(c)); they must match")) - (size(J, 1) == 0 || size(J, 2) == n) || throw(DimensionMismatch( - "$Jname has $(size(J, 2)) columns but expected $n (= length(q))")) - end - - nL, nR, nl, nr = size(L, 1), size(R, 1), length(l), length(r) - (nL == nR == nl == nr) || throw(DimensionMismatch( - "complementarity blocks L, l, R, r must share the same number of rows; " * - "got L rows=$nL, l length=$nl, R rows=$nR, r length=$nr " * - "(every complementarity pair needs a row in each of L, l, R and r)")) - if nL > 0 - size(L, 2) == n || throw(DimensionMismatch( - "L has $(size(L, 2)) columns but expected $n (= length(q))")) - size(R, 2) == n || throw(DimensionMismatch( - "R has $(size(R, 2)) columns but expected $n (= length(q))")) - end - return nothing - end - - # Build a Marble.Problem (dense or sparse, based on storage). When any block is - # sparse every block is converted to a SparseMatrixCSC so the solver sees - # consistent compressed-sparse data + # Extra constructor for a Marble.Problem that handles type conversion, either to sparse + # matrices based by their data or to dense FLoat64 matrices depending on the input. In + # the sparse case every block is converted to a SparseMatrixCSC function Problem(Q, q, c0, J_eq, b_eq, J_ineq, b_ineq, L, l, R, r) - _validate_problem_dims(Q, q, J_eq, b_eq, J_ineq, b_ineq, L, l, R, r) blocks = (Q, J_eq, J_ineq, L, R) fvec(v) = collect(Float64, v) if any(b -> b isa AbstractSparseMatrix, blocks) @@ -99,7 +67,7 @@ module Marble :max_iters, :max_iters_linesearch, :gamma_objective, :gamma_constraint, :ruiz_iterations, :inertia_warmstart, - :verbosity + :verbosity, :retraction_type ] function update_settings!(solver::Marble.Solver; kwargs...) diff --git a/julia/test/Project.toml b/julia/test/Project.toml new file mode 100644 index 0000000..7fb61a4 --- /dev/null +++ b/julia/test/Project.toml @@ -0,0 +1,5 @@ +[deps] +ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index e7731b6..eefc95d 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -4,11 +4,11 @@ # problem written directly as matrices (from julia/examples/simple_test.jl) and # the same 16 test cases in the same order — nine solve tests followed by seven # dimension validation cases. - using Test using LinearAlgebra using SparseArrays using Marble +import ForwardDiff as FD # Example problem (julia/examples/simple_test.jl), written directly as matrices: # min x'x @@ -34,7 +34,26 @@ function setup_and_solve(; sparse_problem = false, opts...) return solver, Marble.solve!(solver) end +retract(::Val{:Softplus}, x, κ) = 0.5*(x + sqrt.(x.^2 .+ 4*κ)) +retract(::Val{:Exp}, x, κ) = sqrt(κ)*exp.(x) + @testset "Marble" begin + @testset "retraction maps" begin + solver, _ = setup_and_solve() + x = [0; 0.5; -0.5; -10; 10; randn(4)] + κ = 1e-1 + + tol = 1e-12 + for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp)]) + Marble.update_settings!(solver, retraction_type = i-1) + @assert isapprox(Marble.retract(solver, x, κ), retract(retract_type, x, κ), atol = tol) + @assert isapprox(Marble.retract_deriv(solver, x, κ), diag(FD.jacobian(_x -> retract(retract_type, _x, κ), x)), atol=tol) + @assert isapprox(Marble.retract_second_deriv(solver, x, κ), + diag(FD.jacobian(_x -> diag(FD.jacobian(_x -> retract(retract_type, _x, κ), _x)), x)), atol=tol) + @assert isapprox(Marble.retract_drelax(solver, x, κ), FD.derivative(_κ -> retract(retract_type, x, _κ), κ), atol=tol) + @assert isapprox(Marble.retract_deriv_drelax(solver, x, κ), FD.derivative(_κ -> diag(FD.jacobian(_x -> retract(retract_type, _x, _κ), x)), κ), atol=tol) + end + end @testset "problem dimensions" begin solver, _ = setup_and_solve() @@ -106,23 +125,23 @@ end # mirror the seven cases in the Python suite (TestDimensionValidation) Q2 = Matrix(1.0I, 2, 2) # L given (1 row) but l omitted - @test_throws DimensionMismatch Marble.setup!(Marble.Solver(), Q2, zeros(2); + @test_throws ErrorException Marble.setup!(Marble.Solver(), Q2, zeros(2); L = zeros(1, 2), R = zeros(1, 2), r = zeros(1)) # L and l given but R, r omitted - @test_throws DimensionMismatch Marble.setup!(Marble.Solver(), Q2, zeros(2); + @test_throws ErrorException Marble.setup!(Marble.Solver(), Q2, zeros(2); L = zeros(1, 2), l = zeros(1)) # Non-square Q. - @test_throws DimensionMismatch Marble.setup!(Marble.Solver(), zeros(2, 3), zeros(2)) + @test_throws ErrorException Marble.setup!(Marble.Solver(), zeros(2, 3), zeros(2)) # Q size disagrees with length(q) - @test_throws DimensionMismatch Marble.setup!(Marble.Solver(), Matrix(1.0I, 3, 3), zeros(2)) + @test_throws ErrorException Marble.setup!(Marble.Solver(), Matrix(1.0I, 3, 3), zeros(2)) # J_eq rows disagree with b_eq length - @test_throws DimensionMismatch Marble.setup!(Marble.Solver(), Q2, zeros(2); + @test_throws ErrorException Marble.setup!(Marble.Solver(), Q2, zeros(2); J_eq = zeros(2, 2), b_eq = zeros(1)) # J_ineq columns disagree with length(q) - @test_throws DimensionMismatch Marble.setup!(Marble.Solver(), Q2, zeros(2); + @test_throws ErrorException Marble.setup!(Marble.Solver(), Q2, zeros(2); J_ineq = zeros(1, 3), b_ineq = zeros(1)) # Sparse blocks: L given but l omitted - @test_throws DimensionMismatch Marble.setup!(Marble.Solver(), sparse(Q2), zeros(2); + @test_throws ErrorException Marble.setup!(Marble.Solver(), sparse(Q2), zeros(2); L = sparse(zeros(1, 2)), R = sparse(zeros(1, 2)), r = zeros(1)) end end diff --git a/src/solver.cpp b/src/solver.cpp index 3e64589..2744e74 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -93,36 +93,81 @@ namespace { Vec Solver::retract(const Eigen::Ref& s, double relax_param) const { // Vectorized retraction map for both inequality and complementarity slacks // p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa)), kappa = relax_param - const double four_kappa = 4.0 * relax_param; - return (0.5 * (s.array() + (s.array().square() + four_kappa).sqrt())).matrix(); + if (options.retraction_type == 0) { + const double four_kappa = 4.0 * relax_param; + return (0.5 * (s.array() + (s.array().square() + four_kappa).sqrt())).matrix(); + } + else if (options.retraction_type == 1) { + const double sqrt_kappa = std::sqrt(relax_param); + return sqrt_kappa * s.array().exp(); + } + else { + throw std::runtime_error("Invalid retraction type"); + } } Vec Solver::retract_deriv(const Eigen::Ref& s, double relax_param) const { // Derivative of the vectorized retraction map above // p'(s) = 0.5 * (1 + s / sqrt(s^2 + 4*kappa)) - const double four_kappa = 4.0 * relax_param; - return (0.5 * (1.0 + s.array() / (s.array().square() + four_kappa).sqrt())).matrix(); + if (options.retraction_type == 0) { + const double four_kappa = 4.0 * relax_param; + return (0.5 * (1.0 + s.array() / (s.array().square() + four_kappa).sqrt())).matrix(); + } + else if (options.retraction_type == 1) { + const double sqrt_kappa = std::sqrt(relax_param); + return sqrt_kappa * s.array().exp(); + } + else { + throw std::runtime_error("Invalid retraction type"); + } } Vec Solver::retract_second_deriv(const Eigen::Ref& s, double relax_param) const { // Second derivative of the vectorized retraction map above // p''(s) = 2*kappa / (s^2 + 4*kappa)^(3/2) - const double kappa = relax_param; - return (2.0 * kappa * (s.array().square() + 4.0 * kappa).pow(-1.5)).matrix(); + if (options.retraction_type == 0) { + const double kappa = relax_param; + return (2.0 * kappa * (s.array().square() + 4.0 * kappa).pow(-1.5)).matrix(); + } + else if (options.retraction_type == 1) { + const double sqrt_kappa = std::sqrt(relax_param); + return sqrt_kappa * s.array().exp(); + } + else { + throw std::runtime_error("Invalid retraction type"); + } } Vec Solver::retract_drelax(const Eigen::Ref& s, double relax_param) const { // Derivative of the retraction map wrt the relaxation parameter kappa = relax_param // dp/dkappa = 1 / sqrt(s^2 + 4*kappa) - const double four_kappa = 4.0 * relax_param; - return (s.array().square() + four_kappa).rsqrt().matrix(); + if (options.retraction_type == 0) { + const double four_kappa = 4.0 * relax_param; + return (s.array().square() + four_kappa).rsqrt().matrix(); + } + else if (options.retraction_type == 1) { + const double sqrt_kappa = std::sqrt(relax_param); + return 0.5 / sqrt_kappa * s.array().exp(); + } + else { + throw std::runtime_error("Invalid retraction type"); + } } Vec Solver::retract_deriv_drelax(const Eigen::Ref& s, double relax_param) const { // Mixed derivative of the retraction map wrt s and kappa = relax_param // d/dkappa p'(s) = -s / (s^2 + 4*kappa)^(3/2) - const double four_kappa = 4.0 * relax_param; - return (-s.array() * (s.array().square() + four_kappa).pow(-1.5)).matrix(); + if (options.retraction_type == 0) { + const double four_kappa = 4.0 * relax_param; + return (-s.array() * (s.array().square() + four_kappa).pow(-1.5)).matrix(); + } + else if (options.retraction_type == 1) { + const double sqrt_kappa = std::sqrt(relax_param); + return 0.5 / sqrt_kappa * s.array().exp(); + } + else { + throw std::runtime_error("Invalid retraction type"); + } } void Solver::set_problem(Problem problem, Solver::Options& options) { @@ -317,28 +362,29 @@ void Solver::update_KKT_residual(double relax_param, double penalty_param) { prob->L_comp.transpose() * workspace->m_comp_L + prob->R_comp.transpose() * workspace->m_comp_R; - // Inequality slack stationarity + // Inequality slack stationarity (p'(s_ineq) * (-m_ineq - p(-s_ineq))) Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); Vec d_p_ineq = retract_deriv(workspace->s_ineq, relax_param); workspace->kkt_residual(s_ineq_inds) = d_p_ineq.cwiseProduct(-workspace->m_ineq - p_neg_ineq); - // Complementarity slack stationarity + // Complementarity slack stationarity (-p'(s_comp)*m_comp_L + p'(-s_comp)*m_comp_R) Vec d_p_comp = retract_deriv(workspace->s_comp, relax_param); for (int i = 0; i < prob->n_comp; i++) { workspace->kkt_residual(s_comp_inds[i]) = -d_p_comp[i] * workspace->m_comp_L[i] + (1 - d_p_comp[i]) * workspace->m_comp_R[i]; } - // Equality primal feasibility + // Equality primal feasibility (r_eq - inv_penalty_param * (m_eq - m_eq_est)) workspace->kkt_residual(m_eq_inds) = workspace->residual_eq - inv_penalty_param * (workspace->m_eq - workspace->m_eq_est); - // Inequality primal feasibility + // Inequality primal feasibility (r_ineq - (p(s_ineq) - inv_penalty_param * (m_ineq - m_ineq_est)) workspace->kkt_residual(m_ineq_inds) = workspace->residual_ineq - (workspace->s_ineq + p_neg_ineq) - // p(s) - p(-s) = s inv_penalty_param * (workspace->m_ineq - workspace->m_ineq_est); - // Complementarity primal feasibility + // Complementarity primal feasibility (r_comp_L - p(s_comp) - inv_penalty_param * (m_comp_L - m_comp_L_est) + // (r_comp_R - p(-s_comp) - inv_penalty_param * (m_comp_R - m_comp_R_est)) Vec p_comp = retract(workspace->s_comp, relax_param); workspace->kkt_residual(m_comp_L_inds) = workspace->residual_comp_L - p_comp - inv_penalty_param * (workspace->m_comp_L - workspace->m_comp_L_est); @@ -396,6 +442,8 @@ void Solver::update_KKT_ineq(const Eigen::Ref& s_ineq, double relax_p Eigen::Ref scaling = workspace->scaling; Vec d_p = retract_deriv(s_ineq, relax_param); + // Ineq stationarity wrt s_ineq is -d_p*d_neg_p + // wrt m_ineq is -d_p // Use identity that retract_deriv(-s_ineq, relax_param) = 1 - d_p workspace->s_ineq_stationarity = -d_p.cwiseProduct(d_p) + d_p; // -d_p*d_neg_p (stored for diag updating) for (int i = 0; i < prob->n_ineq; i++) { From 0bef11d1a215b086127cceeb2c752c982f0d7535 Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Fri, 17 Jul 2026 21:36:10 -0400 Subject: [PATCH 14/35] Add scaled exp --- julia/test/runtests.jl | 13 +++++++------ src/solver.cpp | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index eefc95d..63adf4c 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -36,6 +36,7 @@ end retract(::Val{:Softplus}, x, κ) = 0.5*(x + sqrt.(x.^2 .+ 4*κ)) retract(::Val{:Exp}, x, κ) = sqrt(κ)*exp.(x) +retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) @testset "Marble" begin @testset "retraction maps" begin @@ -44,14 +45,14 @@ retract(::Val{:Exp}, x, κ) = sqrt(κ)*exp.(x) κ = 1e-1 tol = 1e-12 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp)]) + for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) Marble.update_settings!(solver, retraction_type = i-1) - @assert isapprox(Marble.retract(solver, x, κ), retract(retract_type, x, κ), atol = tol) - @assert isapprox(Marble.retract_deriv(solver, x, κ), diag(FD.jacobian(_x -> retract(retract_type, _x, κ), x)), atol=tol) - @assert isapprox(Marble.retract_second_deriv(solver, x, κ), + @test isapprox(Marble.retract(solver, x, κ), retract(retract_type, x, κ), atol = tol) + @test isapprox(Marble.retract_deriv(solver, x, κ), diag(FD.jacobian(_x -> retract(retract_type, _x, κ), x)), atol=tol) + @test isapprox(Marble.retract_second_deriv(solver, x, κ), diag(FD.jacobian(_x -> diag(FD.jacobian(_x -> retract(retract_type, _x, κ), _x)), x)), atol=tol) - @assert isapprox(Marble.retract_drelax(solver, x, κ), FD.derivative(_κ -> retract(retract_type, x, _κ), κ), atol=tol) - @assert isapprox(Marble.retract_deriv_drelax(solver, x, κ), FD.derivative(_κ -> diag(FD.jacobian(_x -> retract(retract_type, _x, _κ), x)), κ), atol=tol) + @test isapprox(Marble.retract_drelax(solver, x, κ), FD.derivative(_κ -> retract(retract_type, x, _κ), κ), atol=tol) + @test isapprox(Marble.retract_deriv_drelax(solver, x, κ), FD.derivative(_κ -> diag(FD.jacobian(_x -> retract(retract_type, _x, _κ), x)), κ), atol=tol) end end diff --git a/src/solver.cpp b/src/solver.cpp index 2744e74..64de757 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -101,6 +101,10 @@ Vec Solver::retract(const Eigen::Ref& s, double relax_param) const { const double sqrt_kappa = std::sqrt(relax_param); return sqrt_kappa * s.array().exp(); } + else if (options.retraction_type == 2) { + const double sqrt_kappa = std::sqrt(relax_param); + return sqrt_kappa * (s.array() / sqrt_kappa).exp(); + } else { throw std::runtime_error("Invalid retraction type"); } @@ -117,6 +121,10 @@ Vec Solver::retract_deriv(const Eigen::Ref& s, double relax_param) co const double sqrt_kappa = std::sqrt(relax_param); return sqrt_kappa * s.array().exp(); } + else if (options.retraction_type == 2) { + const double sqrt_kappa = std::sqrt(relax_param); + return (s.array() / sqrt_kappa).exp(); + } else { throw std::runtime_error("Invalid retraction type"); } @@ -133,6 +141,10 @@ Vec Solver::retract_second_deriv(const Eigen::Ref& s, double relax_pa const double sqrt_kappa = std::sqrt(relax_param); return sqrt_kappa * s.array().exp(); } + else if (options.retraction_type == 2) { + const double sqrt_kappa = std::sqrt(relax_param); + return (s.array() / sqrt_kappa).exp() / sqrt_kappa; + } else { throw std::runtime_error("Invalid retraction type"); } @@ -149,6 +161,10 @@ Vec Solver::retract_drelax(const Eigen::Ref& s, double relax_param) c const double sqrt_kappa = std::sqrt(relax_param); return 0.5 / sqrt_kappa * s.array().exp(); } + else if (options.retraction_type == 2) { + const double sqrt_kappa = std::sqrt(relax_param); + return (0.5 / sqrt_kappa) * (1.0 - s.array() / sqrt_kappa) * (s.array() / sqrt_kappa).exp(); + } else { throw std::runtime_error("Invalid retraction type"); } @@ -165,6 +181,10 @@ Vec Solver::retract_deriv_drelax(const Eigen::Ref& s, double relax_pa const double sqrt_kappa = std::sqrt(relax_param); return 0.5 / sqrt_kappa * s.array().exp(); } + else if (options.retraction_type == 2) { + const double sqrt_kappa = std::sqrt(relax_param); + return (-0.5 / (relax_param * sqrt_kappa)) * s.array() * (s.array() / sqrt_kappa).exp(); + } else { throw std::runtime_error("Invalid retraction type"); } From ac31d5ba450dcc53fa291dc007a8a9413421178c Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Mon, 20 Jul 2026 13:03:16 -0400 Subject: [PATCH 15/35] Add member accessors for testing and debugging --- bindings/julia_bindings.cpp | 45 ++++++++++++++++++++----- julia/examples/Project.toml | 1 + julia/src/Marble.jl | 66 +++++++++++++++++++++++++++++++++++-- 3 files changed, 102 insertions(+), 10 deletions(-) diff --git a/bindings/julia_bindings.cpp b/bindings/julia_bindings.cpp index 6b9cece..1359c56 100644 --- a/bindings/julia_bindings.cpp +++ b/bindings/julia_bindings.cpp @@ -132,14 +132,43 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { .method("obj", [](const Problem& p, jlcxx::ArrayRef z) { return p.obj(to_eigen(z)); }) .method("residual_eq", [](const Problem& p, jlcxx::ArrayRef z) { return make_julia_owned(p.residual_eq(to_eigen(z))); }) .method("residual_ineq", [](const Problem& p, jlcxx::ArrayRef z) { return make_julia_owned(p.residual_ineq(to_eigen(z))); }) - .method("residual_comp", [](const Problem& p, jlcxx::ArrayRef z) { return make_julia_owned(p.residual_comp(to_eigen(z))); }); - // .method("cost_hessian", [](Problem& p) { - // // Assumes cost_hessian is compressed - // auto colptr = jlcxx::make_julia_array(p.cost_hessian().outerIndexPtr(), p.cost_hessian().outerSize() + 1); - // auto rowval = jlcxx::make_julia_array(p.cost_hessian().innerIndexPtr(), p.cost_hessian().nonZeros()); - // auto nzval = jlcxx::make_julia_array(p.cost_hessian().valuePtr(), p.cost_hessian().nonZeros()); - // return std::make_tuple((int)p.cost_hessian().rows(), (int)p.cost_hessian().cols(), colptr, rowval, nzval); - // }); + .method("residual_comp", [](const Problem& p, jlcxx::ArrayRef z) { return make_julia_owned(p.residual_comp(to_eigen(z))); }) + .method("cost_hessian", [](Problem& p) { + // Assumes cost_hessian is compressed + auto colptr = jlcxx::make_julia_array(p.cost_hessian.outerIndexPtr(), p.cost_hessian.outerSize() + 1); + auto rowval = jlcxx::make_julia_array(p.cost_hessian.innerIndexPtr(), p.cost_hessian.nonZeros()); + auto nzval = jlcxx::make_julia_array(p.cost_hessian.valuePtr(), p.cost_hessian.nonZeros()); + return std::make_tuple((int)p.cost_hessian.rows(), (int)p.cost_hessian.cols(), colptr, rowval, nzval); + }) + .method("cost_gradient", [](Problem& p) { return to_julia(p.cost_gradient); }) + .method("J_eq", [](Problem& p) { + auto colptr = jlcxx::make_julia_array(p.J_eq.outerIndexPtr(), p.J_eq.outerSize() + 1); + auto rowval = jlcxx::make_julia_array(p.J_eq.innerIndexPtr(), p.J_eq.nonZeros()); + auto nzval = jlcxx::make_julia_array(p.J_eq.valuePtr(), p.J_eq.nonZeros()); + return std::make_tuple((int)p.J_eq.rows(), (int)p.J_eq.cols(), colptr, rowval, nzval); + }) + .method("c_eq", [](Problem& p) { return to_julia(p.c_eq); }) + .method("J_ineq", [](Problem& p) { + auto colptr = jlcxx::make_julia_array(p.J_ineq.outerIndexPtr(), p.J_ineq.outerSize() + 1); + auto rowval = jlcxx::make_julia_array(p.J_ineq.innerIndexPtr(), p.J_ineq.nonZeros()); + auto nzval = jlcxx::make_julia_array(p.J_ineq.valuePtr(), p.J_ineq.nonZeros()); + return std::make_tuple((int)p.J_ineq.rows(), (int)p.J_ineq.cols(), colptr, rowval, nzval); + }) + .method("c_ineq", [](Problem& p) { return to_julia(p.c_ineq); }) + .method("L_comp", [](Problem& p) { + auto colptr = jlcxx::make_julia_array(p.L_comp.outerIndexPtr(), p.L_comp.outerSize() + 1); + auto rowval = jlcxx::make_julia_array(p.L_comp.innerIndexPtr(), p.L_comp.nonZeros()); + auto nzval = jlcxx::make_julia_array(p.L_comp.valuePtr(), p.L_comp.nonZeros()); + return std::make_tuple((int)p.L_comp.rows(), (int)p.L_comp.cols(), colptr, rowval, nzval); + }) + .method("l_comp", [](Problem& p) { return to_julia(p.l_comp); }) + .method("R_comp", [](Problem& p) { + auto colptr = jlcxx::make_julia_array(p.R_comp.outerIndexPtr(), p.R_comp.outerSize() + 1); + auto rowval = jlcxx::make_julia_array(p.R_comp.innerIndexPtr(), p.R_comp.nonZeros()); + auto nzval = jlcxx::make_julia_array(p.R_comp.valuePtr(), p.R_comp.nonZeros()); + return std::make_tuple((int)p.R_comp.rows(), (int)p.R_comp.cols(), colptr, rowval, nzval); + }) + .method("r_comp", [](Problem& p) { return to_julia(p.r_comp); }); #define OPTION_RW(name, T) \ .method(#name, [](const Solver::Options& o) { return o.name; }) \ diff --git a/julia/examples/Project.toml b/julia/examples/Project.toml index 7316fbb..937fc9d 100644 --- a/julia/examples/Project.toml +++ b/julia/examples/Project.toml @@ -1,4 +1,5 @@ [deps] +ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" JuMP = "4076af6c-e467-56ae-b986-b466b2749572" Marble = "b3638fc0-1f6f-44b7-b12a-1e2f3108bdcf" NLPModelsJuMP = "792afdf1-32c1-5681-94e0-d7bf7a5df49e" diff --git a/julia/src/Marble.jl b/julia/src/Marble.jl index f545ea0..f7bda54 100644 --- a/julia/src/Marble.jl +++ b/julia/src/Marble.jl @@ -106,13 +106,75 @@ module Marble printstyled(io, "─"^total_width * "\n", color=:light_black) end + ## Helper for converting Eigen::SparseMatrixCSC to Julia SparseMatrixCSC + function sparse_from_eigen(nrows, ncols, colptr::Vector, rowval::Vector, nzval::Vector{Float64}) + return SparseMatrixCSC(nrows, ncols, colptr .+ 1, rowval .+ 1, nzval) + end + + ## Accessors for solver members Base.getproperty(solver::Marble.Solver, sym::Symbol) = solver_property(solver, Val(sym)) solver_property(solver::Marble.Solver, ::Val{:options}) = CxxWrap.dereference_argument(Marble.options(solver)) solver_property(solver::Marble.Solver, ::Val{:problem}) = CxxWrap.dereference_argument(Marble.get_problem(solver)) + solver_property(solver::Marble.Solver, ::Val{:workspace}) = CxxWrap.dereference_argument(Marble.get_workspace(solver)) + solver_property(solver::Marble.Solver, ::Val{:z_inds}) = Marble.z_inds(solver) .+ 1 + solver_property(solver::Marble.Solver, ::Val{:s_ineq_inds}) = Marble.s_ineq_inds(solver) .+ 1 + solver_property(solver::Marble.Solver, ::Val{:s_comp_inds}) = Marble.s_comp_inds(solver) .+ 1 + solver_property(solver::Marble.Solver, ::Val{:m_eq_inds}) = Marble.m_eq_inds(solver) .+ 1 + solver_property(solver::Marble.Solver, ::Val{:m_ineq_inds}) = Marble.m_ineq_inds(solver) .+ 1 + solver_property(solver::Marble.Solver, ::Val{:m_comp_L_inds}) = Marble.m_comp_L_inds(solver) .+ 1 + solver_property(solver::Marble.Solver, ::Val{:m_comp_R_inds}) = Marble.m_comp_R_inds(solver) .+ 1 solver_property(solver::Marble.Solver, ::Val{sym}) where sym = getfield(solver, sym) - Base.propertynames(solver::Marble.Solver, private::Bool=false) = (:options, :problem,fieldnames(typeof(solver))...) - + Base.propertynames(solver::Marble.Solver, private::Bool=false) = + (:options, :problem, :z_inds, :s_ineq_inds, :s_comp_inds, :m_eq_inds, :m_ineq_inds, + :m_comp_L_inds, :m_comp_R_inds, fieldnames(typeof(solver))...) + + ## Accessors for problem members + Base.getproperty(problem::Marble.Problem, sym::Symbol) = problem_property(problem, Val(sym)) + problem_property(problem::Marble.Problem, ::Val{:nz}) = Marble.nz(problem) + problem_property(problem::Marble.Problem, ::Val{:n_eq}) = Marble.n_eq(problem) + problem_property(problem::Marble.Problem, ::Val{:n_ineq}) = Marble.n_ineq(problem) + problem_property(problem::Marble.Problem, ::Val{:n_comp}) = Marble.n_comp(problem) + problem_property(problem::Marble.Problem, ::Val{:cost_hessian}) = sparse_from_eigen(Marble.cost_hessian(problem)...) + problem_property(problem::Marble.Problem, ::Val{:cost_gradient}) = Marble.cost_gradient(problem) + problem_property(problem::Marble.Problem, ::Val{:J_eq}) = sparse_from_eigen(Marble.J_eq(problem)...) + problem_property(problem::Marble.Problem, ::Val{:c_eq}) = Marble.c_eq(problem) + problem_property(problem::Marble.Problem, ::Val{:J_ineq}) = sparse_from_eigen(Marble.J_ineq(problem)...) + problem_property(problem::Marble.Problem, ::Val{:c_ineq}) = Marble.c_ineq(problem) + problem_property(problem::Marble.Problem, ::Val{:L_comp}) = sparse_from_eigen(Marble.L_comp(problem)...) + problem_property(problem::Marble.Problem, ::Val{:l_comp}) = Marble.l_comp(problem) + problem_property(problem::Marble.Problem, ::Val{:R_comp}) = sparse_from_eigen(Marble.R_comp(problem)...) + problem_property(problem::Marble.Problem, ::Val{:r_comp}) = Marble.r_comp(problem) + problem_property(problem::Marble.Problem, ::Val{sym}) where sym = getfield(problem, sym) + + Base.propertynames(problem::Marble.Problem, private::Bool=false) = + (:nz, :n_eq, :n_ineq, :n_comp, :cost_hessian, :cost_gradient, :J_eq, :c_eq, + :J_ineq, :c_ineq, :L_comp, :l_comp, :R_comp, :r_comp, fieldnames(typeof(problem))...) + + ## Accessors for workspace members + Base.getproperty(workspace::Marble.Workspace, sym::Symbol) = workspace_property(workspace, Val(sym)) + workspace_property(workspace::Marble.Workspace, ::Val{:solution}) = Marble.solution(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:z}) = Marble.z(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:s_ineq}) = Marble.s_ineq(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:s_comp}) = Marble.s_comp(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:m_eq}) = Marble.m_eq(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:m_ineq}) = Marble.m_ineq(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:m_comp_L}) = Marble.m_comp_L(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:m_comp_R}) = Marble.m_comp_R(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:m_eq_est}) = Marble.m_eq_est(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:m_ineq_est}) = Marble.m_ineq_est(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:m_comp_L_est}) = Marble.m_comp_L_est(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:m_comp_R_est}) = Marble.m_comp_R_est(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:kkt_residual}) = Marble.kkt_residual(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:relax_param}) = Marble.relax_param(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:penalty_param}) = Marble.penalty_param(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{sym}) where sym = getfield(workspace, sym) + + Base.propertynames(workspace::Marble.Workspace, private::Bool=false) = + (:kkt_residual, :solution, :z, :s_ineq, :s_comp, :m_eq, :m_ineq, :m_comp_L, :m_comp_R, + :m_eq_est, :m_ineq_est, :m_comp_L_est, :m_comp_R_est, :relax_param, :penalty_param, fieldnames(typeof(workspace))...) + + # Helper functions for evaluating objectives and residuals obj(solver::Marble.Solver, z::Vector{Float64}) = Marble.obj(Marble.get_problem(solver), z) obj(data::NamedTuple, z::Vector{Float64}) = Marble.obj(Problem(data...), z) From 565e6127a378a391431282a4ea639be7ee1d086e Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Mon, 20 Jul 2026 13:03:33 -0400 Subject: [PATCH 16/35] Add test for residual with softplus --- julia/test/runtests.jl | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index 63adf4c..760dd6d 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -4,6 +4,8 @@ # problem written directly as matrices (from julia/examples/simple_test.jl) and # the same 16 test cases in the same order — nine solve tests followed by seven # dimension validation cases. +# using Pkg; Pkg.activate(joinpath(@__DIR__, "../examples/")) +# using Revise using Test using LinearAlgebra using SparseArrays @@ -145,4 +147,59 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) @test_throws ErrorException Marble.setup!(Marble.Solver(), sparse(Q2), zeros(2); L = sparse(zeros(1, 2)), R = sparse(zeros(1, 2)), r = zeros(1)) end + + function kkt_residual(retract_type, solver, solution, κ, ρ) + # Extract solution, multipliers, and problem data + prob, workspace = solver.problem, solver.workspace + z, s_ineq, s_comp = solution[solver.z_inds], solution[solver.s_ineq_inds], solution[solver.s_comp_inds] + m_eq, m_ineq, m_comp_L, m_comp_R = + solution[solver.m_eq_inds], solution[solver.m_ineq_inds], solution[solver.m_comp_L_inds], solution[solver.m_comp_R_inds] + H, g, J_eq, c_eq, J_ineq, c_ineq, L_comp, l_comp, R_comp, r_comp = prob.cost_hessian, prob.cost_gradient, prob.J_eq, prob.c_eq, prob.J_ineq, prob.c_ineq, prob.L_comp, prob.l_comp, prob.R_comp, prob.r_comp + m_eq_est, m_ineq_est, m_comp_L_est, m_comp_R_est = workspace.m_eq_est, workspace.m_ineq_est, workspace.m_comp_L_est, workspace.m_comp_R_est + + # Construct KKT residual + res = zeros(eltype(solution), length(solution)) + # z stationarity + res[solver.z_inds] = H*z + g + J_eq'*m_eq + J_ineq'*m_ineq + L_comp'*m_comp_L + R_comp'*m_comp_R + + # Inequality slack stationarity + p_neg_ineq = retract(retract_type, -s_ineq, κ) + dp_ineq = FD.jacobian(_x -> retract(retract_type, _x, κ), s_ineq) + res[solver.s_ineq_inds] = dp_ineq * (-m_ineq - p_neg_ineq) + + # Complementarity slack stationarity + dp_comp = FD.jacobian(_x -> retract(retract_type, _x, κ), s_comp) + dp_neg_comp = FD.jacobian(_x -> retract(retract_type, _x, κ), -s_comp) + res[solver.s_comp_inds] = -dp_comp * m_comp_L + dp_neg_comp * m_comp_R + + # Equality primal feasibility + res[solver.m_eq_inds] = J_eq*z + c_eq - 1/ρ*(m_eq - m_eq_est) + + # Inequality primal feasibility + p_ineq = retract(retract_type, s_ineq, κ) + res[solver.m_ineq_inds] = J_ineq*z + c_ineq - p_ineq - 1/ρ*(m_ineq - m_ineq_est) + + # Complementarity primal feasibility + p_comp_L = retract(retract_type, s_comp, κ) + p_comp_R = retract(retract_type, -s_comp, κ) + res[solver.m_comp_L_inds] = L_comp*z + l_comp - p_comp_L - 1/ρ*(m_comp_L - m_comp_L_est) + res[solver.m_comp_R_inds] = R_comp*z + r_comp - p_comp_R - 1/ρ*(m_comp_R - m_comp_R_est) + return res + end + + @testset "KKT residual" begin + solver, _ = setup_and_solve() + prob, workspace = solver.problem, solver.workspace + res = workspace.kkt_residual + + workspace.solution .= randn(length(workspace.solution)) + ρ, κ = workspace.penalty_param, workspace.relax_param + Marble.update_residuals!(solver) + Marble.update_KKT_residual!(solver, κ, ρ) + + retract_type = Val(:Softplus) + tol = 1e-12 + res = kkt_residual(retract_type, solver, workspace.solution, κ, ρ) + isapprox(workspace.kkt_residual, res, atol=tol) + end end From 309a556bb5146d2e8759d33a94801b540cb39741 Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Mon, 20 Jul 2026 13:11:53 -0400 Subject: [PATCH 17/35] KKT residual for all retraction maps --- julia/test/runtests.jl | 12 +++--- src/solver.cpp | 84 +++++++++++++++++++++++++++++------------- 2 files changed, 65 insertions(+), 31 deletions(-) diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index 760dd6d..6cfddbf 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -4,8 +4,6 @@ # problem written directly as matrices (from julia/examples/simple_test.jl) and # the same 16 test cases in the same order — nine solve tests followed by seven # dimension validation cases. -# using Pkg; Pkg.activate(joinpath(@__DIR__, "../examples/")) -# using Revise using Test using LinearAlgebra using SparseArrays @@ -195,11 +193,13 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) workspace.solution .= randn(length(workspace.solution)) ρ, κ = workspace.penalty_param, workspace.relax_param Marble.update_residuals!(solver) - Marble.update_KKT_residual!(solver, κ, ρ) - retract_type = Val(:Softplus) tol = 1e-12 - res = kkt_residual(retract_type, solver, workspace.solution, κ, ρ) - isapprox(workspace.kkt_residual, res, atol=tol) + for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) + Marble.update_settings!(solver, retraction_type = i-1) + Marble.update_KKT_residual!(solver, κ, ρ) + res = kkt_residual(retract_type, solver, workspace.solution, κ, ρ) + @test isapprox(workspace.kkt_residual, res, atol=tol) + end end end diff --git a/src/solver.cpp b/src/solver.cpp index 64de757..cbf832c 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -382,35 +382,69 @@ void Solver::update_KKT_residual(double relax_param, double penalty_param) { prob->L_comp.transpose() * workspace->m_comp_L + prob->R_comp.transpose() * workspace->m_comp_R; - // Inequality slack stationarity (p'(s_ineq) * (-m_ineq - p(-s_ineq))) - Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); - Vec d_p_ineq = retract_deriv(workspace->s_ineq, relax_param); - workspace->kkt_residual(s_ineq_inds) = d_p_ineq.cwiseProduct(-workspace->m_ineq - p_neg_ineq); + if (options.retraction_type == 0) { // Main path (optimized, uses softplus properties) + // Inequality slack stationarity (p'(s_ineq) * (-m_ineq - p(-s_ineq))) + Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); + Vec d_p_ineq = retract_deriv(workspace->s_ineq, relax_param); + workspace->kkt_residual(s_ineq_inds) = d_p_ineq.cwiseProduct(-workspace->m_ineq - p_neg_ineq); + + // Complementarity slack stationarity (-p'(s_comp)*m_comp_L + p'(-s_comp)*m_comp_R) + Vec d_p_comp = retract_deriv(workspace->s_comp, relax_param); + for (int i = 0; i < prob->n_comp; i++) { + workspace->kkt_residual(s_comp_inds[i]) = + -d_p_comp[i] * workspace->m_comp_L[i] + (1 - d_p_comp[i]) * workspace->m_comp_R[i]; + } - // Complementarity slack stationarity (-p'(s_comp)*m_comp_L + p'(-s_comp)*m_comp_R) - Vec d_p_comp = retract_deriv(workspace->s_comp, relax_param); - for (int i = 0; i < prob->n_comp; i++) { - workspace->kkt_residual(s_comp_inds[i]) = - -d_p_comp[i] * workspace->m_comp_L[i] + (1 - d_p_comp[i]) * workspace->m_comp_R[i]; - } + // Equality primal feasibility (r_eq - inv_penalty_param * (m_eq - m_eq_est)) + workspace->kkt_residual(m_eq_inds) = + workspace->residual_eq - inv_penalty_param * (workspace->m_eq - workspace->m_eq_est); + + // Inequality primal feasibility (r_ineq - (p(s_ineq) - inv_penalty_param * (m_ineq - m_ineq_est)) + workspace->kkt_residual(m_ineq_inds) = workspace->residual_ineq - + (workspace->s_ineq + p_neg_ineq) - // p(s) - p(-s) = s + inv_penalty_param * (workspace->m_ineq - workspace->m_ineq_est); + + // Complementarity primal feasibility (r_comp_L - p(s_comp) - inv_penalty_param * (m_comp_L - m_comp_L_est) + // (r_comp_R - p(-s_comp) - inv_penalty_param * (m_comp_R - m_comp_R_est)) + Vec p_comp = retract(workspace->s_comp, relax_param); + workspace->kkt_residual(m_comp_L_inds) = workspace->residual_comp_L - p_comp - + inv_penalty_param * (workspace->m_comp_L - workspace->m_comp_L_est); + workspace->kkt_residual(m_comp_R_inds) = workspace->residual_comp_R - + (p_comp - workspace->s_comp) - + inv_penalty_param * (workspace->m_comp_R - workspace->m_comp_R_est); + } + else { // Alternatives for testing retraction maps + // Inequality slack stationarity (p'(s_ineq) * (-m_ineq - p(-s_ineq))) + Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); + Vec d_p_ineq = retract_deriv(workspace->s_ineq, relax_param); + workspace->kkt_residual(s_ineq_inds) = d_p_ineq.cwiseProduct(-workspace->m_ineq - p_neg_ineq); + + // Complementarity slack stationarity (-p'(s_comp)*m_comp_L + p'(-s_comp)*m_comp_R) + Vec d_p_comp = retract_deriv(workspace->s_comp, relax_param); + Vec d_p_neg_comp = retract_deriv(-workspace->s_comp, relax_param); + for (int i = 0; i < prob->n_comp; i++) { + workspace->kkt_residual(s_comp_inds[i]) = + -d_p_comp[i] * workspace->m_comp_L[i] + d_p_neg_comp[i] * workspace->m_comp_R[i]; + } - // Equality primal feasibility (r_eq - inv_penalty_param * (m_eq - m_eq_est)) - workspace->kkt_residual(m_eq_inds) = - workspace->residual_eq - inv_penalty_param * (workspace->m_eq - workspace->m_eq_est); + // Equality primal feasibility (r_eq - inv_penalty_param * (m_eq - m_eq_est)) + workspace->kkt_residual(m_eq_inds) = + workspace->residual_eq - inv_penalty_param * (workspace->m_eq - workspace->m_eq_est); - // Inequality primal feasibility (r_ineq - (p(s_ineq) - inv_penalty_param * (m_ineq - m_ineq_est)) - workspace->kkt_residual(m_ineq_inds) = workspace->residual_ineq - - (workspace->s_ineq + p_neg_ineq) - // p(s) - p(-s) = s - inv_penalty_param * (workspace->m_ineq - workspace->m_ineq_est); + // Inequality primal feasibility (r_ineq - (p(s_ineq) - inv_penalty_param * (m_ineq - m_ineq_est)) + Vec p_ineq = retract(workspace->s_ineq, relax_param); + workspace->kkt_residual(m_ineq_inds) = workspace->residual_ineq - p_ineq - + inv_penalty_param * (workspace->m_ineq - workspace->m_ineq_est); - // Complementarity primal feasibility (r_comp_L - p(s_comp) - inv_penalty_param * (m_comp_L - m_comp_L_est) - // (r_comp_R - p(-s_comp) - inv_penalty_param * (m_comp_R - m_comp_R_est)) - Vec p_comp = retract(workspace->s_comp, relax_param); - workspace->kkt_residual(m_comp_L_inds) = workspace->residual_comp_L - p_comp - - inv_penalty_param * (workspace->m_comp_L - workspace->m_comp_L_est); - workspace->kkt_residual(m_comp_R_inds) = workspace->residual_comp_R - - (p_comp - workspace->s_comp) - - inv_penalty_param * (workspace->m_comp_R - workspace->m_comp_R_est); + // Complementarity primal feasibility (r_comp_L - p(s_comp) - inv_penalty_param * (m_comp_L - m_comp_L_est) + // (r_comp_R - p(-s_comp) - inv_penalty_param * (m_comp_R - m_comp_R_est)) + Vec p_comp = retract(workspace->s_comp, relax_param); + Vec p_neg_comp = retract(-workspace->s_comp, relax_param); + workspace->kkt_residual(m_comp_L_inds) = workspace->residual_comp_L - p_comp - + inv_penalty_param * (workspace->m_comp_L - workspace->m_comp_L_est); + workspace->kkt_residual(m_comp_R_inds) = workspace->residual_comp_R - p_neg_comp - + inv_penalty_param * (workspace->m_comp_R - workspace->m_comp_R_est); + } } void Solver::update_dKKT_residual_drelax(double relax_param) { From b19a71ac3cd67c70b484a8efc9a3cd172c485da3 Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Mon, 20 Jul 2026 20:31:48 -0400 Subject: [PATCH 18/35] Add kkt system and smoke tests --- julia/src/Marble.jl | 6 ++++- julia/test/runtests.jl | 53 ++++++++++++++++++++++++++++++++++++++---- src/solver.cpp | 53 +++++++++++++++++++++++++++++++----------- 3 files changed, 92 insertions(+), 20 deletions(-) diff --git a/julia/src/Marble.jl b/julia/src/Marble.jl index f7bda54..92cc763 100644 --- a/julia/src/Marble.jl +++ b/julia/src/Marble.jl @@ -166,12 +166,16 @@ module Marble workspace_property(workspace::Marble.Workspace, ::Val{:m_comp_L_est}) = Marble.m_comp_L_est(workspace) workspace_property(workspace::Marble.Workspace, ::Val{:m_comp_R_est}) = Marble.m_comp_R_est(workspace) workspace_property(workspace::Marble.Workspace, ::Val{:kkt_residual}) = Marble.kkt_residual(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:kkt_system}) = sparse_from_eigen(Marble.kkt_system(workspace)...) + workspace_property(workspace::Marble.Workspace, ::Val{:amd_perm_vec}) = Marble.amd_perm_vec(workspace) .+ 1 + workspace_property(workspace::Marble.Workspace, ::Val{:amd_iperm_vec}) = Marble.amd_iperm_vec(workspace) .+ 1 + workspace_property(workspace::Marble.Workspace, ::Val{:scaling}) = Marble.scaling(workspace) workspace_property(workspace::Marble.Workspace, ::Val{:relax_param}) = Marble.relax_param(workspace) workspace_property(workspace::Marble.Workspace, ::Val{:penalty_param}) = Marble.penalty_param(workspace) workspace_property(workspace::Marble.Workspace, ::Val{sym}) where sym = getfield(workspace, sym) Base.propertynames(workspace::Marble.Workspace, private::Bool=false) = - (:kkt_residual, :solution, :z, :s_ineq, :s_comp, :m_eq, :m_ineq, :m_comp_L, :m_comp_R, + (:kkt_residual, :kkt_system, :solution, :z, :s_ineq, :s_comp, :m_eq, :m_ineq, :m_comp_L, :m_comp_R, :amd_perm_vec, :amd_iperm_vec, :scaling, :m_eq_est, :m_ineq_est, :m_comp_L_est, :m_comp_R_est, :relax_param, :penalty_param, fieldnames(typeof(workspace))...) # Helper functions for evaluating objectives and residuals diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index 6cfddbf..f93551b 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -39,12 +39,25 @@ retract(::Val{:Exp}, x, κ) = sqrt(κ)*exp.(x) retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) @testset "Marble" begin + @testset "smoke tests" begin + solver, _ = setup_and_solve() + for name in propertynames(solver) + @test getproperty(solver, name) isa Any + end + problem, workspace = solver.problem, solver.workspace + for name in propertynames(problem) + @test getproperty(problem, name) isa Any + end + for name in propertynames(workspace) + @test getproperty(workspace, name) isa Any + end + end @testset "retraction maps" begin solver, _ = setup_and_solve() x = [0; 0.5; -0.5; -10; 10; randn(4)] κ = 1e-1 - tol = 1e-12 + tol = 1e-10 for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) Marble.update_settings!(solver, retraction_type = i-1) @test isapprox(Marble.retract(solver, x, κ), retract(retract_type, x, κ), atol = tol) @@ -146,7 +159,7 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) L = sparse(zeros(1, 2)), R = sparse(zeros(1, 2)), r = zeros(1)) end - function kkt_residual(retract_type, solver, solution, κ, ρ) + function kkt_residual(retract_type, solver, solution, κ, ρ; symmetric = true) # Extract solution, multipliers, and problem data prob, workspace = solver.problem, solver.workspace z, s_ineq, s_comp = solution[solver.z_inds], solution[solver.s_ineq_inds], solution[solver.s_comp_inds] @@ -163,7 +176,11 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) # Inequality slack stationarity p_neg_ineq = retract(retract_type, -s_ineq, κ) dp_ineq = FD.jacobian(_x -> retract(retract_type, _x, κ), s_ineq) - res[solver.s_ineq_inds] = dp_ineq * (-m_ineq - p_neg_ineq) + if symmetric + res[solver.s_ineq_inds] = dp_ineq * (-m_ineq - p_neg_ineq) + else + res[solver.s_ineq_inds] = -m_ineq - p_neg_ineq + end # Complementarity slack stationarity dp_comp = FD.jacobian(_x -> retract(retract_type, _x, κ), s_comp) @@ -191,10 +208,10 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) res = workspace.kkt_residual workspace.solution .= randn(length(workspace.solution)) - ρ, κ = workspace.penalty_param, workspace.relax_param + ρ, κ = 1e1, 1e-1 Marble.update_residuals!(solver) - tol = 1e-12 + tol = 1e-10 for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) Marble.update_settings!(solver, retraction_type = i-1) Marble.update_KKT_residual!(solver, κ, ρ) @@ -202,4 +219,30 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) @test isapprox(workspace.kkt_residual, res, atol=tol) end end + + @testset "KKT system" begin + solver, _ = setup_and_solve() + workspace = solver.workspace + + workspace.solution .= randn(length(workspace.solution)) + ρ, κ = 1e1, 1e-1 + + for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) + Marble.update_settings!(solver, retraction_type = i-1) + Marble.update_KKT_system!(solver, κ, ρ) + + # Get kkt matrix from solver + kkt_mat = workspace.kkt_system # upper triangular + kkt_mat = kkt_mat + kkt_mat' - Diagonal(diag(kkt_mat)) # symmetric + scale_mat = spdiagm(1 ./workspace.scaling) + kkt_mat = scale_mat*kkt_mat[workspace.amd_iperm_vec, workspace.amd_iperm_vec]*scale_mat + + # Compare to forward diff with symmetrizing term + test_mat = FD.jacobian(_s -> kkt_residual(retract_type, solver, _s, κ, ρ; symmetric=false), workspace.solution) + dp_ineq = FD.jacobian(_x -> retract(retract_type, _x, κ), workspace.s_ineq) + test_mat[solver.s_ineq_inds, :] = dp_ineq * test_mat[solver.s_ineq_inds, :] + + @test isapprox(kkt_mat, test_mat, atol = 1e-10) + end + end end diff --git a/src/solver.cpp b/src/solver.cpp index cbf832c..b2567b9 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -496,13 +496,22 @@ void Solver::update_KKT_ineq(const Eigen::Ref& s_ineq, double relax_p Eigen::Ref scaling = workspace->scaling; Vec d_p = retract_deriv(s_ineq, relax_param); - // Ineq stationarity wrt s_ineq is -d_p*d_neg_p + // Ineq stationarity wrt s_ineq is d_p*d_neg_p // wrt m_ineq is -d_p // Use identity that retract_deriv(-s_ineq, relax_param) = 1 - d_p - workspace->s_ineq_stationarity = -d_p.cwiseProduct(d_p) + d_p; // -d_p*d_neg_p (stored for diag updating) - for (int i = 0; i < prob->n_ineq; i++) { - nzval(s_ineq_s_ineq_inds[i]) = scaling(s_ineq_inds[i]) * workspace->s_ineq_stationarity[i] * scaling(s_ineq_inds[i]); - nzval(s_ineq_m_ineq_inds[i]) = scaling(s_ineq_inds[i]) * -d_p[i] * scaling(m_ineq_inds[i]); + if (options.retraction_type == 0) { + workspace->s_ineq_stationarity = -d_p.cwiseProduct(d_p) + d_p; // -d_p*d_neg_p (stored for diag updating) + for (int i = 0; i < prob->n_ineq; i++) { + nzval(s_ineq_s_ineq_inds[i]) = scaling(s_ineq_inds[i]) * workspace->s_ineq_stationarity[i] * scaling(s_ineq_inds[i]); + nzval(s_ineq_m_ineq_inds[i]) = scaling(s_ineq_inds[i]) * -d_p[i] * scaling(m_ineq_inds[i]); + } + } + else { + workspace->s_ineq_stationarity = d_p.cwiseProduct(retract_deriv(-s_ineq, relax_param)); // -d_p*d_neg_p (stored for diag updating) + for (int i = 0; i < prob->n_ineq; i++) { + nzval(s_ineq_s_ineq_inds[i]) = scaling(s_ineq_inds[i]) * workspace->s_ineq_stationarity[i] * scaling(s_ineq_inds[i]); + nzval(s_ineq_m_ineq_inds[i]) = scaling(s_ineq_inds[i]) * -d_p[i] * scaling(m_ineq_inds[i]); + } } } @@ -513,15 +522,31 @@ void Solver::update_KKT_comp(const Eigen::Ref& s_comp, const Eigen::R Vec d_p = retract_deriv(s_comp, relax_param); Vec dd_p = retract_second_deriv(s_comp, relax_param); - for (int i = 0; i < prob->n_comp; i++) { - // Derivative of -p'(s)*m_L + p'(-s)*m_R wrt s - // is -(p''(s)*m_L + p''(s)*m_R) but p''(s) = p''(-s) so its -p''(s)*(m_L + m_R) - workspace->s_comp_stationarity[i] = -dd_p[i]*(m_comp_L[i] + m_comp_R[i]); // stored for diag updating - nzval(s_comp_s_comp_inds[i]) = scaling(s_comp_inds[i]) * workspace->s_comp_stationarity[i] * scaling(s_comp_inds[i]); - - // Derivative wrt to m_L and m_R is just -d_p and -d_neg_p respectively - nzval(s_comp_m_comp_L_inds[i]) = scaling(s_comp_inds[i]) * -d_p[i] * scaling(m_comp_L_inds[i]); - nzval(s_comp_m_comp_R_inds[i]) = scaling(s_comp_inds[i]) * (1 - d_p[i]) * scaling(m_comp_R_inds[i]); // d_neg_p = 1 - d_p + if (options.retraction_type == 0) { + for (int i = 0; i < prob->n_comp; i++) { + // Derivative of -p'(s)*m_L + p'(-s)*m_R wrt s + // is -(p''(s)*m_L + p''(s)*m_R) but p''(s) = p''(-s) so its -p''(s)*(m_L + m_R) + workspace->s_comp_stationarity[i] = -dd_p[i]*(m_comp_L[i] + m_comp_R[i]); // stored for diag updating + nzval(s_comp_s_comp_inds[i]) = scaling(s_comp_inds[i]) * workspace->s_comp_stationarity[i] * scaling(s_comp_inds[i]); + + // Derivative wrt to m_L and m_R is just -d_p and -d_neg_p respectively + nzval(s_comp_m_comp_L_inds[i]) = scaling(s_comp_inds[i]) * -d_p[i] * scaling(m_comp_L_inds[i]); + nzval(s_comp_m_comp_R_inds[i]) = scaling(s_comp_inds[i]) * (1 - d_p[i]) * scaling(m_comp_R_inds[i]); // d_neg_p = 1 - d_p + } + } + else { + Vec d_neg_p = retract_deriv(-s_comp, relax_param); + Vec dd_neg_p = retract_second_deriv(-s_comp, relax_param); + for (int i = 0; i < prob->n_comp; i++) { + // Derivative of -p'(s)*m_L + p'(-s)*m_R wrt s + // is -(p''(s)*m_L + p''(-s)*m_R) + workspace->s_comp_stationarity[i] = -dd_p[i]*m_comp_L[i] - dd_neg_p[i]*m_comp_R[i]; // stored for diag updating + nzval(s_comp_s_comp_inds[i]) = scaling(s_comp_inds[i]) * workspace->s_comp_stationarity[i] * scaling(s_comp_inds[i]); + + // Derivative wrt to m_L and m_R is just -d_p and d_neg_p respectively + nzval(s_comp_m_comp_L_inds[i]) = scaling(s_comp_inds[i]) * -d_p[i] * scaling(m_comp_L_inds[i]); + nzval(s_comp_m_comp_R_inds[i]) = scaling(s_comp_inds[i]) * d_neg_p[i] * scaling(m_comp_R_inds[i]); + } } } From 0704e1e675ed652f0a735f8e61e053c9e614c88f Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Mon, 20 Jul 2026 20:42:04 -0400 Subject: [PATCH 19/35] Clean up test, add result getters --- julia/src/Marble.jl | 22 ++++++++++++++++++++++ julia/test/runtests.jl | 22 ++++++++++------------ 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/julia/src/Marble.jl b/julia/src/Marble.jl index 92cc763..bc525db 100644 --- a/julia/src/Marble.jl +++ b/julia/src/Marble.jl @@ -178,6 +178,28 @@ module Marble (:kkt_residual, :kkt_system, :solution, :z, :s_ineq, :s_comp, :m_eq, :m_ineq, :m_comp_L, :m_comp_R, :amd_perm_vec, :amd_iperm_vec, :scaling, :m_eq_est, :m_ineq_est, :m_comp_L_est, :m_comp_R_est, :relax_param, :penalty_param, fieldnames(typeof(workspace))...) + ## Accessors for result members + Base.getproperty(result::Marble.SolveResult, sym::Symbol) = result_property(result, Val(sym)) + result_property(result::Marble.SolveResult, ::Val{:converged}) = Marble.converged(result) + result_property(result::Marble.SolveResult, ::Val{:iterations}) = Marble.iterations(result) + result_property(result::Marble.SolveResult, ::Val{:iterations_outer}) = Marble.iterations_outer(result) + result_property(result::Marble.SolveResult, ::Val{:iterations_inner}) = Marble.iterations_inner(result) + result_property(result::Marble.SolveResult, ::Val{:factorizations}) = Marble.factorizations(result) + result_property(result::Marble.SolveResult, ::Val{:z}) = Marble.z(result) + result_property(result::Marble.SolveResult, ::Val{:s_ineq}) = Marble.s_ineq(result) + result_property(result::Marble.SolveResult, ::Val{:s_comp}) = Marble.s_comp(result) + result_property(result::Marble.SolveResult, ::Val{:m_eq}) = Marble.m_eq(result) + result_property(result::Marble.SolveResult, ::Val{:m_ineq}) = Marble.m_ineq(result) + result_property(result::Marble.SolveResult, ::Val{:m_comp_L}) = Marble.m_comp_L(result) + result_property(result::Marble.SolveResult, ::Val{:m_comp_R}) = Marble.m_comp_R(result) + result_property(result::Marble.SolveResult, ::Val{:setup_time_s}) = Marble.setup_time_s(result) + result_property(result::Marble.SolveResult, ::Val{:solve_time_s}) = Marble.solve_time_s(result) + result_property(result::Marble.SolveResult, ::Val{sym}) where sym = getfield(result, sym) + + Base.propertynames(result::Marble.SolveResult, private::Bool=false) = + (:converged, :iterations, :iterations_outer, :iterations_inner, :factorizations, :z, :s_ineq, :s_comp, :m_eq, :m_ineq, :m_comp_L, :m_comp_R, + :setup_time_s, :solve_time_s, fieldnames(typeof(result))...) + # Helper functions for evaluating objectives and residuals obj(solver::Marble.Solver, z::Vector{Float64}) = Marble.obj(Marble.get_problem(solver), z) obj(data::NamedTuple, z::Vector{Float64}) = Marble.obj(Problem(data...), z) diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index f93551b..e67f814 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -72,31 +72,30 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) @testset "problem dimensions" begin solver, _ = setup_and_solve() p = solver.problem - @test Marble.nz(p) == 4 && Marble.n_eq(p) == 1 && Marble.n_ineq(p) == 1 && Marble.n_comp(p) == 1 + @test p.nz == 4 && p.n_eq == 1 && p.n_ineq == 1 && p.n_comp == 1 end @testset "solves to known optimum" begin _, res = setup_and_solve() - z = collect(Marble.z(res)) - @test Marble.converged(res) && isapprox(z, ZSTAR, atol = 1e-4) + @test res.converged && isapprox(res.z, ZSTAR, atol = 1e-4) end @testset "equality constraint satisfied" begin # x1 = 1 _, res = setup_and_solve() - @test abs(collect(Marble.z(res))[1] - 1.0) < 1e-4 + @test abs(res.z[1] - 1.0) < 1e-4 end @testset "inequality constraint satisfied" begin # x2 >= 1 _, res = setup_and_solve() - @test collect(Marble.z(res))[2] >= 1.0 - 1e-4 + @test res.z[2] >= 1.0 - 1e-4 end @testset "complementarity satisfied" begin # 0 <= (x3 + 1) ⟂ (x4 - 1) >= 0 _, res = setup_and_solve() - z = collect(Marble.z(res)) + z = res.z a = z[3] + 1.0 b = z[4] - 1.0 @test a >= -1e-4 && b >= -1e-4 && abs(a * b) < 1e-4 @@ -105,14 +104,14 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) @testset "objective value" begin # x'x = 3 at the optimum solver, res = setup_and_solve() - @test abs(Marble.obj(solver, collect(Marble.z(res))) - 3.0) < 1e-3 + @test abs(Marble.obj(solver, res.z)) - 3.0 < 1e-3 end @testset "dense and sparse solve agree" begin _, rd = setup_and_solve(sparse_problem = false) _, rs = setup_and_solve(sparse_problem = true) - @test Marble.converged(rd) && Marble.converged(rs) && - isapprox(collect(Marble.z(rd)), collect(Marble.z(rs)), atol = 1e-6) + @test rd.converged && rs.converged && + isapprox(rd.z, rs.z, atol = 1e-6) end @testset "complementarity-only QPCC" begin @@ -121,15 +120,14 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) solver = Marble.Solver() Marble.setup!(solver, Q, q, C0; L = L, l = EL, R = R, r = ER) res = Marble.solve!(solver) - z = collect(Marble.z(res)) - @test Marble.converged(res) && isapprox(z, [0.0, 0.0, 0.0, 1.0], atol = 1e-4) + @test res.converged && isapprox(res.z, [0.0, 0.0, 0.0, 1.0], atol = 1e-4) end @testset "options are honored" begin s2, r2 = setup_and_solve(max_iters = 123, convergence_kkt_norm = 1e-8) @test Marble.max_iters(s2.options) == 123 && isapprox(Marble.convergence_kkt_norm(s2.options), 1e-8) && - Marble.converged(r2) + r2.converged end @testset "dimension validation" begin From 40bca482066275e1bfe57891d3225837d4bf103e Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Tue, 21 Jul 2026 01:04:04 -0400 Subject: [PATCH 20/35] Updated entry and kappa solve for new retraction maps, added tests for all maps --- julia/test/runtests.jl | 49 ++++++++++-------- src/solver.cpp | 112 ++++++++++++++++++++++++++++------------- 2 files changed, 105 insertions(+), 56 deletions(-) diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index e67f814..51b183b 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -1,9 +1,5 @@ # Marble test suite # -# Mirror of the Python suite (python/tests/test_marble.py): the same example -# problem written directly as matrices (from julia/examples/simple_test.jl) and -# the same 16 test cases in the same order — nine solve tests followed by seven -# dimension validation cases. using Test using LinearAlgebra using SparseArrays @@ -70,41 +66,52 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) end @testset "problem dimensions" begin - solver, _ = setup_and_solve() - p = solver.problem - @test p.nz == 4 && p.n_eq == 1 && p.n_ineq == 1 && p.n_comp == 1 + for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) + solver, _ = setup_and_solve(retraction_type = i-1) + p = solver.problem + @test p.nz == 4 && p.n_eq == 1 && p.n_ineq == 1 && p.n_comp == 1 + end end @testset "solves to known optimum" begin - _, res = setup_and_solve() - @test res.converged && isapprox(res.z, ZSTAR, atol = 1e-4) + for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) + solver, res = setup_and_solve(retraction_type = i-1) + @test res.converged && isapprox(res.z, ZSTAR, atol = 1e-4) + end end @testset "equality constraint satisfied" begin # x1 = 1 - _, res = setup_and_solve() - @test abs(res.z[1] - 1.0) < 1e-4 + for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) + solver, res = setup_and_solve(retraction_type = i-1) + @test abs(res.z[1] - 1.0) < 1e-4 + end end @testset "inequality constraint satisfied" begin # x2 >= 1 - _, res = setup_and_solve() - @test res.z[2] >= 1.0 - 1e-4 + for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) + solver, res = setup_and_solve(retraction_type = i-1) + @test res.z[2] >= 1.0 - 1e-4 + end end @testset "complementarity satisfied" begin # 0 <= (x3 + 1) ⟂ (x4 - 1) >= 0 - _, res = setup_and_solve() - z = res.z - a = z[3] + 1.0 - b = z[4] - 1.0 - @test a >= -1e-4 && b >= -1e-4 && abs(a * b) < 1e-4 + for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) + solver, res = setup_and_solve(retraction_type = i-1) + z = res.z + a = z[3] + 1.0 + b = z[4] - 1.0 + @test a >= -1e-4 && b >= -1e-4 && abs(a * b) < 1e-4 + end end @testset "objective value" begin - # x'x = 3 at the optimum - solver, res = setup_and_solve() - @test abs(Marble.obj(solver, res.z)) - 3.0 < 1e-3 + for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) + solver, res = setup_and_solve(retraction_type = i-1) + @test abs(Marble.obj(solver, res.z)) - 3.0 < 1e-3 + end end @testset "dense and sparse solve agree" begin diff --git a/src/solver.cpp b/src/solver.cpp index b2567b9..5da593c 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -451,35 +451,60 @@ void Solver::update_dKKT_residual_drelax(double relax_param) { // Derivative of the KKT residual wrt the relaxation parameter kappa (= relax_param). workspace->dkkt_residual_drelax.setZero(); - // Inequality slack stationarity: r = p'(s) * (-m_ineq - p(-s)) - // d/dkappa = p'_kappa(s) * (-m_ineq - p(-s)) - p'(s) * p_kappa(-s) - // (p(-s) is even in s, so p_kappa(-s) = p_kappa(s) = retract_drelax(s)) - Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); - Vec d_p_ineq = retract_deriv(workspace->s_ineq, relax_param); - Vec dp_ineq_dk = retract_drelax(workspace->s_ineq, relax_param); - Vec dd_p_ineq_dk = retract_deriv_drelax(workspace->s_ineq, relax_param); - workspace->dkkt_residual_drelax(s_ineq_inds) = - dd_p_ineq_dk.cwiseProduct(-workspace->m_ineq - p_neg_ineq) - d_p_ineq.cwiseProduct(dp_ineq_dk); - - // Complementarity slack stationarity: r = -p'(s)*m0 + (1 - p'(s))*m1 - // d/dkappa = -p'_kappa(s) * (m0 + m1) - Vec dp_comp_dk = retract_drelax(workspace->s_comp, relax_param); - Vec dd_p_comp_dk = retract_deriv_drelax(workspace->s_comp, relax_param); - for (int i = 0; i < prob->n_comp; i++) { - workspace->dkkt_residual_drelax(s_comp_inds[i]) = - -dd_p_comp_dk[i] * (workspace->m_comp_L[i] + workspace->m_comp_R[i]); + if (options.retraction_type == 0) { // Main path, optimized with solver properties + // Inequality slack stationarity: r = p'(s) * (-m_ineq - p(-s)) + // d/dkappa = p'_kappa(s) * (-m_ineq - p(-s)) - p'(s) * p_kappa(-s) + // (p(-s) is even in s, so p_kappa(-s) = p_kappa(s) = retract_drelax(s)) + Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); + Vec d_p_ineq = retract_deriv(workspace->s_ineq, relax_param); + Vec dp_ineq_dk = retract_drelax(workspace->s_ineq, relax_param); + Vec dd_p_ineq_dk = retract_deriv_drelax(workspace->s_ineq, relax_param); + workspace->dkkt_residual_drelax(s_ineq_inds) = + dd_p_ineq_dk.cwiseProduct(-workspace->m_ineq - p_neg_ineq) - d_p_ineq.cwiseProduct(dp_ineq_dk); + + // Complementarity slack stationarity: r = -p'(s)*m0 + (1 - p'(s))*m1 + // d/dkappa = -p'_kappa(s) * (m0 + m1) + Vec dp_comp_dk = retract_drelax(workspace->s_comp, relax_param); + Vec dd_p_comp_dk = retract_deriv_drelax(workspace->s_comp, relax_param); + for (int i = 0; i < prob->n_comp; i++) { + workspace->dkkt_residual_drelax(s_comp_inds[i]) = + -dd_p_comp_dk[i] * (workspace->m_comp_L[i] + workspace->m_comp_R[i]); + } + + // Inequality primal feasibility: r = ... - (s + p(-s)) - ... + // d/dkappa = -p_kappa(-s) = -retract_drelax(s) + workspace->dkkt_residual_drelax(m_ineq_inds) = -dp_ineq_dk; + + // Complementarity primal feasibility: + // row 2i += -p(s) -> d/dkappa = -p_kappa(s) + // row 2i+1 += -(p(s) - s) -> d/dkappa = -p_kappa(s) + for (int i = 0; i < prob->n_comp; i++) { + workspace->dkkt_residual_drelax(m_comp_L_inds[i]) = -dp_comp_dk[i]; + workspace->dkkt_residual_drelax(m_comp_R_inds[i]) = -dp_comp_dk[i]; + } } + else { // Alternative path for testing + // Inequality slack stationarity: r = p'(s) * (-m_ineq - p(-s)) + // d/dkappa = p'_kappa(s) * (-m_ineq - p(-s)) - p'(s) * p_kappa(-s) + Vec dd_p_ineq_dk = retract_deriv_drelax(workspace->s_ineq, relax_param); + Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); + Vec dp_ineq = retract_deriv(workspace->s_ineq, relax_param); + Vec dp_neg_ineq_dk = retract_drelax(-workspace->s_ineq, relax_param); + workspace->dkkt_residual_drelax(s_ineq_inds) = + dd_p_ineq_dk.cwiseProduct(-workspace->m_ineq - p_neg_ineq) - dp_ineq.cwiseProduct(dp_neg_ineq_dk); - // Inequality primal feasibility: r = ... - (s + p(-s)) - ... - // d/dkappa = -p_kappa(-s) = -retract_drelax(s) - workspace->dkkt_residual_drelax(m_ineq_inds) = -dp_ineq_dk; + // Complementarity slack stationarity: r = -p'(s)*m0 + p'(-s)*m1 + Vec dd_p_comp_dk = retract_deriv_drelax(workspace->s_comp, relax_param); + Vec dd_p_neg_comp_dk = retract_deriv_drelax(-workspace->s_comp, relax_param); + workspace->dkkt_residual_drelax(s_comp_inds) = + -dd_p_comp_dk.cwiseProduct(workspace->m_comp_L) + dd_p_neg_comp_dk.cwiseProduct(workspace->m_comp_R); - // Complementarity primal feasibility: - // row 2i += -p(s) -> d/dkappa = -p_kappa(s) - // row 2i+1 += -(p(s) - s) -> d/dkappa = -p_kappa(s) - for (int i = 0; i < prob->n_comp; i++) { - workspace->dkkt_residual_drelax(m_comp_L_inds[i]) = -dp_comp_dk[i]; - workspace->dkkt_residual_drelax(m_comp_R_inds[i]) = -dp_comp_dk[i]; + // Inequality primal feasibility: r = ... - p(s) - ... + workspace->dkkt_residual_drelax(m_ineq_inds) = -retract_drelax(workspace->s_ineq, relax_param); + + // Complementarity primal feasibility + workspace->dkkt_residual_drelax(m_comp_L_inds) = -retract_drelax(workspace->s_comp, relax_param); + workspace->dkkt_residual_drelax(m_comp_R_inds) = -retract_drelax(-workspace->s_comp, relax_param); } } @@ -916,18 +941,35 @@ Filter::Entry Solver::entry_from_solution(double relax_param, double penalty_par Vec m_eq_primal_feas = workspace->residual_eq - inv_penalty_param * (workspace->m_eq - workspace->m_eq_est); Vec p_ineq = retract(workspace->s_ineq, relax_param); - Vec m_ineq_primal_feas = workspace->residual_ineq - p_ineq - // p(s) - p(-s) = s + Vec m_ineq_primal_feas = workspace->residual_ineq - p_ineq - inv_penalty_param * (workspace->m_ineq - workspace->m_ineq_est); + Vec m_comp_L_primal_feas(prob->n_comp); + Vec m_comp_R_primal_feas(prob->n_comp); - Vec p_comp = retract(workspace->s_comp, relax_param); - Vec m_comp_L_primal_feas = - workspace->residual_comp_L - inv_penalty_param * (workspace->m_comp_L - workspace->m_comp_L_est); - Vec m_comp_R_primal_feas = - workspace->residual_comp_R - inv_penalty_param * (workspace->m_comp_R - workspace->m_comp_R_est); + if (options.retraction_type == 0) { // Main path, uses retraction map properties, optimized + Vec p_comp = retract(workspace->s_comp, relax_param); + m_comp_L_primal_feas = + workspace->residual_comp_L - inv_penalty_param * (workspace->m_comp_L - workspace->m_comp_L_est); + m_comp_R_primal_feas = + workspace->residual_comp_R - inv_penalty_param * (workspace->m_comp_R - workspace->m_comp_R_est); - for (int i = 0; i < prob->n_comp; i++) { - m_comp_L_primal_feas[i] += -p_comp[i]; // p(s) - m_comp_R_primal_feas[i] += -(p_comp[i] - workspace->s_comp[i]); // p(s) - p(-s) = s + for (int i = 0; i < prob->n_comp; i++) { + m_comp_L_primal_feas[i] += -p_comp[i]; // p(s) + m_comp_R_primal_feas[i] += -(p_comp[i] - workspace->s_comp[i]); // p(s) - p(-s) = s + } + } + else { // Alternate path for testing + Vec p_comp = retract(workspace->s_comp, relax_param); + Vec p_neg_comp = retract(-workspace->s_comp, relax_param); + m_comp_L_primal_feas = + workspace->residual_comp_L - inv_penalty_param * (workspace->m_comp_L - workspace->m_comp_L_est); + m_comp_R_primal_feas = + workspace->residual_comp_R - inv_penalty_param * (workspace->m_comp_R - workspace->m_comp_R_est); + + for (int i = 0; i < prob->n_comp; i++) { + m_comp_L_primal_feas[i] += -p_comp[i]; // p(s) + m_comp_R_primal_feas[i] += -p_neg_comp[i]; // p(s) - p(-s) = s + } } double candidate_constraint_violation = n_duals == 0 ? 0.0 : From d1eb81429cacf86ca72506b96140a259cb1266e3 Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Tue, 21 Jul 2026 14:55:32 -0400 Subject: [PATCH 21/35] Add relaxation derivative and filter tests --- bindings/julia_bindings.cpp | 3 +++ julia/src/Marble.jl | 6 ++++-- julia/test/runtests.jl | 36 ++++++++++++++++++++++++++++++++++-- 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/bindings/julia_bindings.cpp b/bindings/julia_bindings.cpp index 1359c56..d50e6c3 100644 --- a/bindings/julia_bindings.cpp +++ b/bindings/julia_bindings.cpp @@ -141,6 +141,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { return std::make_tuple((int)p.cost_hessian.rows(), (int)p.cost_hessian.cols(), colptr, rowval, nzval); }) .method("cost_gradient", [](Problem& p) { return to_julia(p.cost_gradient); }) + .method("cost_const", [](Problem& p) { return p.cost_const; }) .method("J_eq", [](Problem& p) { auto colptr = jlcxx::make_julia_array(p.J_eq.outerIndexPtr(), p.J_eq.outerSize() + 1); auto rowval = jlcxx::make_julia_array(p.J_eq.innerIndexPtr(), p.J_eq.nonZeros()); @@ -276,6 +277,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { auto nzval = jlcxx::make_julia_array(kkt.valuePtr(), kkt.nonZeros()); return std::make_tuple((int)kkt.rows(), (int)kkt.cols(), colptr, rowval, nzval); }) + .method("dkkt_residual_drelax", [](Workspace& w) { return to_julia(w.dkkt_residual_drelax); }) // QDLDL factorization data .method("D", [](Workspace& w) { return to_julia(w.D); }) .method("amd_perm_vec", [](Workspace& w) { return to_julia(w.amd_perm_vec); }) @@ -353,6 +355,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { }) .method("update_KKT_penalty!", &Solver::update_KKT_penalty) .method("update_KKT_primal_regularizer!", &Solver::update_KKT_primal_regularizer) + .method("update_dKKT_residual_drelax!", &Solver::update_dKKT_residual_drelax) // Factorization and backsolve .method("initialize_kkt_sparsity!", &Solver::initialize_kkt_sparsity) .method("compute_amd_ordering!", &Solver::compute_amd_ordering) diff --git a/julia/src/Marble.jl b/julia/src/Marble.jl index bc525db..0b86485 100644 --- a/julia/src/Marble.jl +++ b/julia/src/Marble.jl @@ -137,6 +137,7 @@ module Marble problem_property(problem::Marble.Problem, ::Val{:n_comp}) = Marble.n_comp(problem) problem_property(problem::Marble.Problem, ::Val{:cost_hessian}) = sparse_from_eigen(Marble.cost_hessian(problem)...) problem_property(problem::Marble.Problem, ::Val{:cost_gradient}) = Marble.cost_gradient(problem) + problem_property(problem::Marble.Problem, ::Val{:cost_const}) = Marble.cost_const(problem) problem_property(problem::Marble.Problem, ::Val{:J_eq}) = sparse_from_eigen(Marble.J_eq(problem)...) problem_property(problem::Marble.Problem, ::Val{:c_eq}) = Marble.c_eq(problem) problem_property(problem::Marble.Problem, ::Val{:J_ineq}) = sparse_from_eigen(Marble.J_ineq(problem)...) @@ -148,7 +149,7 @@ module Marble problem_property(problem::Marble.Problem, ::Val{sym}) where sym = getfield(problem, sym) Base.propertynames(problem::Marble.Problem, private::Bool=false) = - (:nz, :n_eq, :n_ineq, :n_comp, :cost_hessian, :cost_gradient, :J_eq, :c_eq, + (:nz, :n_eq, :n_ineq, :n_comp, :cost_hessian, :cost_gradient, :cost_const, :J_eq, :c_eq, :J_ineq, :c_ineq, :L_comp, :l_comp, :R_comp, :r_comp, fieldnames(typeof(problem))...) ## Accessors for workspace members @@ -166,6 +167,7 @@ module Marble workspace_property(workspace::Marble.Workspace, ::Val{:m_comp_L_est}) = Marble.m_comp_L_est(workspace) workspace_property(workspace::Marble.Workspace, ::Val{:m_comp_R_est}) = Marble.m_comp_R_est(workspace) workspace_property(workspace::Marble.Workspace, ::Val{:kkt_residual}) = Marble.kkt_residual(workspace) + workspace_property(workspace::Marble.Workspace, ::Val{:dkkt_residual_drelax}) = Marble.dkkt_residual_drelax(workspace) workspace_property(workspace::Marble.Workspace, ::Val{:kkt_system}) = sparse_from_eigen(Marble.kkt_system(workspace)...) workspace_property(workspace::Marble.Workspace, ::Val{:amd_perm_vec}) = Marble.amd_perm_vec(workspace) .+ 1 workspace_property(workspace::Marble.Workspace, ::Val{:amd_iperm_vec}) = Marble.amd_iperm_vec(workspace) .+ 1 @@ -175,7 +177,7 @@ module Marble workspace_property(workspace::Marble.Workspace, ::Val{sym}) where sym = getfield(workspace, sym) Base.propertynames(workspace::Marble.Workspace, private::Bool=false) = - (:kkt_residual, :kkt_system, :solution, :z, :s_ineq, :s_comp, :m_eq, :m_ineq, :m_comp_L, :m_comp_R, :amd_perm_vec, :amd_iperm_vec, :scaling, + (:kkt_residual, :dkkt_residual_drelax, :kkt_system, :solution, :z, :s_ineq, :s_comp, :m_eq, :m_ineq, :m_comp_L, :m_comp_R, :amd_perm_vec, :amd_iperm_vec, :scaling, :m_eq_est, :m_ineq_est, :m_comp_L_est, :m_comp_R_est, :relax_param, :penalty_param, fieldnames(typeof(workspace))...) ## Accessors for result members diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index 51b183b..099a159 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -1,5 +1,4 @@ # Marble test suite -# using Test using LinearAlgebra using SparseArrays @@ -174,7 +173,7 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) m_eq_est, m_ineq_est, m_comp_L_est, m_comp_R_est = workspace.m_eq_est, workspace.m_ineq_est, workspace.m_comp_L_est, workspace.m_comp_R_est # Construct KKT residual - res = zeros(eltype(solution), length(solution)) + res = zeros(promote_type(eltype(solution), typeof(κ)), length(solution)) # z stationarity res[solver.z_inds] = H*z + g + J_eq'*m_eq + J_ineq'*m_ineq + L_comp'*m_comp_L + R_comp'*m_comp_R @@ -250,4 +249,37 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) @test isapprox(kkt_mat, test_mat, atol = 1e-10) end end + + @testset "KKT relaxation derivative" begin + solver, _ = setup_and_solve() + workspace = solver.workspace + workspace.solution .= randn(length(workspace.solution)) + κ = 1e-1 + for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) + Marble.update_settings!(solver, retraction_type = i-1) + Marble.update_dKKT_residual_drelax!(solver, κ) + @test isapprox(workspace.dkkt_residual_drelax, FD.derivative(_κ -> kkt_residual(retract_type, solver, workspace.solution, _κ, 1e1), κ), atol=1e-10) + end + end + + @testset "filter entry" begin + solver, _ = setup_and_solve() + prob, workspace = solver.problem, solver.workspace + workspace.solution .= randn(length(workspace.solution)) + + for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) + ρ, κ = 1e1, 1e-1 + Marble.update_settings!(solver, retraction_type = i-1) + Marble.update_residuals!(solver) + + res = kkt_residual(retract_type, solver, workspace.solution, κ, ρ, symmetric = false) + viols = [res[solver.m_eq_inds]; res[solver.m_ineq_inds]; res[solver.m_comp_L_inds]; res[solver.m_comp_R_inds]] + viol = norm(viols, 1)/length(viols) + obj = 0.5*workspace.z'*prob.cost_hessian*workspace.z + prob.cost_gradient'*workspace.z + prob.cost_const - + κ*sum(log.(retract(retract_type, workspace.s_ineq, κ))) + + 0.5*1/ρ*(workspace.m_eq'*workspace.m_eq + workspace.m_ineq'*workspace.m_ineq + workspace.m_comp_L'*workspace.m_comp_L + workspace.m_comp_R'*workspace.m_comp_R) + + isapprox(collect(Marble.entry_from_solution(solver, κ, ρ)), [viol; obj], atol = 1e-10) + end + end end From a2fefc8e924d7b3f0d936c55343f709d7ec9ea2b Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Tue, 21 Jul 2026 15:23:02 -0400 Subject: [PATCH 22/35] CLean up tests, speed up slightly --- julia/test/runtests.jl | 97 +++++++++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 39 deletions(-) diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index 099a159..bb0bcc2 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -29,9 +29,22 @@ function setup_and_solve(; sparse_problem = false, opts...) return solver, Marble.solve!(solver) end -retract(::Val{:Softplus}, x, κ) = 0.5*(x + sqrt.(x.^2 .+ 4*κ)) -retract(::Val{:Exp}, x, κ) = sqrt(κ)*exp.(x) -retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) +function retract(retract_type::Int, x, κ) + if retract_type == 0 + 0.5 .* (x .+ sqrt.(x.^2 .+ 4 .* κ)) + elseif retract_type == 1 + sqrt(κ) .* exp.(x) + else + sqrt(κ) .* exp.(x ./ sqrt(κ)) + end +end + +retract_deriv_fd(retract_type, x, κ) = + map(xi -> FD.derivative(t -> retract(retract_type, [t], κ)[1], xi), x) +retract_second_deriv_fd(retract_type, x, κ) = + map(xi -> FD.derivative(a -> FD.derivative(b -> retract(retract_type, [b], κ)[1], a), xi), x) +retract_deriv_drelax_fd(retract_type, x, κ) = + map(xi -> FD.derivative(_κ -> FD.derivative(t -> retract(retract_type, [t], _κ)[1], xi), κ), x) @testset "Marble" begin @testset "smoke tests" begin @@ -53,52 +66,49 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) κ = 1e-1 tol = 1e-10 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - Marble.update_settings!(solver, retraction_type = i-1) + for retract_type in 0:2 + Marble.update_settings!(solver, retraction_type = retract_type) @test isapprox(Marble.retract(solver, x, κ), retract(retract_type, x, κ), atol = tol) - @test isapprox(Marble.retract_deriv(solver, x, κ), diag(FD.jacobian(_x -> retract(retract_type, _x, κ), x)), atol=tol) - @test isapprox(Marble.retract_second_deriv(solver, x, κ), - diag(FD.jacobian(_x -> diag(FD.jacobian(_x -> retract(retract_type, _x, κ), _x)), x)), atol=tol) + @test isapprox(Marble.retract_deriv(solver, x, κ), retract_deriv_fd(retract_type, x, κ), atol=tol) + @test isapprox(Marble.retract_second_deriv(solver, x, κ), + retract_second_deriv_fd(retract_type, x, κ), atol=tol) @test isapprox(Marble.retract_drelax(solver, x, κ), FD.derivative(_κ -> retract(retract_type, x, _κ), κ), atol=tol) - @test isapprox(Marble.retract_deriv_drelax(solver, x, κ), FD.derivative(_κ -> diag(FD.jacobian(_x -> retract(retract_type, _x, _κ), x)), κ), atol=tol) + @test isapprox(Marble.retract_deriv_drelax(solver, x, κ), retract_deriv_drelax_fd(retract_type, x, κ), atol=tol) end end + solved = [setup_and_solve(retraction_type = i) for i in 0:2] + @testset "problem dimensions" begin - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - solver, _ = setup_and_solve(retraction_type = i-1) + for (solver, _) in solved p = solver.problem @test p.nz == 4 && p.n_eq == 1 && p.n_ineq == 1 && p.n_comp == 1 end end @testset "solves to known optimum" begin - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - solver, res = setup_and_solve(retraction_type = i-1) + for (_, res) in solved @test res.converged && isapprox(res.z, ZSTAR, atol = 1e-4) end end @testset "equality constraint satisfied" begin # x1 = 1 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - solver, res = setup_and_solve(retraction_type = i-1) + for (_, res) in solved @test abs(res.z[1] - 1.0) < 1e-4 end end @testset "inequality constraint satisfied" begin # x2 >= 1 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - solver, res = setup_and_solve(retraction_type = i-1) + for (_, res) in solved @test res.z[2] >= 1.0 - 1e-4 end end @testset "complementarity satisfied" begin # 0 <= (x3 + 1) ⟂ (x4 - 1) >= 0 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - solver, res = setup_and_solve(retraction_type = i-1) + for (_, res) in solved z = res.z a = z[3] + 1.0 b = z[4] - 1.0 @@ -107,8 +117,7 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) end @testset "objective value" begin - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - solver, res = setup_and_solve(retraction_type = i-1) + for (solver, res) in solved @test abs(Marble.obj(solver, res.z)) - 3.0 < 1e-3 end end @@ -163,14 +172,26 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) L = sparse(zeros(1, 2)), R = sparse(zeros(1, 2)), r = zeros(1)) end - function kkt_residual(retract_type, solver, solution, κ, ρ; symmetric = true) + function kkt_residual(retract_type::Int, solver, solution, κ, ρ; symmetric = true) # Extract solution, multipliers, and problem data prob, workspace = solver.problem, solver.workspace z, s_ineq, s_comp = solution[solver.z_inds], solution[solver.s_ineq_inds], solution[solver.s_comp_inds] m_eq, m_ineq, m_comp_L, m_comp_R = solution[solver.m_eq_inds], solution[solver.m_ineq_inds], solution[solver.m_comp_L_inds], solution[solver.m_comp_R_inds] - H, g, J_eq, c_eq, J_ineq, c_ineq, L_comp, l_comp, R_comp, r_comp = prob.cost_hessian, prob.cost_gradient, prob.J_eq, prob.c_eq, prob.J_ineq, prob.c_ineq, prob.L_comp, prob.l_comp, prob.R_comp, prob.r_comp - m_eq_est, m_ineq_est, m_comp_L_est, m_comp_R_est = workspace.m_eq_est, workspace.m_ineq_est, workspace.m_comp_L_est, workspace.m_comp_R_est + H = Matrix{Float64}(prob.cost_hessian) + g = Vector{Float64}(prob.cost_gradient) + J_eq = Matrix{Float64}(prob.J_eq) + c_eq = Vector{Float64}(prob.c_eq) + J_ineq = Matrix{Float64}(prob.J_ineq) + c_ineq = Vector{Float64}(prob.c_ineq) + L_comp = Matrix{Float64}(prob.L_comp) + l_comp = Vector{Float64}(prob.l_comp) + R_comp = Matrix{Float64}(prob.R_comp) + r_comp = Vector{Float64}(prob.r_comp) + m_eq_est = Vector{Float64}(workspace.m_eq_est) + m_ineq_est = Vector{Float64}(workspace.m_ineq_est) + m_comp_L_est = Vector{Float64}(workspace.m_comp_L_est) + m_comp_R_est = Vector{Float64}(workspace.m_comp_R_est) # Construct KKT residual res = zeros(promote_type(eltype(solution), typeof(κ)), length(solution)) @@ -179,17 +200,15 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) # Inequality slack stationarity p_neg_ineq = retract(retract_type, -s_ineq, κ) - dp_ineq = FD.jacobian(_x -> retract(retract_type, _x, κ), s_ineq) if symmetric - res[solver.s_ineq_inds] = dp_ineq * (-m_ineq - p_neg_ineq) + res[solver.s_ineq_inds] = retract_deriv_fd(retract_type, s_ineq, κ) .* (-m_ineq .- p_neg_ineq) else res[solver.s_ineq_inds] = -m_ineq - p_neg_ineq end # Complementarity slack stationarity - dp_comp = FD.jacobian(_x -> retract(retract_type, _x, κ), s_comp) - dp_neg_comp = FD.jacobian(_x -> retract(retract_type, _x, κ), -s_comp) - res[solver.s_comp_inds] = -dp_comp * m_comp_L + dp_neg_comp * m_comp_R + res[solver.s_comp_inds] = -retract_deriv_fd(retract_type, s_comp, κ) .* m_comp_L .+ + retract_deriv_fd(retract_type, -s_comp, κ) .* m_comp_R # Equality primal feasibility res[solver.m_eq_inds] = J_eq*z + c_eq - 1/ρ*(m_eq - m_eq_est) @@ -216,8 +235,8 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) Marble.update_residuals!(solver) tol = 1e-10 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - Marble.update_settings!(solver, retraction_type = i-1) + for retract_type in 0:2 + Marble.update_settings!(solver, retraction_type = retract_type) Marble.update_KKT_residual!(solver, κ, ρ) res = kkt_residual(retract_type, solver, workspace.solution, κ, ρ) @test isapprox(workspace.kkt_residual, res, atol=tol) @@ -231,8 +250,8 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) workspace.solution .= randn(length(workspace.solution)) ρ, κ = 1e1, 1e-1 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - Marble.update_settings!(solver, retraction_type = i-1) + for retract_type in 0:2 + Marble.update_settings!(solver, retraction_type = retract_type) Marble.update_KKT_system!(solver, κ, ρ) # Get kkt matrix from solver @@ -243,8 +262,8 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) # Compare to forward diff with symmetrizing term test_mat = FD.jacobian(_s -> kkt_residual(retract_type, solver, _s, κ, ρ; symmetric=false), workspace.solution) - dp_ineq = FD.jacobian(_x -> retract(retract_type, _x, κ), workspace.s_ineq) - test_mat[solver.s_ineq_inds, :] = dp_ineq * test_mat[solver.s_ineq_inds, :] + dp_ineq = retract_deriv_fd(retract_type, workspace.s_ineq, κ) + test_mat[solver.s_ineq_inds, :] = dp_ineq .* test_mat[solver.s_ineq_inds, :] @test isapprox(kkt_mat, test_mat, atol = 1e-10) end @@ -255,8 +274,8 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) workspace = solver.workspace workspace.solution .= randn(length(workspace.solution)) κ = 1e-1 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - Marble.update_settings!(solver, retraction_type = i-1) + for retract_type in 0:2 + Marble.update_settings!(solver, retraction_type = retract_type) Marble.update_dKKT_residual_drelax!(solver, κ) @test isapprox(workspace.dkkt_residual_drelax, FD.derivative(_κ -> kkt_residual(retract_type, solver, workspace.solution, _κ, 1e1), κ), atol=1e-10) end @@ -267,9 +286,9 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) prob, workspace = solver.problem, solver.workspace workspace.solution .= randn(length(workspace.solution)) - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) + for retract_type in 0:2 ρ, κ = 1e1, 1e-1 - Marble.update_settings!(solver, retraction_type = i-1) + Marble.update_settings!(solver, retraction_type = retract_type) Marble.update_residuals!(solver) res = kkt_residual(retract_type, solver, workspace.solution, κ, ρ, symmetric = false) From 44ee1e4cb981e520809bcfa0c34c98436146cff6 Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Wed, 22 Jul 2026 11:58:23 -0400 Subject: [PATCH 23/35] Testing hessian clamping --- bindings/julia_bindings.cpp | 3 ++- include/solver.h | 1 + julia/src/Marble.jl | 13 +++++++++++-- src/solver.cpp | 31 ++++++++++++++++++++++--------- 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/bindings/julia_bindings.cpp b/bindings/julia_bindings.cpp index d50e6c3..fc64e29 100644 --- a/bindings/julia_bindings.cpp +++ b/bindings/julia_bindings.cpp @@ -197,7 +197,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { OPTION_RW(comp_init_random, bool) OPTION_RW(comp_init_seed, int) OPTION_RW(verbosity, int) - OPTION_RW(retraction_type, int); + OPTION_RW(retraction_type, int) + OPTION_RW(clamp_hessian, bool); #undef OPTION_RW diff --git a/include/solver.h b/include/solver.h index 321142e..0c45f02 100644 --- a/include/solver.h +++ b/include/solver.h @@ -87,6 +87,7 @@ class Solver { /// 3 = + per-iteration table int verbosity{0}; int retraction_type{0}; // 0 = scaled softplus, 1 = exp + bool clamp_hessian{false}; // clamp Hessian diagonal to be non-negative (for scaled softplus retraction) Options() = default; }; diff --git a/julia/src/Marble.jl b/julia/src/Marble.jl index 0b86485..8518538 100644 --- a/julia/src/Marble.jl +++ b/julia/src/Marble.jl @@ -67,7 +67,7 @@ module Marble :max_iters, :max_iters_linesearch, :gamma_objective, :gamma_constraint, :ruiz_iterations, :inertia_warmstart, - :verbosity, :retraction_type + :verbosity, :retraction_type, :clamp_hessian ] function update_settings!(solver::Marble.Solver; kwargs...) @@ -215,13 +215,22 @@ module Marble residual_comp(solver::Marble.Solver, z::Vector{Float64}) = Marble.residual_comp(Marble.get_problem(solver), z) residual_comp(data::NamedTuple, z::Vector{Float64}) = Marble.residual_comp(Problem(data...), z) + # Helper function for getting KKT system + function get_kkt_system(workspace::Marble.Workspace) + kkt_mat = workspace.kkt_system # upper triangular + kkt_mat = kkt_mat + kkt_mat' - Diagonal(diag(kkt_mat)) # symmetric + scale_mat = spdiagm(1 ./workspace.scaling) + kkt_mat = scale_mat*kkt_mat[workspace.amd_iperm_vec, workspace.amd_iperm_vec]*scale_mat + return kkt_mat + end + # Problem construction with JuMP: MPCC, complementarity indexing, and # the conversion of an MPCC into the matrix/vector data Marble consumes. include("jump_mpcc.jl") export MPCC, complementarity_indices export reformulate_sos1, var_inds - export mpcc_to_marble + export mpcc_to_marble, get_kkt_system # Build a Marble problem from an MPCC (defined here since it depends on # both MPCC/mpcc_to_marble above and the build_problem helper). diff --git a/src/solver.cpp b/src/solver.cpp index 5da593c..ed979b6 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -587,14 +587,27 @@ void Solver::update_KKT_penalty(const double penalty_param) { void Solver::update_KKT_primal_regularizer(const double reg) { Eigen::Map nzval(workspace->kkt_system.valuePtr(), workspace->kkt_system.nonZeros()); Eigen::Ref scaling = workspace->scaling; - for (int k = 0; k < prob->nz; k++) { - nzval(z_z_inds[k]) = (prob->cost_hessian_diag[k] + reg) * scaling(z_inds[k]) * scaling(z_inds[k]); - } - for (int k = 0; k < prob->n_ineq; k++) { - nzval(s_ineq_s_ineq_inds[k]) = (workspace->s_ineq_stationarity[k] + reg) * scaling(s_ineq_inds[k]) * scaling(s_ineq_inds[k]); + if (!options.clamp_hessian) { + for (int k = 0; k < prob->nz; k++) { + nzval(z_z_inds[k]) = (prob->cost_hessian_diag[k] + reg) * scaling(z_inds[k]) * scaling(z_inds[k]); + } + for (int k = 0; k < prob->n_ineq; k++) { + nzval(s_ineq_s_ineq_inds[k]) = (workspace->s_ineq_stationarity[k] + reg) * scaling(s_ineq_inds[k]) * scaling(s_ineq_inds[k]); + } + for (int k = 0; k < prob->n_comp; k++) { + nzval(s_comp_s_comp_inds[k]) = (workspace->s_comp_stationarity[k] + reg) * scaling(s_comp_inds[k]) * scaling(s_comp_inds[k]); + } } - for (int k = 0; k < prob->n_comp; k++) { - nzval(s_comp_s_comp_inds[k]) = (workspace->s_comp_stationarity[k] + reg) * scaling(s_comp_inds[k]) * scaling(s_comp_inds[k]); + else { + for (int k = 0; k < prob->nz; k++) { + nzval(z_z_inds[k]) = std::max(prob->cost_hessian_diag[k] + reg, 1e-8) * scaling(z_inds[k]) * scaling(z_inds[k]); + } + for (int k = 0; k < prob->n_ineq; k++) { + nzval(s_ineq_s_ineq_inds[k]) = std::max(workspace->s_ineq_stationarity[k] + reg, 1e-8) * scaling(s_ineq_inds[k]) * scaling(s_ineq_inds[k]); + } + for (int k = 0; k < prob->n_comp; k++) { + nzval(s_comp_s_comp_inds[k]) = std::max(workspace->s_comp_stationarity[k] + reg, 1e-8) * scaling(s_comp_inds[k]) * scaling(s_comp_inds[k]); + } } } @@ -961,9 +974,9 @@ Filter::Entry Solver::entry_from_solution(double relax_param, double penalty_par else { // Alternate path for testing Vec p_comp = retract(workspace->s_comp, relax_param); Vec p_neg_comp = retract(-workspace->s_comp, relax_param); - m_comp_L_primal_feas = + m_comp_L_primal_feas = workspace->residual_comp_L - inv_penalty_param * (workspace->m_comp_L - workspace->m_comp_L_est); - m_comp_R_primal_feas = + Vec m_comp_R_primal_feas = workspace->residual_comp_R - inv_penalty_param * (workspace->m_comp_R - workspace->m_comp_R_est); for (int i = 0; i < prob->n_comp; i++) { From 0f0c1f540d037e1728f54d0d4102f919d2d0ba82 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Wed, 22 Jul 2026 16:28:56 -0400 Subject: [PATCH 24/35] clamp only the s_comp_stationary block of the AL hessian --- src/solver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/solver.cpp b/src/solver.cpp index ed979b6..0f7db91 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -600,10 +600,10 @@ void Solver::update_KKT_primal_regularizer(const double reg) { } else { for (int k = 0; k < prob->nz; k++) { - nzval(z_z_inds[k]) = std::max(prob->cost_hessian_diag[k] + reg, 1e-8) * scaling(z_inds[k]) * scaling(z_inds[k]); + nzval(z_z_inds[k]) = (prob->cost_hessian_diag[k] + reg) * scaling(z_inds[k]) * scaling(z_inds[k]); } for (int k = 0; k < prob->n_ineq; k++) { - nzval(s_ineq_s_ineq_inds[k]) = std::max(workspace->s_ineq_stationarity[k] + reg, 1e-8) * scaling(s_ineq_inds[k]) * scaling(s_ineq_inds[k]); + nzval(s_ineq_s_ineq_inds[k]) = (workspace->s_ineq_stationarity[k] + reg) * scaling(s_ineq_inds[k]) * scaling(s_ineq_inds[k]); } for (int k = 0; k < prob->n_comp; k++) { nzval(s_comp_s_comp_inds[k]) = std::max(workspace->s_comp_stationarity[k] + reg, 1e-8) * scaling(s_comp_inds[k]) * scaling(s_comp_inds[k]); From a92408736d0158915bc8c9e7e775c60b54ff4895 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Wed, 22 Jul 2026 17:01:46 -0400 Subject: [PATCH 25/35] use enums for retraction type --- CMakeLists.txt | 20 +- bindings/julia_bindings.cpp | 9 +- bindings/python_bindings.cpp | 7 + include/solver.h | 18 +- julia/test/runtests.jl | 49 ++--- python/marble/__init__.py | 10 +- python/marble/_core.pyi | 344 ++++++++++++++++++++++++++--------- src/solver.cpp | 72 ++++---- 8 files changed, 368 insertions(+), 161 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82f7007..26020d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,13 +105,25 @@ if(MARBLE_BUILD_PYTHON) # Python `marble` package (python/marble/) wraps it with the high-level API. pybind11_add_module(marble_python MODULE bindings/python_bindings.cpp) target_link_libraries(marble_python PRIVATE marble) + + # A plain CMake build writes the extension straight into the source package, + # so anything with python/ on sys.path imports the module just built — no + # copy step to keep in sync. A wheel build (scikit-build-core sets SKBUILD) + # keeps its output in the build tree and installs it via install(TARGETS). + # Build wheels from a clean tree: scikit-build-core copies python/marble/ + # wholesale, so an in-place _core*.so left there rides along into the wheel. + if(SKBUILD) + set(MARBLE_PYTHON_OUTPUT_DIR ${CMAKE_BINARY_DIR}/python/marble) + else() + set(MARBLE_PYTHON_OUTPUT_DIR ${CMAKE_SOURCE_DIR}/python/marble) + endif() set_target_properties(marble_python PROPERTIES OUTPUT_NAME _core - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/python/marble + LIBRARY_OUTPUT_DIRECTORY ${MARBLE_PYTHON_OUTPUT_DIR} ) - # Stage the pure Python package next to the freshly built extension so that - # adding build/python to sys.path is enough to `import marble` from the tree. + # Stage the package (extension included) so that adding build/python to + # sys.path is enough to `import marble` from the tree — see the Dockerfile. add_custom_command(TARGET marble_python POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/python/marble ${CMAKE_BINARY_DIR}/python/marble @@ -125,7 +137,7 @@ if(MARBLE_BUILD_PYTHON) if(PYBIND11_STUBGEN) add_custom_command(TARGET marble_python POST_BUILD COMMAND ${CMAKE_COMMAND} -E env - PYTHONPATH=${CMAKE_BINARY_DIR}/python + PYTHONPATH=${MARBLE_PYTHON_OUTPUT_DIR}/.. ${PYBIND11_STUBGEN} marble._core --output-dir ${CMAKE_SOURCE_DIR}/python --numpy-array-remove-parameters diff --git a/bindings/julia_bindings.cpp b/bindings/julia_bindings.cpp index fc64e29..10f2f09 100644 --- a/bindings/julia_bindings.cpp +++ b/bindings/julia_bindings.cpp @@ -79,6 +79,11 @@ static SMat csc_to_smat(int rows, int cols, JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { + mod.add_bits("RetractionType", jlcxx::julia_type("CppEnum")); + mod.set_const("Softplus", RetractionType::Softplus); + mod.set_const("Exp", RetractionType::Exp); + mod.set_const("ScaledExp", RetractionType::ScaledExp); + mod.add_type("Problem") .constructor([](jlcxx::ArrayRef cost_hessian, jlcxx::ArrayRef cost_gradient, @@ -197,8 +202,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { OPTION_RW(comp_init_random, bool) OPTION_RW(comp_init_seed, int) OPTION_RW(verbosity, int) - OPTION_RW(retraction_type, int) - OPTION_RW(clamp_hessian, bool); + OPTION_RW(retraction_type, RetractionType) + OPTION_RW(clamp_hessian, bool); #undef OPTION_RW diff --git a/bindings/python_bindings.cpp b/bindings/python_bindings.cpp index 3830be2..b2e85db 100644 --- a/bindings/python_bindings.cpp +++ b/bindings/python_bindings.cpp @@ -149,6 +149,11 @@ PYBIND11_MODULE(_core, m) { + " factorizations=" + std::to_string(r.factorizations) + ">"; }); + py::enum_(m, "RetractionType") + .value("Softplus", RetractionType::Softplus, "p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa))") + .value("Exp", RetractionType::Exp, "p(s) = sqrt(kappa) * exp(s)") + .value("ScaledExp", RetractionType::ScaledExp, "p(s) = sqrt(kappa) * exp(s / sqrt(kappa))"); + py::class_(m, "SolverOptions") .def(py::init<>()) .def_readwrite("convergence_kkt_norm", &Solver::Options::convergence_kkt_norm) @@ -171,6 +176,8 @@ PYBIND11_MODULE(_core, m) { .def_readwrite("comp_init_random", &Solver::Options::comp_init_random) .def_readwrite("comp_init_seed", &Solver::Options::comp_init_seed) .def_readwrite("verbosity", &Solver::Options::verbosity) + .def_readwrite("retraction_type", &Solver::Options::retraction_type) + .def_readwrite("clamp_hessian", &Solver::Options::clamp_hessian) .def("__repr__", [](const Solver::Options& o) { return ""; diff --git a/include/solver.h b/include/solver.h index 0c45f02..8a561f8 100644 --- a/include/solver.h +++ b/include/solver.h @@ -12,9 +12,19 @@ namespace spdlog { class logger; } +/** + * Retraction map p(s) used for the inequality and complementarity slacks, + * with kappa = relaxation parameter. + */ +enum class RetractionType : int { + Softplus = 0, /** p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa)) */ + Exp = 1, /** p(s) = sqrt(kappa) * exp(s) */ + ScaledExp = 2, /** p(s) = sqrt(kappa) * exp(s / sqrt(kappa)) */ +}; + /** * A brief description of your class. - * + * * A more detailed description of what the class does. */ struct SolveResult { @@ -86,8 +96,10 @@ class Solver { /// 2 = + solver setup header /// 3 = + per-iteration table int verbosity{0}; - int retraction_type{0}; // 0 = scaled softplus, 1 = exp - bool clamp_hessian{false}; // clamp Hessian diagonal to be non-negative (for scaled softplus retraction) + /// Retraction map used for the inequality and complementarity slacks + RetractionType retraction_type{RetractionType::Softplus}; + /// Clamp Hessian diagonal to be non-negative (for the softplus retraction) + bool clamp_hessian{false}; Options() = default; }; diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index 099a159..b82842a 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -33,6 +33,11 @@ retract(::Val{:Softplus}, x, κ) = 0.5*(x + sqrt.(x.^2 .+ 4*κ)) retract(::Val{:Exp}, x, κ) = sqrt(κ)*exp.(x) retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) +# Each solver retraction enum paired with the reference implementation above +const RETRACTIONS = [(Marble.Softplus, Val(:Softplus)), + (Marble.Exp, Val(:Exp)), + (Marble.ScaledExp, Val(:ScaledExp))] + @testset "Marble" begin @testset "smoke tests" begin solver, _ = setup_and_solve() @@ -53,8 +58,8 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) κ = 1e-1 tol = 1e-10 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - Marble.update_settings!(solver, retraction_type = i-1) + for (retract_enum, retract_type) in RETRACTIONS + Marble.update_settings!(solver, retraction_type = retract_enum) @test isapprox(Marble.retract(solver, x, κ), retract(retract_type, x, κ), atol = tol) @test isapprox(Marble.retract_deriv(solver, x, κ), diag(FD.jacobian(_x -> retract(retract_type, _x, κ), x)), atol=tol) @test isapprox(Marble.retract_second_deriv(solver, x, κ), @@ -65,40 +70,40 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) end @testset "problem dimensions" begin - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - solver, _ = setup_and_solve(retraction_type = i-1) + for (retract_enum, retract_type) in RETRACTIONS + solver, _ = setup_and_solve(retraction_type = retract_enum) p = solver.problem @test p.nz == 4 && p.n_eq == 1 && p.n_ineq == 1 && p.n_comp == 1 end end @testset "solves to known optimum" begin - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - solver, res = setup_and_solve(retraction_type = i-1) + for (retract_enum, retract_type) in RETRACTIONS + solver, res = setup_and_solve(retraction_type = retract_enum) @test res.converged && isapprox(res.z, ZSTAR, atol = 1e-4) end end @testset "equality constraint satisfied" begin # x1 = 1 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - solver, res = setup_and_solve(retraction_type = i-1) + for (retract_enum, retract_type) in RETRACTIONS + solver, res = setup_and_solve(retraction_type = retract_enum) @test abs(res.z[1] - 1.0) < 1e-4 end end @testset "inequality constraint satisfied" begin # x2 >= 1 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - solver, res = setup_and_solve(retraction_type = i-1) + for (retract_enum, retract_type) in RETRACTIONS + solver, res = setup_and_solve(retraction_type = retract_enum) @test res.z[2] >= 1.0 - 1e-4 end end @testset "complementarity satisfied" begin # 0 <= (x3 + 1) ⟂ (x4 - 1) >= 0 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - solver, res = setup_and_solve(retraction_type = i-1) + for (retract_enum, retract_type) in RETRACTIONS + solver, res = setup_and_solve(retraction_type = retract_enum) z = res.z a = z[3] + 1.0 b = z[4] - 1.0 @@ -107,8 +112,8 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) end @testset "objective value" begin - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - solver, res = setup_and_solve(retraction_type = i-1) + for (retract_enum, retract_type) in RETRACTIONS + solver, res = setup_and_solve(retraction_type = retract_enum) @test abs(Marble.obj(solver, res.z)) - 3.0 < 1e-3 end end @@ -216,8 +221,8 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) Marble.update_residuals!(solver) tol = 1e-10 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - Marble.update_settings!(solver, retraction_type = i-1) + for (retract_enum, retract_type) in RETRACTIONS + Marble.update_settings!(solver, retraction_type = retract_enum) Marble.update_KKT_residual!(solver, κ, ρ) res = kkt_residual(retract_type, solver, workspace.solution, κ, ρ) @test isapprox(workspace.kkt_residual, res, atol=tol) @@ -231,8 +236,8 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) workspace.solution .= randn(length(workspace.solution)) ρ, κ = 1e1, 1e-1 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - Marble.update_settings!(solver, retraction_type = i-1) + for (retract_enum, retract_type) in RETRACTIONS + Marble.update_settings!(solver, retraction_type = retract_enum) Marble.update_KKT_system!(solver, κ, ρ) # Get kkt matrix from solver @@ -255,8 +260,8 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) workspace = solver.workspace workspace.solution .= randn(length(workspace.solution)) κ = 1e-1 - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) - Marble.update_settings!(solver, retraction_type = i-1) + for (retract_enum, retract_type) in RETRACTIONS + Marble.update_settings!(solver, retraction_type = retract_enum) Marble.update_dKKT_residual_drelax!(solver, κ) @test isapprox(workspace.dkkt_residual_drelax, FD.derivative(_κ -> kkt_residual(retract_type, solver, workspace.solution, _κ, 1e1), κ), atol=1e-10) end @@ -267,9 +272,9 @@ retract(::Val{:ScaledExp}, x, κ) = sqrt(κ)*exp.(x./sqrt(κ)) prob, workspace = solver.problem, solver.workspace workspace.solution .= randn(length(workspace.solution)) - for (i, retract_type) in enumerate([Val(:Softplus), Val(:Exp), Val(:ScaledExp)]) + for (retract_enum, retract_type) in RETRACTIONS ρ, κ = 1e1, 1e-1 - Marble.update_settings!(solver, retraction_type = i-1) + Marble.update_settings!(solver, retraction_type = retract_enum) Marble.update_residuals!(solver) res = kkt_residual(retract_type, solver, workspace.solution, κ, ρ, symmetric = false) diff --git a/python/marble/__init__.py b/python/marble/__init__.py index 4f0d909..b2526f3 100644 --- a/python/marble/__init__.py +++ b/python/marble/__init__.py @@ -5,7 +5,15 @@ import numpy as np from . import _core -from ._core import Filter, FilterEntry, Problem, SolveResult, SolverOptions, Workspace +from ._core import ( + Filter, + FilterEntry, + Problem, + RetractionType, + SolveResult, + SolverOptions, + Workspace, +) def _scipy_sparse(): diff --git a/python/marble/_core.pyi b/python/marble/_core.pyi index b5a1c9d..aa6250a 100644 --- a/python/marble/_core.pyi +++ b/python/marble/_core.pyi @@ -3,15 +3,16 @@ Marble compiled core: constrained optimization solver with complementarity const """ from __future__ import annotations import numpy +import numpy.typing import scipy.sparse import typing -__all__: list[str] = ['Filter', 'FilterEntry', 'Problem', 'SolveResult', 'Solver', 'SolverOptions', 'Workspace'] +__all__: list[str] = ['Filter', 'FilterEntry', 'Problem', 'RetractionType', 'SolveResult', 'Solver', 'SolverOptions', 'Workspace'] class Filter: @typing.overload def __init__(self) -> None: ... @typing.overload - def __init__(self, gamma_objective: float, gamma_constraint: float) -> None: + def __init__(self, gamma_objective: typing.SupportsFloat | typing.SupportsIndex, gamma_constraint: typing.SupportsFloat | typing.SupportsIndex) -> None: ... def acceptable(self, candidate: FilterEntry) -> bool: ... @@ -32,53 +33,66 @@ class Filter: def size(self) -> int: ... class FilterEntry: - feas: float - merit: float def __init__(self) -> None: ... def __repr__(self) -> str: ... + @property + def feas(self) -> float: + ... + @feas.setter + def feas(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def merit(self) -> float: + ... + @merit.setter + def merit(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... class Problem: @typing.overload - def __init__(self, cost_hessian: numpy.ndarray, cost_gradient: numpy.ndarray, cost_const: float, J_eq: numpy.ndarray, c_eq: numpy.ndarray, J_ineq: numpy.ndarray, c_ineq: numpy.ndarray, L: numpy.ndarray, l: numpy.ndarray, R: numpy.ndarray, r: numpy.ndarray) -> None: + def __init__(self, cost_hessian: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, n]"], cost_gradient: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"], cost_const: typing.SupportsFloat | typing.SupportsIndex, J_eq: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, n]"], c_eq: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"], J_ineq: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, n]"], c_ineq: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"], L: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, n]"], l: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"], R: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, n]"], r: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"]) -> None: ... @typing.overload - def __init__(self, cost_hessian: scipy.sparse.csc_matrix, cost_gradient: numpy.ndarray, cost_const: float, J_eq: scipy.sparse.csc_matrix, c_eq: numpy.ndarray, J_ineq: scipy.sparse.csc_matrix, c_ineq: numpy.ndarray, L: scipy.sparse.csc_matrix, l: numpy.ndarray, R: scipy.sparse.csc_matrix, r: numpy.ndarray) -> None: + def __init__(self, cost_hessian: scipy.sparse.csc_matrix, cost_gradient: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"], cost_const: typing.SupportsFloat | typing.SupportsIndex, J_eq: scipy.sparse.csc_matrix, c_eq: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"], J_ineq: scipy.sparse.csc_matrix, c_ineq: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"], L: scipy.sparse.csc_matrix, l: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"], R: scipy.sparse.csc_matrix, r: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"]) -> None: ... - def obj(self, z: numpy.ndarray) -> float: + def obj(self, z: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"]) -> float: ... - def residual_comp(self, z: numpy.ndarray) -> numpy.ndarray: + def residual_comp(self, z: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... - def residual_eq(self, z: numpy.ndarray) -> numpy.ndarray: + def residual_eq(self, z: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... - def residual_ineq(self, z: numpy.ndarray) -> numpy.ndarray: + def residual_ineq(self, z: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def J_comp(self) -> tuple: + def J_eq(self) -> tuple[int, int, typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]]: ... @property - def J_eq(self) -> tuple: + def J_ineq(self) -> tuple[int, int, typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]]: ... @property - def J_ineq(self) -> tuple: + def L_comp(self) -> tuple[int, int, typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]]: ... @property - def c_comp(self) -> numpy.ndarray: + def R_comp(self) -> tuple[int, int, typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]]: ... @property - def c_eq(self) -> numpy.ndarray: + def c_eq(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def c_ineq(self) -> numpy.ndarray: + def c_ineq(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property def cost_const(self) -> float: ... @property - def cost_gradient(self) -> numpy.ndarray: + def cost_gradient(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def cost_hessian(self) -> tuple: + def cost_hessian(self) -> tuple[int, int, typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]]: + ... + @property + def l_comp(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property def n_comp(self) -> int: @@ -92,6 +106,49 @@ class Problem: @property def nz(self) -> int: ... + @property + def r_comp(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: + ... +class RetractionType: + """ + Members: + + Softplus : p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa)) + + Exp : p(s) = sqrt(kappa) * exp(s) + + ScaledExp : p(s) = sqrt(kappa) * exp(s / sqrt(kappa)) + """ + Exp: typing.ClassVar[RetractionType] # value = + ScaledExp: typing.ClassVar[RetractionType] # value = + Softplus: typing.ClassVar[RetractionType] # value = + __members__: typing.ClassVar[dict[str, RetractionType]] # value = {'Softplus': , 'Exp': , 'ScaledExp': } + def __eq__(self, other: typing.Any) -> bool: + ... + def __getstate__(self) -> int: + ... + def __hash__(self) -> int: + ... + def __index__(self) -> int: + ... + def __init__(self, value: typing.SupportsInt | typing.SupportsIndex) -> None: + ... + def __int__(self) -> int: + ... + def __ne__(self, other: typing.Any) -> bool: + ... + def __repr__(self) -> str: + ... + def __setstate__(self, state: typing.SupportsInt | typing.SupportsIndex) -> None: + ... + def __str__(self) -> str: + ... + @property + def name(self) -> str: + ... + @property + def value(self) -> int: + ... class SolveResult: def __repr__(self) -> str: ... @@ -111,19 +168,22 @@ class SolveResult: def iterations_outer(self) -> int: ... @property - def m_comp(self) -> numpy.ndarray: + def m_comp_L(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: + ... + @property + def m_comp_R(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def m_eq(self) -> numpy.ndarray: + def m_eq(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def m_ineq(self) -> numpy.ndarray: + def m_ineq(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def s_comp(self) -> numpy.ndarray: + def s_comp(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def s_ineq(self) -> numpy.ndarray: + def s_ineq(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property def setup_time_s(self) -> float: @@ -132,24 +192,24 @@ class SolveResult: def solve_time_s(self) -> float: ... @property - def z(self) -> numpy.ndarray: + def z(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... class Solver: def __init__(self) -> None: ... def analytical_factorization(self) -> bool: ... - def backsolve(self, b: numpy.ndarray) -> numpy.ndarray: + def backsolve(self, b: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... def check_inertia(self) -> bool: ... def compute_amd_ordering(self) -> None: ... - def convergence(self, options: SolverOptions) -> bool: + def convergence(self) -> bool: ... - def entry_from_solution(self, relax_param: float, inv_penalty_param: float) -> tuple: + def entry_from_solution(self, relax_param: typing.SupportsFloat | typing.SupportsIndex, penalty_param: typing.SupportsFloat | typing.SupportsIndex) -> tuple[float, float]: ... - def filter_linesearch(self, relax_param: float, inv_penalty_param: float, max_iters: int) -> bool: + def filter_linesearch(self, relax_param: typing.SupportsFloat | typing.SupportsIndex, penalty_param: typing.SupportsFloat | typing.SupportsIndex, max_iters: typing.SupportsInt | typing.SupportsIndex) -> bool: ... def get_filter(self) -> Filter: ... @@ -163,44 +223,43 @@ class Solver: ... def numerical_factorization(self) -> bool: ... - def retract(self, s: numpy.ndarray, relax_param: float) -> numpy.ndarray: + def retract(self, s: typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"], relax_param: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... - def retract_deriv(self, s: numpy.ndarray, relax_param: float) -> numpy.ndarray: + def retract_deriv(self, s: typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"], relax_param: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... - def retract_second_deriv(self, s: numpy.ndarray, relax_param: float) -> numpy.ndarray: + def retract_second_deriv(self, s: typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"], relax_param: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... - def ruiz_equilibration(self, niter: int) -> numpy.ndarray: + def ruiz_equilibration(self, niter: typing.SupportsInt | typing.SupportsIndex) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... def set_problem(self, problem: Problem, options: SolverOptions) -> None: ... def solve(self) -> SolveResult: ... - def update_KKT_comp(self, s_comp: numpy.ndarray, m_comp: numpy.ndarray, relax_param: float) -> None: + def update_KKT_comp(self, s_comp: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"], m_comp_L: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"], m_comp_R: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"], relax_param: typing.SupportsFloat | typing.SupportsIndex) -> None: ... - def update_KKT_ineq(self, s_ineq: numpy.ndarray, relax_param: float) -> None: + def update_KKT_ineq(self, s_ineq: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[m, 1]"], relax_param: typing.SupportsFloat | typing.SupportsIndex) -> None: ... - def update_KKT_penalty(self, inv_penalty_param: float) -> None: + def update_KKT_penalty(self, penalty_param: typing.SupportsFloat | typing.SupportsIndex) -> None: ... - def update_KKT_primal_regularizer(self, reg: float) -> None: + def update_KKT_primal_regularizer(self, reg: typing.SupportsFloat | typing.SupportsIndex) -> None: ... - def update_KKT_residual(self, relax_param: float, inv_penalty_param: float) -> None: + def update_KKT_residual(self, relax_param: typing.SupportsFloat | typing.SupportsIndex, penalty_param: typing.SupportsFloat | typing.SupportsIndex) -> None: ... - def update_KKT_system(self, relax_param: float, inv_penalty_param: float) -> None: + def update_KKT_system(self, relax_param: typing.SupportsFloat | typing.SupportsIndex, penalty_param: typing.SupportsFloat | typing.SupportsIndex) -> None: ... - @property - def comp_L_inds(self) -> numpy.ndarray: + def update_residuals(self) -> None: ... @property - def comp_R_inds(self) -> numpy.ndarray: + def m_comp_L_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: ... @property - def m_comp_inds(self) -> numpy.ndarray: + def m_comp_R_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: ... @property - def m_eq_inds(self) -> numpy.ndarray: + def m_eq_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: ... @property - def m_ineq_inds(self) -> numpy.ndarray: + def m_ineq_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: ... @property def n_duals(self) -> int: @@ -212,89 +271,191 @@ class Solver: def n_vars(self) -> int: ... @property - def s_comp_inds(self) -> numpy.ndarray: + def s_comp_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: ... @property - def s_comp_m_comp_inds(self) -> numpy.ndarray: + def s_comp_m_comp_L_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: ... @property - def s_comp_s_comp_inds(self) -> numpy.ndarray: + def s_comp_m_comp_R_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: ... @property - def s_ineq_inds(self) -> numpy.ndarray: + def s_comp_s_comp_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: ... @property - def s_ineq_m_ineq_inds(self) -> numpy.ndarray: + def s_ineq_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: ... @property - def s_ineq_s_ineq_inds(self) -> numpy.ndarray: + def s_ineq_m_ineq_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: ... @property - def z_inds(self) -> numpy.ndarray: + def s_ineq_s_ineq_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: ... @property - def z_z_inds(self) -> numpy.ndarray: + def z_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: + ... + @property + def z_z_inds(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"]: ... class SolverOptions: - convergence_comp_violation: float - convergence_eq_violation: float - convergence_ineq_violation: float - convergence_kkt_norm: float - gamma_constraint: float - gamma_objective: float + clamp_hessian: bool + comp_init_random: bool inertia_warmstart: bool - max_iters: int - max_iters_linesearch: int - outer_step_kkt_norm: float - penalty_initial: float - penalty_max: float - penalty_scaling: float - print_every: int - relaxation_initial: float - relaxation_min: float - relaxation_scaling: float - ruiz_iterations: int - verbosity: int + retraction_type: RetractionType def __init__(self) -> None: ... def __repr__(self) -> str: ... + @property + def comp_init_seed(self) -> int: + ... + @comp_init_seed.setter + def comp_init_seed(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None: + ... + @property + def convergence_comp_violation(self) -> float: + ... + @convergence_comp_violation.setter + def convergence_comp_violation(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def convergence_eq_violation(self) -> float: + ... + @convergence_eq_violation.setter + def convergence_eq_violation(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def convergence_ineq_violation(self) -> float: + ... + @convergence_ineq_violation.setter + def convergence_ineq_violation(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def convergence_kkt_norm(self) -> float: + ... + @convergence_kkt_norm.setter + def convergence_kkt_norm(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def gamma_constraint(self) -> float: + ... + @gamma_constraint.setter + def gamma_constraint(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def gamma_objective(self) -> float: + ... + @gamma_objective.setter + def gamma_objective(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def max_iters(self) -> int: + ... + @max_iters.setter + def max_iters(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None: + ... + @property + def max_iters_linesearch(self) -> int: + ... + @max_iters_linesearch.setter + def max_iters_linesearch(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None: + ... + @property + def outer_step_kkt_norm(self) -> float: + ... + @outer_step_kkt_norm.setter + def outer_step_kkt_norm(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def penalty_initial(self) -> float: + ... + @penalty_initial.setter + def penalty_initial(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def penalty_max(self) -> float: + ... + @penalty_max.setter + def penalty_max(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def penalty_scaling(self) -> float: + ... + @penalty_scaling.setter + def penalty_scaling(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def relaxation_initial(self) -> float: + ... + @relaxation_initial.setter + def relaxation_initial(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def relaxation_min(self) -> float: + ... + @relaxation_min.setter + def relaxation_min(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def relaxation_scaling(self) -> float: + ... + @relaxation_scaling.setter + def relaxation_scaling(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: + ... + @property + def ruiz_iterations(self) -> int: + ... + @ruiz_iterations.setter + def ruiz_iterations(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None: + ... + @property + def verbosity(self) -> int: + ... + @verbosity.setter + def verbosity(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None: + ... class Workspace: @property - def D(self) -> numpy.ndarray: + def D(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def amd_iperm_vec(self) -> numpy.ndarray: + def amd_iperm_vec(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int64], "[m, 1]"]: ... @property - def amd_perm_vec(self) -> numpy.ndarray: + def amd_perm_vec(self) -> typing.Annotated[numpy.typing.NDArray[numpy.int64], "[m, 1]"]: ... @property - def kkt_residual(self) -> numpy.ndarray: + def kkt_residual(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def kkt_system(self) -> tuple: + def kkt_system(self) -> tuple[int, int, typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]]: ... @property - def m_comp(self) -> numpy.ndarray: + def m_comp_L(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def m_comp_est(self) -> numpy.ndarray: + def m_comp_L_est(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def m_eq(self) -> numpy.ndarray: + def m_comp_R(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def m_eq_est(self) -> numpy.ndarray: + def m_comp_R_est(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def m_ineq(self) -> numpy.ndarray: + def m_eq(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def m_ineq_est(self) -> numpy.ndarray: + def m_eq_est(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def newton_step(self) -> numpy.ndarray: + def m_ineq(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: + ... + @property + def m_ineq_est(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: + ... + @property + def newton_step(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property def penalty_param(self) -> float: @@ -303,26 +464,29 @@ class Workspace: def relax_param(self) -> float: ... @property - def residual_comp(self) -> numpy.ndarray: + def residual_comp_L(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: + ... + @property + def residual_comp_R(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def residual_eq(self) -> numpy.ndarray: + def residual_eq(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def residual_ineq(self) -> numpy.ndarray: + def residual_ineq(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def s_comp(self) -> numpy.ndarray: + def s_comp(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def s_ineq(self) -> numpy.ndarray: + def s_ineq(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def scaling(self) -> numpy.ndarray: + def scaling(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def solution(self) -> numpy.ndarray: + def solution(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... @property - def z(self) -> numpy.ndarray: + def z(self) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"]: ... diff --git a/src/solver.cpp b/src/solver.cpp index 0f7db91..fec3d53 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -93,15 +93,15 @@ namespace { Vec Solver::retract(const Eigen::Ref& s, double relax_param) const { // Vectorized retraction map for both inequality and complementarity slacks // p(s) = 0.5 * (s + sqrt(s^2 + 4*kappa)), kappa = relax_param - if (options.retraction_type == 0) { + if (options.retraction_type == RetractionType::Softplus) { const double four_kappa = 4.0 * relax_param; return (0.5 * (s.array() + (s.array().square() + four_kappa).sqrt())).matrix(); } - else if (options.retraction_type == 1) { + else if (options.retraction_type == RetractionType::Exp) { const double sqrt_kappa = std::sqrt(relax_param); return sqrt_kappa * s.array().exp(); } - else if (options.retraction_type == 2) { + else if (options.retraction_type == RetractionType::ScaledExp) { const double sqrt_kappa = std::sqrt(relax_param); return sqrt_kappa * (s.array() / sqrt_kappa).exp(); } @@ -113,15 +113,15 @@ Vec Solver::retract(const Eigen::Ref& s, double relax_param) const { Vec Solver::retract_deriv(const Eigen::Ref& s, double relax_param) const { // Derivative of the vectorized retraction map above // p'(s) = 0.5 * (1 + s / sqrt(s^2 + 4*kappa)) - if (options.retraction_type == 0) { + if (options.retraction_type == RetractionType::Softplus) { const double four_kappa = 4.0 * relax_param; return (0.5 * (1.0 + s.array() / (s.array().square() + four_kappa).sqrt())).matrix(); } - else if (options.retraction_type == 1) { + else if (options.retraction_type == RetractionType::Exp) { const double sqrt_kappa = std::sqrt(relax_param); return sqrt_kappa * s.array().exp(); } - else if (options.retraction_type == 2) { + else if (options.retraction_type == RetractionType::ScaledExp) { const double sqrt_kappa = std::sqrt(relax_param); return (s.array() / sqrt_kappa).exp(); } @@ -133,15 +133,15 @@ Vec Solver::retract_deriv(const Eigen::Ref& s, double relax_param) co Vec Solver::retract_second_deriv(const Eigen::Ref& s, double relax_param) const { // Second derivative of the vectorized retraction map above // p''(s) = 2*kappa / (s^2 + 4*kappa)^(3/2) - if (options.retraction_type == 0) { + if (options.retraction_type == RetractionType::Softplus) { const double kappa = relax_param; return (2.0 * kappa * (s.array().square() + 4.0 * kappa).pow(-1.5)).matrix(); } - else if (options.retraction_type == 1) { + else if (options.retraction_type == RetractionType::Exp) { const double sqrt_kappa = std::sqrt(relax_param); return sqrt_kappa * s.array().exp(); } - else if (options.retraction_type == 2) { + else if (options.retraction_type == RetractionType::ScaledExp) { const double sqrt_kappa = std::sqrt(relax_param); return (s.array() / sqrt_kappa).exp() / sqrt_kappa; } @@ -153,15 +153,15 @@ Vec Solver::retract_second_deriv(const Eigen::Ref& s, double relax_pa Vec Solver::retract_drelax(const Eigen::Ref& s, double relax_param) const { // Derivative of the retraction map wrt the relaxation parameter kappa = relax_param // dp/dkappa = 1 / sqrt(s^2 + 4*kappa) - if (options.retraction_type == 0) { + if (options.retraction_type == RetractionType::Softplus) { const double four_kappa = 4.0 * relax_param; return (s.array().square() + four_kappa).rsqrt().matrix(); } - else if (options.retraction_type == 1) { + else if (options.retraction_type == RetractionType::Exp) { const double sqrt_kappa = std::sqrt(relax_param); return 0.5 / sqrt_kappa * s.array().exp(); } - else if (options.retraction_type == 2) { + else if (options.retraction_type == RetractionType::ScaledExp) { const double sqrt_kappa = std::sqrt(relax_param); return (0.5 / sqrt_kappa) * (1.0 - s.array() / sqrt_kappa) * (s.array() / sqrt_kappa).exp(); } @@ -173,15 +173,15 @@ Vec Solver::retract_drelax(const Eigen::Ref& s, double relax_param) c Vec Solver::retract_deriv_drelax(const Eigen::Ref& s, double relax_param) const { // Mixed derivative of the retraction map wrt s and kappa = relax_param // d/dkappa p'(s) = -s / (s^2 + 4*kappa)^(3/2) - if (options.retraction_type == 0) { + if (options.retraction_type == RetractionType::Softplus) { const double four_kappa = 4.0 * relax_param; return (-s.array() * (s.array().square() + four_kappa).pow(-1.5)).matrix(); } - else if (options.retraction_type == 1) { + else if (options.retraction_type == RetractionType::Exp) { const double sqrt_kappa = std::sqrt(relax_param); return 0.5 / sqrt_kappa * s.array().exp(); } - else if (options.retraction_type == 2) { + else if (options.retraction_type == RetractionType::ScaledExp) { const double sqrt_kappa = std::sqrt(relax_param); return (-0.5 / (relax_param * sqrt_kappa)) * s.array() * (s.array() / sqrt_kappa).exp(); } @@ -382,7 +382,7 @@ void Solver::update_KKT_residual(double relax_param, double penalty_param) { prob->L_comp.transpose() * workspace->m_comp_L + prob->R_comp.transpose() * workspace->m_comp_R; - if (options.retraction_type == 0) { // Main path (optimized, uses softplus properties) + if (options.retraction_type == RetractionType::Softplus) { // Main path (optimized, uses softplus properties) // Inequality slack stationarity (p'(s_ineq) * (-m_ineq - p(-s_ineq))) Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); Vec d_p_ineq = retract_deriv(workspace->s_ineq, relax_param); @@ -451,7 +451,7 @@ void Solver::update_dKKT_residual_drelax(double relax_param) { // Derivative of the KKT residual wrt the relaxation parameter kappa (= relax_param). workspace->dkkt_residual_drelax.setZero(); - if (options.retraction_type == 0) { // Main path, optimized with solver properties + if (options.retraction_type == RetractionType::Softplus) { // Main path, optimized with solver properties // Inequality slack stationarity: r = p'(s) * (-m_ineq - p(-s)) // d/dkappa = p'_kappa(s) * (-m_ineq - p(-s)) - p'(s) * p_kappa(-s) // (p(-s) is even in s, so p_kappa(-s) = p_kappa(s) = retract_drelax(s)) @@ -524,7 +524,7 @@ void Solver::update_KKT_ineq(const Eigen::Ref& s_ineq, double relax_p // Ineq stationarity wrt s_ineq is d_p*d_neg_p // wrt m_ineq is -d_p // Use identity that retract_deriv(-s_ineq, relax_param) = 1 - d_p - if (options.retraction_type == 0) { + if (options.retraction_type == RetractionType::Softplus) { workspace->s_ineq_stationarity = -d_p.cwiseProduct(d_p) + d_p; // -d_p*d_neg_p (stored for diag updating) for (int i = 0; i < prob->n_ineq; i++) { nzval(s_ineq_s_ineq_inds[i]) = scaling(s_ineq_inds[i]) * workspace->s_ineq_stationarity[i] * scaling(s_ineq_inds[i]); @@ -547,7 +547,7 @@ void Solver::update_KKT_comp(const Eigen::Ref& s_comp, const Eigen::R Vec d_p = retract_deriv(s_comp, relax_param); Vec dd_p = retract_second_deriv(s_comp, relax_param); - if (options.retraction_type == 0) { + if (options.retraction_type == RetractionType::Softplus) { for (int i = 0; i < prob->n_comp; i++) { // Derivative of -p'(s)*m_L + p'(-s)*m_R wrt s // is -(p''(s)*m_L + p''(s)*m_R) but p''(s) = p''(-s) so its -p''(s)*(m_L + m_R) @@ -587,27 +587,20 @@ void Solver::update_KKT_penalty(const double penalty_param) { void Solver::update_KKT_primal_regularizer(const double reg) { Eigen::Map nzval(workspace->kkt_system.valuePtr(), workspace->kkt_system.nonZeros()); Eigen::Ref scaling = workspace->scaling; - if (!options.clamp_hessian) { - for (int k = 0; k < prob->nz; k++) { - nzval(z_z_inds[k]) = (prob->cost_hessian_diag[k] + reg) * scaling(z_inds[k]) * scaling(z_inds[k]); - } - for (int k = 0; k < prob->n_ineq; k++) { - nzval(s_ineq_s_ineq_inds[k]) = (workspace->s_ineq_stationarity[k] + reg) * scaling(s_ineq_inds[k]) * scaling(s_ineq_inds[k]); - } - for (int k = 0; k < prob->n_comp; k++) { - nzval(s_comp_s_comp_inds[k]) = (workspace->s_comp_stationarity[k] + reg) * scaling(s_comp_inds[k]) * scaling(s_comp_inds[k]); - } + + for (int k = 0; k < prob->nz; k++) { + nzval(z_z_inds[k]) = (prob->cost_hessian_diag[k] + reg) * scaling(z_inds[k]) * scaling(z_inds[k]); } - else { - for (int k = 0; k < prob->nz; k++) { - nzval(z_z_inds[k]) = (prob->cost_hessian_diag[k] + reg) * scaling(z_inds[k]) * scaling(z_inds[k]); - } - for (int k = 0; k < prob->n_ineq; k++) { - nzval(s_ineq_s_ineq_inds[k]) = (workspace->s_ineq_stationarity[k] + reg) * scaling(s_ineq_inds[k]) * scaling(s_ineq_inds[k]); - } - for (int k = 0; k < prob->n_comp; k++) { + + for (int k = 0; k < prob->n_ineq; k++) { + nzval(s_ineq_s_ineq_inds[k]) = (workspace->s_ineq_stationarity[k] + reg) * scaling(s_ineq_inds[k]) * scaling(s_ineq_inds[k]); + } + + for (int k = 0; k < prob->n_comp; k++) { + if (!options.clamp_hessian) + nzval(s_comp_s_comp_inds[k]) = (workspace->s_comp_stationarity[k] + reg) * scaling(s_comp_inds[k]) * scaling(s_comp_inds[k]); + else nzval(s_comp_s_comp_inds[k]) = std::max(workspace->s_comp_stationarity[k] + reg, 1e-8) * scaling(s_comp_inds[k]) * scaling(s_comp_inds[k]); - } } } @@ -926,6 +919,7 @@ void Solver::newton_step(double relax_param, double penalty_param) { if (!check_inertia() && increase_regularizer(regularizer_to_try)) continue; inertia_correction_succeeded = true; + // Keep the inertia regularizer as the minimum required for correct inertia inertia_regularizer = std::min(regularizer_to_try, inertia_regularizer); backsolve(-workspace->kkt_residual, workspace->newton_step); @@ -959,7 +953,7 @@ Filter::Entry Solver::entry_from_solution(double relax_param, double penalty_par Vec m_comp_L_primal_feas(prob->n_comp); Vec m_comp_R_primal_feas(prob->n_comp); - if (options.retraction_type == 0) { // Main path, uses retraction map properties, optimized + if (options.retraction_type == RetractionType::Softplus) { // Main path, uses retraction map properties, optimized Vec p_comp = retract(workspace->s_comp, relax_param); m_comp_L_primal_feas = workspace->residual_comp_L - inv_penalty_param * (workspace->m_comp_L - workspace->m_comp_L_est); From f1180d975c6c27a42dba77610fbaa2798becd320 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Wed, 22 Jul 2026 17:39:02 -0400 Subject: [PATCH 26/35] update docs --- docs/main.pdf | Bin 158382 -> 158256 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/main.pdf b/docs/main.pdf index 9ad585f777db0227b2126b91104a2125ad30848e..4cb33bf4add7dacb5f71b8b2f6ae05e0dd32de19 100644 GIT binary patch delta 15293 zcmai5Lv)~xvW#upn%J7yw(VqMJNaU3VoYq?wylY6P3+|To4bCyUeux&b*fKwchxMz z)-A!-5rTpqG!lVAKtl`;r`-fo!L(ArfaZ&#aI(QM$(h?*x>~W4@UXFRBrafqvomuf zu{6*CO^|B%f3X;2RJ+~r$p$}d)b#5fyARF;{9jZQoXgj5 zqy)EszI+mR9HFg&VW|Coo@8SKM0po5K_Ys5-_b$p10%!3(lOzqTU*&11N|8rsP+uN z@CdA9c*kE5SCSc&Hhc(#mn~+Y!2!@aOUuo4IS_vQvin?jeMvfO4|r~fe^zzjK_tv4 zqX?QfIAG9xL`ZY$%HUSK!bSj8uL!=eJHm>?q*bR_U+gA_pZA@ z_2(-v&TP&oz3(vGeUx~0nTz9SZO`|Eg1I=2eCX$bVIYC>8+207<|Z`<^K=Y$eS>Kz z;ru=KKsVB)Ci261Xr>br->XfKL_Zefw26QhLV@a6{;smF*F zws($4k$k(e39>;n;^l>W^EDDiiRBzD;kjV?Ag|$WAHP};dQqvEm_QI9+d=3_SCnv$ z1ux?*B9?PsoL(Hup!;B6%J>aH{ym@E095gJU_S>g`M+VmO?&v@-k6pSA9=nmUmSA( z{3(R)%ZfGx=^LgVgGa$c1%(0N!9aVyrwhzMKP%yO16)c{k!TxQ040z;w$UuyX5wp;WVSN`;*vyMeyUB zxHS}fY5Tr5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HVg3jEt_!08 From cad8448e9b6ec09d7ffca8e0bba2ad3acb8a41a7 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Wed, 22 Jul 2026 17:43:12 -0400 Subject: [PATCH 27/35] update Julia example simple_test and default solver params to use most benign settings --- include/solver.h | 4 ++-- julia/examples/simple_test.jl | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/solver.h b/include/solver.h index 8a561f8..51456df 100644 --- a/include/solver.h +++ b/include/solver.h @@ -84,9 +84,9 @@ class Solver { int ruiz_iterations{10}; /// Warm-start each inner Newton step's inertia regularizer from the last successful value /// (false restarts the regularizer from 0 at every inner step) - bool inertia_warmstart{true}; + bool inertia_warmstart{false}; /// Initialize s_comp with small random noise (true) or zeros (false) - bool comp_init_random{true}; + bool comp_init_random{false}; /// Seed for the small random noise used to initialize s_comp /// (negative leaves the RNG unseeded, i.e. non-deterministic across runs) int comp_init_seed{-1}; diff --git a/julia/examples/simple_test.jl b/julia/examples/simple_test.jl index 92e2d26..db834e5 100644 --- a/julia/examples/simple_test.jl +++ b/julia/examples/simple_test.jl @@ -27,10 +27,11 @@ mpcc = MPCC(model, solver = Marble.Solver() Marble.setup!(solver, mpcc; -verbosity = 3, -# comp_init_seed = 42 -comp_init_random=false, -relaxation_scaling=0.1, + verbosity = 3, + comp_init_random=false, + relaxation_scaling=0.1, + retraction_type=Marble.Softplus, + clamp_hessian=true, ) results = Marble.solve!(solver) z = Marble.z(results) From c81078313f36c5e5b68212ecb25fdb39f87f72c8 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Wed, 22 Jul 2026 18:17:58 -0400 Subject: [PATCH 28/35] update spdlogging to reflect IPOPT-style, from `logging` branch --- include/solver.h | 20 ++++-- src/solver.cpp | 184 +++++++++++++++++++++++++---------------------- 2 files changed, 115 insertions(+), 89 deletions(-) diff --git a/include/solver.h b/include/solver.h index 51456df..8406573 100644 --- a/include/solver.h +++ b/include/solver.h @@ -338,13 +338,23 @@ class Solver { // factorization (nullopt = no successful value yet this solve). std::optional last_regularizer; + // Iteration counters for the "o i ls" column of the log, reset at the start of each + // solve(). The outer/inner counts are cumulative and also reported in SolveResult; + // n_iter_linesearch is the number of candidates the most recent linesearch tried. + int n_iter_outer{0}; + int n_iter_inner{0}; + int n_iter_linesearch{0}; + + // Which kind of iterate a log row describes: the starting point, an inner Newton + // step, or an outer AL step. Only Inner rows carry an inertia regularizer and a + // linesearch; Initial and Outer rows reprint the table header above themselves. + enum class LogRow { Initial, Inner, Outer }; + // Logging helpers; each is a no-op unless Options::verbosity enables the relevant level. // Kept out of solve()/minimize_augmented_lagrangian() so the loops stay readable. - void log_solver_info(); // header + per-iteration table header (once per solve) - void log_initial_step(); // initial data row before any solver iteration - void log_newton_step(int iter); // one "I" (inner) table row - void log_outer_step(int iter); // one "O" (outer) table row - void log_solve_summary(bool converged, int iterations_outer, int iterations_inner); // final solve summary + void log_solver_info(); // solver details (once per solve) + void log_iteration(LogRow row); // one table row for the current iterate + void log_solve_summary(bool converged); // final solve summary // KKT system regularizers to try in Newton step const std::vector kkt_system_regularizers = { diff --git a/src/solver.cpp b/src/solver.cpp index fec3d53..5d843d7 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -36,40 +36,47 @@ namespace { } } - // Format the inertia-regularizer column in scientific notation, or "---" (no value / NaN) / "0" (exactly zero). + // Width of the banner rules and of the two-column key/value lines in the + // solver-details block. + constexpr int kBannerWidth = 80; + constexpr int kKeyWidth = 28; + + // Per-iteration table: the "o i ls" column counts (outer, inner, linesearch trials). + constexpr const char* kTableHeader = + " o i ls │ pen rel │ ‖kkt‖_inf obj │ ‖eq‖ ‖ineq‖ ‖comp‖ │ reg "; + constexpr const char* kTableRule = + "────────────┼────────────────┼────────────────────┼─────────────────────────────┼────────"; + + // Inertia regularizer column: scientific notation, or "-" when the row is not the + // result of a regularized factorization (outer steps, the initial iterate). std::string fmt_reg(std::optional regularizer) { - if (!regularizer || std::isnan(*regularizer)) return "---"; - if (*regularizer == 0.0) return "0"; - return fmt::format("{:.1e}", *regularizer); + if (!regularizer || std::isnan(*regularizer)) return fmt::format("{:>5}", "-"); + return fmt::format("{:5.0e}", *regularizer); } - std::string table_header() { - return fmt::format("{:<12} {:>7} {:>7} {:>9} {:>12} {:>12} {:>12} {:>12} {:>12}", - fmt::format("{:>5} {:<5}", "iter", "type"), - "lg(ρ)", "lg(κ)", "reg", - "||kkt||", "||eq||", "||ineq||", "||comp||", "obj"); - } - - std::string table_row(const std::string& label, - double log_penalty, - double log_relaxation, + std::string table_row(int outer_iters, + int inner_iters, + int linesearch_iters, + double penalty, + double relaxation, const std::string& regularizer, double kkt, + double obj, double eq_vio, double ineq_vio, - double comp_vio, - double obj) { - return fmt::format("{:<12} {:>7.1f} {:>7.1f} {:>9} {:>12.3e} {:>12.3e} {:>12.3e} {:>12.3e} {:>12.3e}", - label, log_penalty, log_relaxation, regularizer, - kkt, eq_vio, ineq_vio, comp_vio, obj); - } - - std::string outer_label(int iter) { - return fmt::format("{:>5} {:<5}", iter, "O"); + double comp_vio) { + return fmt::format("{:>10} │ {:5.0e} {:5.0e} │ {:>7.1e} {:>7.1e} │ {:>7.1e} {:>7.1e} {:>7.1e} │ {}", + fmt::format("{} {} {}", outer_iters, inner_iters, linesearch_iters), + penalty, relaxation, kkt, obj, eq_vio, ineq_vio, comp_vio, regularizer); } - std::string inner_label(int iter) { - return fmt::format("{:>5} {:<5}", iter, "I"); + constexpr const char* retraction_name(RetractionType retraction_type) { + switch (retraction_type) { + case RetractionType::Softplus: return "softplus"; + case RetractionType::Exp: return "exp"; + case RetractionType::ScaledExp: return "scaled exp"; + } + return "unknown"; } // Convergence / reporting metrics for the current workspace iterate: @@ -694,77 +701,83 @@ void Solver::log_solver_info() { log = solver_logger(); log->set_level(level_from_verbosity(options.verbosity)); - // Solver info header (shown at verbosity >= 2) + // Solver details (shown at verbosity >= 2) if (options.verbosity >= 2) { + log->info("{:=^{}}", "", kBannerWidth); + log->info("{:^{}}", "MARBLE SOLVER", kBannerWidth); + log->info("{:=^{}}", "", kBannerWidth); log->info(""); - log->info("Marble Solver"); - log->info(" variables : {} total (nz={}, +{} ineq slacks, +{} comp slacks; {} duals)", - n_vars, prob->nz, prob->n_ineq, prob->n_comp, n_duals); - log->info(" constraints : {} equality, {} inequality, {} complementarity", - prob->n_eq, prob->n_ineq, prob->n_comp); - log->info(" penalty : init={:.1e} max={:.1e} scale={:.1f}", + log->info("PROBLEM STATISTICS"); + log->info("{:-^{}}", "", kBannerWidth); + log->info("{:<{}}: {:<12} {:<{}}: {}", "Variables (nz)", kKeyWidth, prob->nz, + "Hessian nnz (H)", kKeyWidth, prob->cost_hessian.nonZeros()); + log->info("{:<{}}: {:<12} {:<{}}: {}", "Equalities (n_eq)", kKeyWidth, prob->n_eq, + "Eq Jacobian nnz (J_eq)", kKeyWidth, prob->J_eq.nonZeros()); + log->info("{:<{}}: {:<12} {:<{}}: {}", "Inequalities (n_ineq)", kKeyWidth, prob->n_ineq, + "Ineq Jacobian nnz (J_ineq)", kKeyWidth, prob->J_ineq.nonZeros()); + log->info("{:<{}}: {:<12} {:<{}}: {}, {}", "Complementarities (n_comp)", kKeyWidth, prob->n_comp, + "Comp Jacobian nnz (L, R)", kKeyWidth, prob->L_comp.nonZeros(), prob->R_comp.nonZeros()); + log->info("{:<{}}: {:<12} {:<{}}: {}", "Slack variables", kKeyWidth, prob->n_ineq + prob->n_comp, + "KKT system size (n_vars)", kKeyWidth, n_vars); + if (options.ruiz_iterations > 0) { + log->info("{:<{}}: {:1.2e} - {:1.2e}", "Scaling vector range", kKeyWidth, + workspace->scaling.minCoeff(), workspace->scaling.maxCoeff()); + } + log->info(""); + log->info("SOLVER SETTINGS"); + log->info("{:-^{}}", "", kBannerWidth); + log->info("{:<43}{}", "[Tolerances]", "[Iteration Limits]"); + log->info("{:<{}}: {:<12.0e} {:<{}}: {}", "Residual", kKeyWidth, options.convergence_kkt_norm, + "Solve", kKeyWidth, options.max_iters); + log->info("{:<{}}: {:<12.0e} {:<{}}: {}", "Equality", kKeyWidth, options.convergence_eq_violation, + "Linesearch", kKeyWidth, options.max_iters_linesearch); + log->info("{:<{}}: {:<12.0e} {:<{}}: {}", "Inequality", kKeyWidth, options.convergence_ineq_violation, + "Ruiz", kKeyWidth, options.ruiz_iterations); + log->info("{:<{}}: {:.0e}", "Complementarity", kKeyWidth, options.convergence_comp_violation); + log->info(""); + log->info("[Algorithm Parameters]"); + log->info("{:<{}}: {:.0e} -> {:.0e} ({:.1f}x multiplier)", "Penalty Updating", kKeyWidth, options.penalty_initial, options.penalty_max, options.penalty_scaling); - log->info(" relaxation : init={:.1e} min={:.1e} scale={:.2f}", + log->info("{:<{}}: {:.0e} -> {:.0e} ({:.1f}x multiplier)", "Relaxation Updating", kKeyWidth, options.relaxation_initial, options.relaxation_min, options.relaxation_scaling); - log->info(" convergence : kkt<{:.1e} eq<{:.1e} ineq<{:.1e} comp<{:.1e} (max_iters={})", - options.convergence_kkt_norm, options.convergence_eq_violation, - options.convergence_ineq_violation, options.convergence_comp_violation, options.max_iters); + log->info("{:<{}}: {}", "Retraction", kKeyWidth, retraction_name(options.retraction_type)); + log->info("{:=^{}}", "", kBannerWidth); log->info(""); } - - // Per-iteration table header (shown at verbosity >= 3) - const std::string header = table_header(); - log->debug("{}", header); - log->debug("{}", std::string(header.size(), '-')); } -void Solver::log_initial_step() { +void Solver::log_iteration(LogRow row) { if (!log->should_log(spdlog::level::debug)) return; - auto [kkt, eq_vio, ineq_vio, comp_vio, obj] = compute_metrics(*workspace, *prob); - log->debug("{}", - table_row("", - std::log10(workspace->penalty_param), - std::log10(workspace->relax_param), - fmt_reg(std::nullopt), - kkt, eq_vio, ineq_vio, comp_vio, obj)); -} - -void Solver::log_newton_step(int iter) { - if (!log->should_log(spdlog::level::debug)) return; - - auto [kkt, eq_vio, ineq_vio, comp_vio, obj] = compute_metrics(*workspace, *prob); - log->debug("{}", - table_row(inner_label(iter), - std::log10(workspace->penalty_param), - std::log10(workspace->relax_param), - fmt_reg(last_regularizer), - kkt, eq_vio, ineq_vio, comp_vio, obj)); -} - -void Solver::log_outer_step(int iter) { - if (!log->should_log(spdlog::level::debug)) return; + // Repeat the header above the starting point and above every outer step, so each + // outer AL iteration reads as its own block + if (row != LogRow::Inner) { + log->debug("{}", kTableHeader); + log->debug("{}", kTableRule); + } auto [kkt, eq_vio, ineq_vio, comp_vio, obj] = compute_metrics(*workspace, *prob); log->debug("{}", - table_row(outer_label(iter), - std::log10(workspace->penalty_param), - std::log10(workspace->relax_param), - fmt_reg(std::nullopt), // outer rows carry no inertia regularizer - kkt, eq_vio, ineq_vio, comp_vio, obj)); + table_row(n_iter_outer, n_iter_inner, n_iter_linesearch, + workspace->penalty_param, workspace->relax_param, + // Only an inner step carries an inertia regularizer and a linesearch + fmt_reg(row == LogRow::Inner ? last_regularizer : std::nullopt), + kkt, obj, eq_vio, ineq_vio, comp_vio)); } -void Solver::log_solve_summary(bool converged, int iterations_outer, int iterations_inner) { +void Solver::log_solve_summary(bool converged) { if (!log->should_log(spdlog::level::info)) return; - const int iterations_total = iterations_outer + iterations_inner; log->info(""); - log->info("Marble {}", converged ? "converged" : "did not converge"); - log->info(" iterations : {} total ({} outer, {} inner)", - iterations_total, iterations_outer, iterations_inner); - log->info(" factorizations: {}", n_factorizations); - log->info(" timing : setup={:.3e}s solve={:.3e}s total={:.3e}s", + log->info("{:=^{}}", "", kBannerWidth); + log->info("{:^{}}", converged ? "MARBLE CONVERGED" : "MARBLE DID NOT CONVERGE", kBannerWidth); + log->info("{:=^{}}", "", kBannerWidth); + log->info("{:<{}}: {} total ({} outer, {} inner)", "Iterations", kKeyWidth, + n_iter_outer + n_iter_inner, n_iter_outer, n_iter_inner); + log->info("{:<{}}: {}", "Factorizations", kKeyWidth, n_factorizations); + log->info("{:<{}}: setup={:.3e}s solve={:.3e}s total={:.3e}s", "Timing", kKeyWidth, setup_time_s, solve_time_s, setup_time_s + solve_time_s); + log->info("{:=^{}}", "", kBannerWidth); } SolveResult Solver::solve() { @@ -799,11 +812,12 @@ SolveResult Solver::solve() { // Initialize flags and counters bool converged = false; - int n_iter_outer = 0; - int n_iter_inner = 0; + n_iter_outer = 0; + n_iter_inner = 0; + n_iter_linesearch = 0; // Log the initial residuals (before any steps are taken) - log_initial_step(); + log_iteration(LogRow::Initial); for (; n_iter_outer < options.max_iters; ++n_iter_outer) { // Refresh the KKT residual for the current iterate, then check for convergence @@ -811,7 +825,7 @@ SolveResult Solver::solve() { // Perform inner AL minimization double stat_tol = std::max(1e-14, 1e-1 * workspace->relax_param); - n_iter_inner += minimize_augmented_lagrangian(stat_tol); + minimize_augmented_lagrangian(stat_tol); if (workspace->penalty_param >= options.penalty_max) { // Use the existing factorization to get an estmate of d(solution*)/d(relaxation_param) using IFT @@ -853,11 +867,11 @@ SolveResult Solver::solve() { // Start each inner subproblem with a fresh filter (entries are penalty/relaxation dependent) // last_regularizer = std::nullopt; filter->clear(); - log_outer_step(n_iter_outer); + log_iteration(LogRow::Outer); } solve_time_s = std::chrono::duration(std::chrono::steady_clock::now() - t0).count(); - log_solve_summary(converged, n_iter_outer, n_iter_inner); + log_solve_summary(converged); return SolveResult{ converged, @@ -887,7 +901,8 @@ int Solver::minimize_augmented_lagrangian(double stat_tol) { } newton_step(workspace->relax_param, workspace->penalty_param); - log_newton_step(iter); + n_iter_inner++; + log_iteration(LogRow::Inner); } log->error("exceeded maximum iterations during inner AL minimize: {}", options.max_iters); @@ -1010,6 +1025,7 @@ bool Solver::filter_linesearch(double relax_param, double penalty_param, int max for (int i = 0; i < max_iters; ++i) { const Filter::Entry candidate = entry_from_solution(relax_param, penalty_param); + n_iter_linesearch = i + 1; // candidates tried, reported in the "ls" log column if (filter->acceptable(candidate)) { filter->update(candidate); From 186d9671062f76cb3773bc38d6d6236087eb7326 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Thu, 23 Jul 2026 01:06:30 -0400 Subject: [PATCH 29/35] fix a bug in entry_from_solution for non-softplus retractions --- src/solver.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/solver.cpp b/src/solver.cpp index 5d843d7..00abb62 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -983,9 +983,10 @@ Filter::Entry Solver::entry_from_solution(double relax_param, double penalty_par else { // Alternate path for testing Vec p_comp = retract(workspace->s_comp, relax_param); Vec p_neg_comp = retract(-workspace->s_comp, relax_param); - m_comp_L_primal_feas = + m_comp_L_primal_feas = workspace->residual_comp_L - inv_penalty_param * (workspace->m_comp_L - workspace->m_comp_L_est); - Vec m_comp_R_primal_feas = + + m_comp_R_primal_feas = workspace->residual_comp_R - inv_penalty_param * (workspace->m_comp_R - workspace->m_comp_R_est); for (int i = 0; i < prob->n_comp; i++) { From 80e239aac529c88db08670f14a5c41aafc32358a Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Thu, 23 Jul 2026 02:36:32 -0400 Subject: [PATCH 30/35] fixed a but in dkkt_residual_drelax --- src/solver.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/solver.cpp b/src/solver.cpp index 00abb62..a64cf11 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -466,8 +466,7 @@ void Solver::update_dKKT_residual_drelax(double relax_param) { Vec d_p_ineq = retract_deriv(workspace->s_ineq, relax_param); Vec dp_ineq_dk = retract_drelax(workspace->s_ineq, relax_param); Vec dd_p_ineq_dk = retract_deriv_drelax(workspace->s_ineq, relax_param); - workspace->dkkt_residual_drelax(s_ineq_inds) = - dd_p_ineq_dk.cwiseProduct(-workspace->m_ineq - p_neg_ineq) - d_p_ineq.cwiseProduct(dp_ineq_dk); + workspace->dkkt_residual_drelax(s_ineq_inds) = -d_p_ineq.cwiseProduct(dp_ineq_dk); // Complementarity slack stationarity: r = -p'(s)*m0 + (1 - p'(s))*m1 // d/dkappa = -p'_kappa(s) * (m0 + m1) @@ -497,8 +496,7 @@ void Solver::update_dKKT_residual_drelax(double relax_param) { Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); Vec dp_ineq = retract_deriv(workspace->s_ineq, relax_param); Vec dp_neg_ineq_dk = retract_drelax(-workspace->s_ineq, relax_param); - workspace->dkkt_residual_drelax(s_ineq_inds) = - dd_p_ineq_dk.cwiseProduct(-workspace->m_ineq - p_neg_ineq) - dp_ineq.cwiseProduct(dp_neg_ineq_dk); + workspace->dkkt_residual_drelax(s_ineq_inds) = -dp_ineq.cwiseProduct(dp_neg_ineq_dk); // Complementarity slack stationarity: r = -p'(s)*m0 + p'(-s)*m1 Vec dd_p_comp_dk = retract_deriv_drelax(workspace->s_comp, relax_param); From 2810abfd6b67dc1bc35408ca0ea9d75fc0df847d Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Fri, 24 Jul 2026 11:43:15 -0400 Subject: [PATCH 31/35] Add warmstart flag, just controls whether workspace is cleared --- bindings/julia_bindings.cpp | 3 ++- include/solver.h | 1 + julia/src/Marble.jl | 4 ++-- src/solver.cpp | 20 +++++++++++--------- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/bindings/julia_bindings.cpp b/bindings/julia_bindings.cpp index fc64e29..9b3cb7f 100644 --- a/bindings/julia_bindings.cpp +++ b/bindings/julia_bindings.cpp @@ -198,7 +198,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { OPTION_RW(comp_init_seed, int) OPTION_RW(verbosity, int) OPTION_RW(retraction_type, int) - OPTION_RW(clamp_hessian, bool); + OPTION_RW(clamp_hessian, bool) + OPTION_RW(warmstart, bool); #undef OPTION_RW diff --git a/include/solver.h b/include/solver.h index 0c45f02..dde328f 100644 --- a/include/solver.h +++ b/include/solver.h @@ -88,6 +88,7 @@ class Solver { int verbosity{0}; int retraction_type{0}; // 0 = scaled softplus, 1 = exp bool clamp_hessian{false}; // clamp Hessian diagonal to be non-negative (for scaled softplus retraction) + bool warmstart{false}; // currently just prevents clearing of the workspace at the start of solve Options() = default; }; diff --git a/julia/src/Marble.jl b/julia/src/Marble.jl index 8518538..494a42d 100644 --- a/julia/src/Marble.jl +++ b/julia/src/Marble.jl @@ -66,8 +66,8 @@ module Marble :relaxation_initial, :relaxation_min, :relaxation_scaling, :max_iters, :max_iters_linesearch, :gamma_objective, :gamma_constraint, :ruiz_iterations, - :inertia_warmstart, - :verbosity, :retraction_type, :clamp_hessian + :inertia_warmstart, :comp_init_random, :comp_init_seed, + :verbosity, :retraction_type, :clamp_hessian, :warmstart ] function update_settings!(solver::Marble.Solver; kwargs...) diff --git a/src/solver.cpp b/src/solver.cpp index ed979b6..b8f177b 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -788,15 +788,17 @@ SolveResult Solver::solve() { last_regularizer = std::nullopt; // Initialize solution and multiplier estimates - workspace->solution.setZero(); - if (options.comp_init_random) { - if (options.comp_init_seed >= 0) std::srand(static_cast(options.comp_init_seed)); - workspace->s_comp = 1e-3 * Vec::Random(prob->n_comp); - } - workspace->m_eq_est.setZero(); - workspace->m_ineq_est.setZero(); - workspace->m_comp_L_est.setZero(); - workspace->m_comp_R_est.setZero(); + if (!options.warmstart) { + workspace->solution.setZero(); + workspace->m_eq.setZero(); + workspace->m_ineq.setZero(); + workspace->m_comp_L.setZero(); + workspace->m_comp_R.setZero(); + if (options.comp_init_random) { + if (options.comp_init_seed >= 0) std::srand(static_cast(options.comp_init_seed)); + workspace->s_comp = 1e-3 * Vec::Random(prob->n_comp); + } + } update_residuals(); update_KKT_residual(workspace->relax_param, workspace->penalty_param); From f160cdc2e8f6c74a9a2a1049fbd427cae13e153c Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Fri, 24 Jul 2026 12:32:09 -0400 Subject: [PATCH 32/35] Fix test for kkt relaxation derivative --- julia/test/runtests.jl | 6 ++++-- src/solver.cpp | 16 ++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index c263fd1..ea3f6d5 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -280,7 +280,9 @@ const RETRACTIONS = [Marble.Softplus, Marble.Exp, Marble.ScaledExp] for retract_enum in RETRACTIONS Marble.update_settings!(solver, retraction_type = retract_enum) Marble.update_dKKT_residual_drelax!(solver, κ) - @test isapprox(workspace.dkkt_residual_drelax, FD.derivative(_κ -> kkt_residual(retract_enum, solver, workspace.solution, _κ, 1e1), κ), atol=1e-10) + scaling_mat = 1.0*I(length(workspace.solution)) + scaling_mat[solver.s_ineq_inds, solver.s_ineq_inds] = FD.jacobian(_x -> retract(retract_enum, _x, κ), workspace.s_ineq) + @test isapprox(workspace.dkkt_residual_drelax, scaling_mat * FD.derivative(_κ -> kkt_residual(retract_enum, solver, workspace.solution, _κ, 1e1, symmetric=false), κ), atol=1e-10) end end @@ -302,7 +304,7 @@ const RETRACTIONS = [Marble.Softplus, Marble.Exp, Marble.ScaledExp] κ*sum(log.(retract(retract_enum, workspace.s_ineq, κ))) + 0.5*1/ρ*(workspace.m_eq'*workspace.m_eq + workspace.m_ineq'*workspace.m_ineq + workspace.m_comp_L'*workspace.m_comp_L + workspace.m_comp_R'*workspace.m_comp_R) - isapprox(collect(Marble.entry_from_solution(solver, κ, ρ)), [viol; obj], atol = 1e-10) + @test isapprox(collect(Marble.entry_from_solution(solver, κ, ρ)), [viol; obj], atol = 1e-10) end end end diff --git a/src/solver.cpp b/src/solver.cpp index d3a7059..b9cf257 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -459,13 +459,11 @@ void Solver::update_dKKT_residual_drelax(double relax_param) { workspace->dkkt_residual_drelax.setZero(); if (options.retraction_type == RetractionType::Softplus) { // Main path, optimized with solver properties - // Inequality slack stationarity: r = p'(s) * (-m_ineq - p(-s)) - // d/dkappa = p'_kappa(s) * (-m_ineq - p(-s)) - p'(s) * p_kappa(-s) + // Inequality slack stationarity: r = p'(s) * (-m_ineq - p(-s)) where p'(s) is scaling factor (don't take derivative w.r.t to it) + // d/dkappa = -p'(s) * p_kappa(-s) // (p(-s) is even in s, so p_kappa(-s) = p_kappa(s) = retract_drelax(s)) - Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); Vec d_p_ineq = retract_deriv(workspace->s_ineq, relax_param); Vec dp_ineq_dk = retract_drelax(workspace->s_ineq, relax_param); - Vec dd_p_ineq_dk = retract_deriv_drelax(workspace->s_ineq, relax_param); workspace->dkkt_residual_drelax(s_ineq_inds) = -d_p_ineq.cwiseProduct(dp_ineq_dk); // Complementarity slack stationarity: r = -p'(s)*m0 + (1 - p'(s))*m1 @@ -490,13 +488,11 @@ void Solver::update_dKKT_residual_drelax(double relax_param) { } } else { // Alternative path for testing - // Inequality slack stationarity: r = p'(s) * (-m_ineq - p(-s)) - // d/dkappa = p'_kappa(s) * (-m_ineq - p(-s)) - p'(s) * p_kappa(-s) - Vec dd_p_ineq_dk = retract_deriv_drelax(workspace->s_ineq, relax_param); - Vec p_neg_ineq = retract(-workspace->s_ineq, relax_param); - Vec dp_ineq = retract_deriv(workspace->s_ineq, relax_param); + // Inequality slack stationarity: r = p'(s) * (-m_ineq - p(-s)) where p'(s) is scaling factor (don't take derivative w.r.t to it) + // d/dkappa = -p'(s) * p_kappa(-s) + Vec d_p_ineq = retract_deriv(workspace->s_ineq, relax_param); Vec dp_neg_ineq_dk = retract_drelax(-workspace->s_ineq, relax_param); - workspace->dkkt_residual_drelax(s_ineq_inds) = -dp_ineq.cwiseProduct(dp_neg_ineq_dk); + workspace->dkkt_residual_drelax(s_ineq_inds) = -d_p_ineq.cwiseProduct(dp_neg_ineq_dk); // Complementarity slack stationarity: r = -p'(s)*m0 + p'(-s)*m1 Vec dd_p_comp_dk = retract_deriv_drelax(workspace->s_comp, relax_param); From 404e4afc2506457a384806f475f2ce7cee37ef6f Mon Sep 17 00:00:00 2001 From: Arun Bishop Date: Fri, 24 Jul 2026 13:54:03 -0400 Subject: [PATCH 33/35] Fix cold-starting (clear multiplier estimates) --- src/solver.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/solver.cpp b/src/solver.cpp index b9cf257..f91e1bd 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -790,10 +790,10 @@ SolveResult Solver::solve() { // Initialize solution and multiplier estimates if (!options.warmstart) { workspace->solution.setZero(); - workspace->m_eq.setZero(); - workspace->m_ineq.setZero(); - workspace->m_comp_L.setZero(); - workspace->m_comp_R.setZero(); + workspace->m_eq_est.setZero(); + workspace->m_ineq_est.setZero(); + workspace->m_comp_L_est.setZero(); + workspace->m_comp_R_est.setZero(); if (options.comp_init_random) { if (options.comp_init_seed >= 0) std::srand(static_cast(options.comp_init_seed)); workspace->s_comp = 1e-3 * Vec::Random(prob->n_comp); From 3517d8d7fec7b95ec21bccb1376034393faa12a5 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Sun, 8 Nov 2026 16:59:58 -0800 Subject: [PATCH 34/35] updated READMe to use IEEE citation instead of arxiv --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 73778c0..05d5735 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,15 @@ Please see the [installation instructions](https://roboticexplorationlab.org/Mar If you use this work in your research, please cite it as follows: ```bibtex -@article{bishop2026complementarityconstructionliegroupapproach, - title={Complementarity by Construction: A Lie-Group Approach to Solving Quadratic Programs with Linear Complementarity Constraints}, - author={Arun L. Bishop and Micah I. Reich and Zachary Manchester}, - year={2026}, - eprint={2604.11991}, - archivePrefix={arXiv}, - primaryClass={cs.RO}, - url={https://arxiv.org/abs/2604.11991}, +@ARTICLE{complementarityconstructionliegroupapproach2026, + author={Bishop, Arun L. and Reich, Micah I. and Manchester, Zachary}, + journal={IEEE Robotics and Automation Letters}, + title={Complementarity by Construction: A Lie-Group Approach to Solving Quadratic Programs With Linear Complementarity Constraints}, + year={2026}, + volume={11}, + number={11}, + pages={12799-12806}, + keywords={Optimization;Modeling;Timing;Lie groups;Quadratic programming;Contacts;Algorithms;Construction;Mathematical programming;Newton method;Optimization and optimal control;constrained motion planning}, + doi={10.1109/LRA.2026.3734878} } ``` \ No newline at end of file From 45febe58269770c83e05a0bba42aa098998a02d1 Mon Sep 17 00:00:00 2001 From: Micah Reich Date: Sun, 8 Nov 2026 17:27:38 -0800 Subject: [PATCH 35/35] fix flaky CI test The retraction and KKT checks feed unseeded randn inputs through the exp retractions and compared with atol = 1e-10 only (isapprox then uses rtol = 0). ScaledExp values reach ~1e5-1e16, where rounding alone exceeds 1e-10, so the suite failed on roughly 1% of runs (e.g. retract_deriv_drelax: err 2.3e-10 at magnitude 8.6e15; KKT relaxation derivative: 1.2e-10 at 4.4e5). Seed the RNG so failures reproduce, and add rtol = 1e-10 to the random-input checks. Over 3000 seeds the worst relative error is 1.1e-15. --- julia/test/Project.toml | 1 + julia/test/runtests.jl | 24 +++++++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/julia/test/Project.toml b/julia/test/Project.toml index 7fb61a4..d553f20 100644 --- a/julia/test/Project.toml +++ b/julia/test/Project.toml @@ -1,5 +1,6 @@ [deps] ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index ea3f6d5..279e9ad 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -2,9 +2,15 @@ using Test using LinearAlgebra using SparseArrays +using Random using Marble import ForwardDiff as FD +# The retraction and KKT checks use random inputs: seed them so a failure reproduces, and +# compare with rtol as well as atol, since the exp retractions reach magnitudes (~1e16) +# where an absolute 1e-10 is below floating-point rounding +Random.seed!(20261108) + # Example problem (julia/examples/simple_test.jl), written directly as matrices: # min x'x # s.t. x1 = 1, x2 >= 1, 0 <= (x3 + 1) ⟂ (x4 - 1) >= 0 @@ -71,12 +77,12 @@ const RETRACTIONS = [Marble.Softplus, Marble.Exp, Marble.ScaledExp] tol = 1e-10 for retract_enum in RETRACTIONS Marble.update_settings!(solver, retraction_type = retract_enum) - @test isapprox(Marble.retract(solver, x, κ), retract(retract_enum, x, κ), atol = tol) - @test isapprox(Marble.retract_deriv(solver, x, κ), retract_deriv_fd(retract_enum, x, κ), atol=tol) + @test isapprox(Marble.retract(solver, x, κ), retract(retract_enum, x, κ), atol = tol, rtol = tol) + @test isapprox(Marble.retract_deriv(solver, x, κ), retract_deriv_fd(retract_enum, x, κ), atol=tol, rtol=tol) @test isapprox(Marble.retract_second_deriv(solver, x, κ), - retract_second_deriv_fd(retract_enum, x, κ), atol=tol) - @test isapprox(Marble.retract_drelax(solver, x, κ), FD.derivative(_κ -> retract(retract_enum, x, _κ), κ), atol=tol) - @test isapprox(Marble.retract_deriv_drelax(solver, x, κ), retract_deriv_drelax_fd(retract_enum, x, κ), atol=tol) + retract_second_deriv_fd(retract_enum, x, κ), atol=tol, rtol=tol) + @test isapprox(Marble.retract_drelax(solver, x, κ), FD.derivative(_κ -> retract(retract_enum, x, _κ), κ), atol=tol, rtol=tol) + @test isapprox(Marble.retract_deriv_drelax(solver, x, κ), retract_deriv_drelax_fd(retract_enum, x, κ), atol=tol, rtol=tol) end end @@ -242,7 +248,7 @@ const RETRACTIONS = [Marble.Softplus, Marble.Exp, Marble.ScaledExp] Marble.update_settings!(solver, retraction_type = retract_enum) Marble.update_KKT_residual!(solver, κ, ρ) res = kkt_residual(retract_enum, solver, workspace.solution, κ, ρ) - @test isapprox(workspace.kkt_residual, res, atol=tol) + @test isapprox(workspace.kkt_residual, res, atol=tol, rtol=tol) end end @@ -268,7 +274,7 @@ const RETRACTIONS = [Marble.Softplus, Marble.Exp, Marble.ScaledExp] dp_ineq = retract_deriv_fd(retract_enum, workspace.s_ineq, κ) test_mat[solver.s_ineq_inds, :] = dp_ineq .* test_mat[solver.s_ineq_inds, :] - @test isapprox(kkt_mat, test_mat, atol = 1e-10) + @test isapprox(kkt_mat, test_mat, atol = 1e-10, rtol = 1e-10) end end @@ -282,7 +288,7 @@ const RETRACTIONS = [Marble.Softplus, Marble.Exp, Marble.ScaledExp] Marble.update_dKKT_residual_drelax!(solver, κ) scaling_mat = 1.0*I(length(workspace.solution)) scaling_mat[solver.s_ineq_inds, solver.s_ineq_inds] = FD.jacobian(_x -> retract(retract_enum, _x, κ), workspace.s_ineq) - @test isapprox(workspace.dkkt_residual_drelax, scaling_mat * FD.derivative(_κ -> kkt_residual(retract_enum, solver, workspace.solution, _κ, 1e1, symmetric=false), κ), atol=1e-10) + @test isapprox(workspace.dkkt_residual_drelax, scaling_mat * FD.derivative(_κ -> kkt_residual(retract_enum, solver, workspace.solution, _κ, 1e1, symmetric=false), κ), atol=1e-10, rtol=1e-10) end end @@ -304,7 +310,7 @@ const RETRACTIONS = [Marble.Softplus, Marble.Exp, Marble.ScaledExp] κ*sum(log.(retract(retract_enum, workspace.s_ineq, κ))) + 0.5*1/ρ*(workspace.m_eq'*workspace.m_eq + workspace.m_ineq'*workspace.m_ineq + workspace.m_comp_L'*workspace.m_comp_L + workspace.m_comp_R'*workspace.m_comp_R) - @test isapprox(collect(Marble.entry_from_solution(solver, κ, ρ)), [viol; obj], atol = 1e-10) + @test isapprox(collect(Marble.entry_from_solution(solver, κ, ρ)), [viol; obj], atol = 1e-10, rtol = 1e-10) end end end