Skip to content

Conversation

@nzy1997
Copy link
Contributor

@nzy1997 nzy1997 commented Mar 28, 2025

Each integer programming constrain removes one infeasible local configuration.

@codecov
Copy link

codecov bot commented Mar 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.84%. Comparing base (43f5faa) to head (c335deb).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #143      +/-   ##
==========================================
+ Coverage   93.64%   93.84%   +0.19%     
==========================================
  Files          38       39       +1     
  Lines        1590     1640      +50     
==========================================
+ Hits         1489     1539      +50     
  Misses        101      101              

☔ 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.

Copy link
Owner

@GiggleLiu GiggleLiu left a comment

Choose a reason for hiding this comment

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

Tests are not included.

Project.toml Outdated
Graphs = "1"
InteractiveUtils = "1"
JuMP = "1"
LinearAlgebra = "1.11.0"
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
LinearAlgebra = "1.11.0"
LinearAlgebra = "1"

@testset "solvers" begin
include("solvers.jl")
end

Copy link
Owner

Choose a reason for hiding this comment

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

IPSolverExt.jl should be included.

return round.(Int, JuMP.value.(x))
end

function minimal_constraints(nflavor::Int, set::Vector)
Copy link
Owner

Choose a reason for hiding this comment

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

This function is not tested.

JuMP.optimize!(model)

# Return the solution if feasible
if JuMP.termination_status(model) == JuMP.MOI.OPTIMAL
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe use @assert is_solved_and_feasible(model) "error message..."?

end
end

obj_sum = 0
Copy link
Owner

Choose a reason for hiding this comment

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

unstable type.

end

obj_sum = 0
for obj in objs
Copy link
Owner

Choose a reason for hiding this comment

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

Objectives can have more than one variables. The current code will scilently break for Spinglass.

# Returns
- `Vector{Int}`: The indices of the subsets to choose.
"""
function minimal_set_cover(coverset::Vector{Int}, subsets::Vector{Vector{Int}}, optimizer, verbose::Bool=false)
Copy link
Owner

Choose a reason for hiding this comment

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

We do not need it anymore. Maybe we can dispatch it to set covering problem solver.

@GiggleLiu GiggleLiu merged commit b84db7f into GiggleLiu:main Apr 12, 2025
5 checks passed
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