Update RHS in C API
AnsweredHi I would like to update contraint's RHS several time with the same model.
I found ways to update RHS with Python and C#
but I don't find anything in C.
Can anyone help me, thank you!
0
-
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.
Comments
1 comment