Skip to main content

Why the extreme ray Groubi retrieved is 0?

Answered

Comments

3 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    To query unbounded ray information, you have to set the InfUnbdInfo parameter before optimizing your model.

    m = read('extreme_ray.lp')
    m.setParam("InfUnbdInfo",1)
    m.optimize()

    Best regards, 
    Jaromił

    0
  • Jacob Jin
    Gurobi-versary
    Curious
    Collaborator

    Hi, I have fixed the error and retrieved the extreme ray.  The extreme ray is a 0-vector. It is abnormal. Why gurobi fail to give a valid extreme ray?

    Thank you so much. 

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    The extreme ray is a 0-vector. It is abnormal. Why gurobi fail to give a valid extreme ray?

    The following code does not give me a 0-vector. Could you double check on your side?

    import gurobipy as gp

    m = gp.read('extreme_ray.lp')
    m.setParam("InfUnbdInfo",1)
    m.optimize()

    for v in m.getVars():
      if (v.UnbdRay != 0):
        print("%s: %f"%(v.VarName,v.UnbdRay))

    The output is

    Read LP format model from file extreme_ray.lp
    Reading time = 0.03 seconds
    : 20000 rows, 1532 columns, 78025 nonzeros
    Set parameter InfUnbdInfo to value 1
    Gurobi Optimizer version 9.5.2 build v9.5.2rc0 (mac64[x86])
    Thread count: 4 physical cores, 8 logical processors, using up to 8 threads
    Optimize a model with 20000 rows, 1532 columns and 78025 nonzeros
    Model fingerprint: 0x94605b2e
    Coefficient statistics:
      Matrix range     [1e+00, 1e+00]
      Objective range  [1e-07, 2e+01]
      Bounds range     [3e+01, 3e+01]
      RHS range        [2e-01, 2e-01]

    Concurrent LP optimizer: dual simplex and barrier
    Showing barrier log only...

    Presolve removed 0 rows and 10 columns
    Presolve time: 0.01s

    Barrier performed 0 iterations in 0.02 seconds (0.01 work units)
    Barrier solve interrupted - model solved by another algorithm


    Solved with dual simplex
    Solved in 314 iterations and 0.03 seconds (0.01 work units)
    Unbounded model
    r_dual[10,0]: 2.000000
    0

Please sign in to leave a comment.