Skip to main content

Update RHS in C API

Answered

Comments

1 comment

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    You can use the GRBsetdblattrelement function to change the RHS of a particular constraint.

    error = GRBsetdblattrelement(model, "RHS", 0, 10);
    if (error) goto QUIT;

    The above would change the RHS of 0th constraint to \(10\).

    You can also change the RHS of multiple constraints at once with the GRBsetdblattrarray function.

    Best regards, 
    Jaromił

    0

Please sign in to leave a comment.