Skip to main content

Variable upper bound is defined through addVars. Can we get active variables just like active constriants

Answered

Comments

2 comments

  • Official comment
    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.
  • Maliheh Aramon
    • Gurobi Staff

    Hi, 

    If the model is an LP and your goal is to find the optimal basic solution, you can rely on the variable attribute VBasis, after the optimization is over, to identify whether a variable is basic (0), non-basic at lower bound (-1), non-basic at upper bound (-2), or super-basis (-3). Otherwise, you would need to query the variable value using the X attribute and compare it with the variable attributes LB/UB. 

    Best regards,

    Maliheh

    0

Post is closed for comments.