Conversation
…uality constraints Co-authored-by: darnstrom <55484604+darnstrom@users.noreply.github.com> Agent-Logs-Url: https://github.com/darnstrom/daqp/sessions/66cd7d3a-d1d8-4d2a-9c03-cbbb36907fc5
Copilot
AI
changed the title
[WIP] Fix validation for unconstrained solutions with equalities and LP objectives
Fix unconstrained-feasibility shortcut for LP objectives and equality constraints
Mar 25, 2026
darnstrom
requested changes
Mar 25, 2026
Comment on lines
+62
to
+70
| if(check_unconstrained_base && has_hessian){ | ||
| for(i = 0; i < work->m; i++){ | ||
| if(DAQP_IS_IMMUTABLE(i) || | ||
| qp->bupper[i] - qp->blower[i] < work->settings->zero_tol){ | ||
| has_equalities = 1; | ||
| break; | ||
| } | ||
| } | ||
| } |
Owner
There was a problem hiding this comment.
It feels like this is doing double the work of what is already done in daqp_check_bounds.
Could the logic somehow be combined with the daqp_check_bounds?
Contributor
Author
There was a problem hiding this comment.
Done in 3b8d1d3. daqp_check_bounds is now moved to before the unconstrained check (within the same mask guard). Since it already marks equal-bound constraints as IMMUTABLE, the has_equalities scan now only needs to check DAQP_IS_IMMUTABLE(i) — no duplicate bupper[i]-blower[i] arithmetic.
…duplicate equality detection Co-authored-by: darnstrom <55484604+darnstrom@users.noreply.github.com> Agent-Logs-Url: https://github.com/darnstrom/daqp/sessions/7e052cfd-6b65-42a2-80f7-60814191c494
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
check_unconstrainedindaqp_update_ldp(src/utils.c) was incorrectly enabled for LP problems and problems with equality constraintscheck_unconstrainedto exclude LP case and equality constraintsdaqp_check_boundscall before the unconstrained feasibility check so that equal-bound constraints are already markedIMMUTABLEbefore the equality scan. Thehas_equalitiesloop now only checks theIMMUTABLEflag — no duplicatebupper[i]-blower[i]computation.⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.