Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax primal-dual system upon linesearch failure #8

Merged
merged 5 commits into from
Dec 1, 2024

Conversation

dfridovi
Copy link
Member

Adjusts \epsilon as follows:

  • if linesearch succeeds: \epsilon *= 1 - exp(-iters)
  • if linesearch fails: \epsilon *= 1 + exp(-iters)

This fixes #7.

@lassepe
Copy link
Contributor

lassepe commented Nov 27, 2024

I thought I had tested something like this and concluded that it wasn't enough because it cycles. Maybe try my MVP from #7 as a test?

@dfridovi
Copy link
Member Author

I think the runtests.jl file should have exactly that MVP, no?

@lassepe
Copy link
Contributor

lassepe commented Nov 27, 2024

M is different: M = [0 1; -1 0]

@dfridovi
Copy link
Member Author

dfridovi commented Nov 27, 2024

Right... helps to read ;) So that M makes the QP not convex if I am not mistaken, and therefore I think with these constraints it is going to be an ill-posed problem for some choices of \theta. That explains why it was having trouble. I've added a "fix" that just errors out after a fixed number of outer loop iterations now.

@dfridovi
Copy link
Member Author

Ah I see - basically the quadratic term will evaluate to zero for all x. Then the well posedness entirely depends on the sign of theta.

test/runtests.jl Outdated
@@ -14,9 +14,10 @@ using FiniteDiff: FiniteDiff
0 ≤ y ⟂ H(x, y) = Ax - b ≥ 0.
"""
M = [2 1; 1 2]
# M = [0 1; -1 0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is never used. Intended?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@dfridovi dfridovi merged commit 24e7508 into main Dec 1, 2024
2 checks passed
@dfridovi dfridovi deleted the fix/handle-linesearch-failures branch December 1, 2024 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terminate earlier on failures?
2 participants