Skip to main content

How to warmstart an LP basis other than m.read(file.bas)? var.VBasis =

Answered

Comments

3 comments

  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Kamal,

    To warmstart the LP you need to either provide

    It is not enough the supply VBasis values alone.

    - Riley

    0
  • Kamal Ba
    Gurobi-versary
    First Comment
    First Question

    Thanks for the clarification Riley. I tried

    for var, bas in zip(m.getVars(), I_B):
            var.VBasis = bas
    for cont, bas in zip(m.getConstrs(), I_C):
          cont.CBasis = bas

    And it worked!

    0
  • Riley Clement
    Gurobi Staff Gurobi Staff

    Good to hear!  Thanks for update.

    0

Please sign in to leave a comment.