gbionics / gbionics/osqp-eigen
The createOsqpSparseMatrix does not correctly handle empty sparse matrix.
- Dominant language
- C++
- Stars
- 503
- Forks
- 133
- PR merge metrics
- No merged PRs in 30d
Description
When setting the hessian which has zero nonZero entries it creates an osqp hessian with one value initialized to garbage.
Current:
```
OSQP Hessian:
nzmax:1
m:19
n:19
p:0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
i:93825007825568
x:4.64e-310
```
Expected:
```
OSQP Hessian:
nzmax:0
m:19
n:19
p:0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
i:
x:
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at createOsqpSparseMatrix, the entry point named in the issue, and trace how a zero-nonzero Eigen sparse matrix is converted to OSQP storage. Reproduce the 19x19 empty Hessian case and add or update a regression test if the repository has coverage for this conversion. Done means the resulting OSQP Hessian has nzmax 0 with empty i and x arrays.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100