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

Model.statistics.solutions collects nothing -type solutions #409

Open
jardinetsouffleton opened this issue Jun 6, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@jardinetsouffleton
Copy link
Member

To reproduce:

  • Go to the job shop scheduling notebook in SeaPearlZoo.jl
  • Run all cells
  • After the following cell:
my_heuristic(x::SeaPearl.IntVar; cpmodel=nothing) = minimum(x.domain)
SeaPearl.solve!(model; variableHeuristic=SeaPearl.MinDomainVariableSelection{true}(), valueSelection=SeaPearl.BasicHeuristic(my_heuristic))

Run this:

counter = Dict{String, Int}()
for solution in model.statistics.solutions
    if isnothing(solution)
        if haskey(counter, "null")
            counter["null"] += 1
        else
            counter["null"] = 1
        end
    else
        if haskey(counter, "not_null")
            counter["not_null"] += 1
        else
            counter["not_null"] = 1
        end
    end
end
counter

You should see a very large (~130k) number of nothing in the model.statistics.solutions

@jardinetsouffleton jardinetsouffleton added the bug Something isn't working label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant