Closed min-dai closed 2 months ago
Yes, the 'full rewrite' versions still expect that "P" and "A" maintain their same sparsity structure. The function is just letting you update the entries of those matrices in one shot.
The reason for this restriction is that if you update the values only, but don't change the sparsity structure, then the solver doesn't need to reallocate memory for its internal matrix factorisation because its sparsity pattern likewise won't change. If you do change the sparsity pattern of your data then internal reallocations would be required. At that point you might as well just make a new solver object.
It's also correct that you can't update the problem data with presolve or chordal decomposition enabled. The reason is that changing the entries of the problem data could invalidate the presolve steps we applied. For example, an infinite bound in a constraint causes the solver to eliminate that constraint before solving. If you then change that bound to a finite one, we can't restore it internally without reallocating.
I agree that that could be better documented though and should fail more gracefully.
Hello,
I'm running Clarabel with c++. I found that I cannot update P and A matrices with different sparsity structures using the functions that claim to do a full rewrite. Any suggestions on this?
Also, I have to disable presolve to avoid the following error when updating without changing the sparsity structure. It seems like this might be standard as
data_updating.cpp
used the same setting, but it felt concerning.