Skip to main content

Getting the decision variable's local bounds within the B&B tree

Answered

Comments

4 comments

  • Ryuta Tamura
    • Gurobi Staff

    Hi Saeed,

    Unfortunately the answer is the same as the one you got in your previous post. The local upper and lower bound of a variable in the each B&B node are not available. A open B&B framework such as SCIP is useful in this case.

    Thanks,
    Ryuta

    0
  • Saeed Abdolmaleki
    • Investigator
    • Gurobi-versary
    • Conversationalist

    Hi Ryuta,

    Thanks for replying to my message. 

    The Idea ultimately led me to use SCIP, during my heuristic solution I need to get access to the fixed integer variables up to the called node. Do you have any suggestion on this way for me? 

    Please keep in mind that the problem is a Scheduling problem and the integer variables which appear on the B&B are all Binary types.

    I wrote the code below to get and assign the fixed ones over a node. do you think it is correct?

    all_vars = {v.name: 1 if v.getLbLocal() == 1 and v.getUbLocal() == 1 else 0 if v.getLbLocal() == 0 and v.getUbLocal() == 0 else "NOT" for v in scip.getVars()}

    fixed_vars = {key: value for key, value in all_vars.items() if  key != 'Makespan' and "s_" not in key and value != "NOT"}

    0
  • Ryuta Tamura
    • Gurobi Staff

    Hi

    Sorry, I am not an expert on SCIP so it is hard for me to guarantee that is correct. However, this post may be helpful.
    https://github.com/scipopt/PySCIPOpt/issues/347
    According to this, it seems that isFeasEQ should be used for safe comparison.
     

    Thanks
    Ryuta

    0
  • Saeed Abdolmaleki
    • Investigator
    • Gurobi-versary
    • Conversationalist

    I appreciate your support Ryuta

    I think this is the right way for handling fixed integers on the node

    0

Please sign in to leave a comment.