Skip to main content

How to remove a constraint and add it back in .NET environment ?

Answered

Comments

4 comments

  • Official comment
    Simranjit Kaur
    Gurobi Staff Gurobi Staff
    This post is more than three 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 why not try our AI Gurobot?.
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi,

    You can get the LHS by using the getRow() function.

    Best regards,
    Jaromił

    1
  • Jia-Kai Kuo
    Gurobi-versary
    First Comment
    First Question

    Hi Jaromił,

    Thanks! 

    For better understanding, take the following constraint for example:

    GRBConstr c : x1 + 2 x3 + 3 x3 >= 6

    If I use getRow(c), I will get a GRBLinExpr : x1 + 2 x3 + 3 x3  , right?

    Thanks again!

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Jia-Kai,

    Correct, that's what you would get.

    Have a look at the answers of this community post. It's for the Python API but it works the same for the .NET API.

    Best regards,
    Jaromił

    0

Post is closed for comments.