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

SCIP solver -- issue in "quadratic_constraints.jl". #280

Open
ahslim opened this issue Nov 13, 2023 · 2 comments
Open

SCIP solver -- issue in "quadratic_constraints.jl". #280

ahslim opened this issue Nov 13, 2023 · 2 comments
Assignees

Comments

@ahslim
Copy link

ahslim commented Nov 13, 2023

So, in the SCIP package, there seems to be an issue in this file "quadratic_constraints.jl".
Particularly, lines 190-192 in the below function. The SCIP solver generates a solution, but it outputs the below shown error.
So, if I comment this error, the code works normally as expected. Do you think there should be something done in this regards?

function MOI.get(
    o::Optimizer,
    ::MOI.ConstraintPrimal,
    ci::CI{SQF,S},
) where {S<:BOUNDS}
    _throw_if_invalid(o, ci)
    c = cons(o, ci)
    expr_ref = SCIPgetExprNonlinear(c)
    isq = Ref{UInt32}(100)
    @SCIP_CALL LibSCIP.SCIPcheckExprQuadratic(o, expr_ref, isq)
    if isq[] != 1
        # error(
        #     "Constraint index $ci pointing to a non-quadratic expression $expr_ref",
        # )
    end
    sol = SCIPgetBestSol(o)
    @SCIP_CALL SCIPevalExpr(o, expr_ref, sol, Clonglong(0))
    return SCIPexprGetEvalValue(expr_ref)
end
@matbesancon matbesancon self-assigned this Nov 13, 2023
@matbesancon
Copy link
Member

Thanks for bringing this to our attention. Do you have a working example to reproduce this error? It seems that SCIP is not seeing this constraint as quadratic

@matbesancon
Copy link
Member

bump here

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