Skip to content

Knorm BLMO#271

Draft
LJS42 wants to merge 28 commits into
ZIB-IOL:mainfrom
LJS42:Knorm
Draft

Knorm BLMO#271
LJS42 wants to merge 28 commits into
ZIB-IOL:mainfrom
LJS42:Knorm

Conversation

@LJS42

@LJS42 LJS42 commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Dec 3, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.32394% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.54%. Comparing base (ee5cc6c) to head (5b128e2).
⚠️ Report is 112 commits behind head on main.

Files with missing lines Patch % Lines
src/polytope_blmos.jl 87.32% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #271      +/-   ##
==========================================
- Coverage   86.23%   84.54%   -1.70%     
==========================================
  Files          17       22       +5     
  Lines        1482     2711    +1229     
==========================================
+ Hits         1278     2292    +1014     
- Misses        204      419     +215     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread Project.toml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please remove the Hungarian package as dependency.

Comment thread src/polytope_blmos.jl Outdated
Comment on lines +733 to +736
struct KNormBallLMO <: FrankWolfe.LinearMinimizationOracle
K::Int
right_hand_side::Float64
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't really need an extra type.

Comment thread src/polytope_blmos.jl Outdated
right_hand_side::Float64
end

function bounded_compute_extreme_point(lmo::KNormBallLMO, direction, lb, ub, int_vars; kwargs...)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

function bounded_compute_extreme_point(lmo::FrankWolfe.KNormBallLMO{T}, direction, lb, ub, int_vars; kwargs...)
..
end

Same for the other functions below.

Comment thread src/polytope_blmos.jl Outdated
Comment on lines +831 to +834
if li ≤ 0.0 ≤ ui
else
l1_min += min(abs(li), abs(ui))
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You don't really need the if statement here?

Comment thread test/heuristics.jl Outdated
Comment on lines +222 to +226

n = 20
sparsity = 0.3
x_sol = [rand() < sparsity ? 0 : rand(1:floor(Int, n / 4)) for _ in 1:n]
n_int = 17

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this here?

Comment thread src/polytope_blmos.jl
Comment on lines +720 to +732
"""
KNormBallLMO{T}(K::Int, right_hand_side::T)

LMO with feasible set being the K-norm ball in the sense of
[2010.07243](https://arxiv.org/abs/2010.07243),
i.e., the convex hull over the union of an
L_1-ball with radius τ and an L_∞-ball with radius τ/K:
```
C_{K,τ} = conv { B_1(τ) ∪ B_∞(τ / K) }
```
with `τ` the `right_hand_side` parameter. The K-norm is defined as
the sum of the largest `K` absolute entries in a vector.
"""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add documentation.

Comment thread test/MOI_polytope.jl
Comment on lines +26 to +27
model_l1 = MOI.instantiate(HiGHS.Optimizer)
model_inf = MOI.instantiate(HiGHS.Optimizer)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same comment here as with the KSparseLMO regarding using JuMP instead of MOI. Also, I believe you can use one model for this. This would also be more accurate as a test.

@dhendryc dhendryc marked this pull request as draft March 6, 2026 09:58
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.

2 participants