Skip to main content

Update RHS in C API

Answered

Comments

2 comments

  • Official comment
    Simranjit Kaur
    • 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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Jaromił Najman
    • 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

Post is closed for comments.