Add a linear constraint to a model.
Note that this method also accepts a TempConstr as its first argument (with the name as its second argument). This allows you to use operator overloading to create constraints. See TempConstr for more information.
sense: Sense for new linear constraint (GRB.LESS_EQUAL, GRB.EQUAL, or GRB.GREATER_EQUAL).
name: Name for new constraint.
New constraint object.
model.addConstr(x + 2*y, GRB.EQUAL, 3*z, "c0") model.addConstr(x + y <= 2.0, "c1")