メインコンテンツへスキップ

VBasis/CBasis get and set

回答済み

コメント

5件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Marika Karbstein
    • Gurobi Staff

    Hi Thomas,

    The function Model.setAttr() already exists.

    Cheers,
    Marika

    -1
  • Thomas Schlechte
    • Gurobi-versary
    • First Question
    • First Comment

    Hi Marika,

    ah okay, I did not see the call with 3 arguments. So it should work like this

    // solve
    ...
    vBasis = self.model.getAttr("VBasis", self.model.getVars())
    cBasis = self.model.getAttr("CBasis", self.model.getConstrs())

    // do for example a problem specific RENS
    ...

    // set lp solution
    self.model.setAttr("VBasis", model.getVars(), vBasis)
    self.model.setAttr("CBasis", model.getConstr(), cBasis)

    Thanks

    Thomas

     

    1
  • noah smith
    • Gurobi-versary
    • First Comment

    Hi, Thomas's second comment here is very useful. Could highly recommend that his code-snippet, or something like it, be included in discussions of lp warm start. A simple 'hello world style' example model doing this would also be useful. Multiple examples of warm start would be helpful.

    Concrete 'how to' with examples that pop up when googling 'gurobi warm start'.

    Understood this stuff is apparently totally obvious for gurobi employees.

    It's not for every gurobi user, have learned that the hard way over the last few days.

    Thanks

    Noah

     

    0
  • Gwyneth Butera
    • Gurobi Staff

    Thanks for the suggestion Noah! I have added this to my list of potential improvements for the Knowledge Base. -G

    1

投稿コメントは受け付けていません。