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

Different outputs between CUTEst.select & select_sif_problems #421

Open
alonsoC1s opened this issue Sep 10, 2024 · 2 comments
Open

Different outputs between CUTEst.select & select_sif_problems #421

alonsoC1s opened this issue Sep 10, 2024 · 2 comments

Comments

@alonsoC1s
Copy link

Trying to reproduce the problem selection section in the tutorial for a PR I noticed the output from the deprecated CUTEst.select and the new select_sif_problems differs significantly in length (and thus content).

With the old select:

julia> old_p = CUTEst.select(contype = "unc")
293-element Vector{String}:
 "LIARWHD"
 "SCHMVETT"
 "LUKSAN13LS"
 ⋮

With select_sif_problems:

julia> new_p = select_sif_problems(max_con=0)
476-element Vector{String}:
 "TRIGON2B"
 "LIARWHD"
 "SCHMVETT"
 "LUKSAN13LS"
 ⋮

Initially I thought I might be misusing the new selection tool but found examples of problems that are wrongly selected.
I believe there might both be, problems that do have constraints and are incorrectly selected by the deprecated version

julia> setdiff(old_p, new_p)
1-element Vector{String}:
 "S308NE"
julia> p = CUTEstModel("S308NE")
  Problem name: S308NE
   All variables: ████████████████████ 2      All constraints: ████████████████████ 3     
            free: ████████████████████ 2                 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
           lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0                lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
           upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0                upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
         low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0              low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
           fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0                fixed: ████████████████████ 3     
          infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0               infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
            nnzh: (  0.00% sparsity)   3               linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
                                                    nonlinear: ████████████████████ 3     
                                                         nnzj: ( 33.33% sparsity)   4   

as well as unconstrained problems that should be selected and are not

julia> setdiff(new_p, old_p)
184-element Vector{String}:
 "TRIGON2B"
"DECONVB"
 "POWELLBC"
 ⋮
julia> p = CUTEstModel("DECONVB")
  Problem name: DECONVB
   All variables: ████████████████████ 63     All constraints: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
            free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0                 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
           lower: █████████████⋅⋅⋅⋅⋅⋅⋅ 40               lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
           upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0                upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
         low/upp: ████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 11             low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
           fixed: ████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 12               fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
          infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0               infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
            nnzh: ( 44.89% sparsity)   1111            linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
                                                    nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0     
                                                         nnzj: (------% sparsity)         
@amontoison
Copy link
Member

amontoison commented Sep 10, 2024

@alonsoC1s
select and select_sif_problems is exactly the same function:
https://github.com/JuliaSmoothOptimizers/CUTEst.jl/blob/main/src/classification.jl#L161

The issue is more related to the different behavior with options max_con=0 and "contype = unc".

I think that one option allows just bound-constrained problem and the other one pure unconstrained problems.

@alonsoC1s
Copy link
Author

I might be a bit confused with the problem summary then. Taking S308NE as an example, the summary says that there are 3 constraints. Should that problem then be selected by either max_con=0 or "contype = unc"?

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

No branches or pull requests

2 participants