Skip to main content

False positive on second-order cone feasibility problem

Comments

3 comments

  • Lennart Lahrs
    • Gurobi Staff

    Thanks, Leonard, for posting your observations here! I created a support ticket so we can investigate the model files.

    0
  • Lennart Lahrs
    • Gurobi Staff

    For the public record, Gurobi version 12.0.1 solved the issue Leonard faced with this model and relates to "Fixed bug in implicitly handling lower bounds in cone constraints that can lead to sub-optimal termination for infeasible SOCPs" from our release notes on 12.0.1.

    1
  • Leonard Göke
    • Gurobi-versary
    • First Comment
    • First Question

    I'm reactivating this thread since I have a new, closely related issue. The original problem occurred in a model that could get very large due to the constraints the cutting plane algorithm added and the update to Gurobi 12.0.1 mostly resolved it. 

    Now I'm trying to solve similar problems with a local gradient method. As a result, the problems remain small, but the quadratic constraint is still used for regularization. Again, I'm observing constraint violations, but now they exclusively occur in the SOC constraint. Below, I provided the code that manually checks if the SOC from the .mps file holds. 

    I'm happy to share the corresponding .mps files and have thoroughly checked that I copied the SOC from the .mps file correctly. I'm using Gurobi 12.0.1 and v1.7.0 of the Gurobi Julia package.

    using JuMP, Gurobi
    
    # load model from file
    mod = read_from_file("test.mps")
    set_optimizer(mod, Gurobi.Optimizer)
    
    # set high accuracy and solve
    set_optimizer_attribute(mod, "Method", 2)
    set_optimizer_attribute(mod, "NumericFocus", 3)
    set_optimizer_attribute(mod, "BarConvTol", 1e-10)
    set_optimizer_attribute(mod, "BarQCPConvTol", 1e-10)
    set_optimizer_attribute(mod, "FeasibilityTol", 1e-9)
    
    optimize!(mod)
    
    # check quadratic constraint
    conv = value(JuMP.variable_by_name(mod, "capaConv[none,_2040,_FR,_onshore]"))
    stIn = value(JuMP.variable_by_name(mod, "capaStIn[2040,_2040,_FR,_lithiumBattery,_1]"))
    stSize =  value(JuMP.variable_by_name(mod, "capaStSize[2040,_2040,_FR,_lithiumBattery,_1]"))
    
    # quadratic constraint in .mps file
    # capaConv[none,_2040,_FR,_onshore]² + capaStSize[2040,_2040,_FR,_lithiumBattery,_1]² + capaStIn[2040,_2040,_FR,_lithiumBattery,_1]² - 988.64513652647 capaConv[none,_2040,_FR,_onshore] - 1494.108967790764 capaStSize[2040,_2040,_FR,_lithiumBattery,_1] - 298.823417245908 capaStIn[2040,_2040,_FR,_lithiumBattery,_1]  <= - 824769.0620761865
    
    # check constraint from results (lhs is -386520.97356201836)
    lhs = conv^2 + stSize^2  + stIn^2 - 988.64513652647 * conv - 1494.108967790764 * stSize - 298.823417245908 * stIn
    println(lhs <= -824769.0620761865)


     

    0

Please sign in to leave a comment.