Skip to main content

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

Answered

Comments

3 comments

  • 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

Please sign in to leave a comment.