Update one or more of P (objective), q (linear objective), A (constraints), b (constraint RHS) on an existing solver. The sparsity pattern of P and A must remain the same as the original problem; only the nonzero values can change.
Arguments
- solver
a
ClarabelSolverobject created byclarabel_solver()- P
new upper-triangular P matrix (same sparsity), or
NULLto leave unchanged- q
new linear objective vector, or
NULLto leave unchanged- A
new constraint matrix (same sparsity), or
NULLto leave unchanged- b
new constraint RHS vector, or
NULLto leave unchanged
Examples
if (FALSE) { # \dontrun{
solver_update(s, q = c(-4, -1)) # update linear objective only
solver_update(s, b = c(2, 2)) # update constraint RHS only
sol2 <- solver_solve(s) # re-solve with updated data
} # }
