GRBTempNLConstr#

GRBTempNLConstr#

Gurobi temporary nonlinear constraint object. Objects of this class are created as intermediate results when building nonlinear constraints using overloaded comparison operators (<=, >=, and ==) on a GRBNLExpr. There are no public methods on this class. You will generally never store objects of this class in your own variables.

Consider the following examples:

model.AddNLConstr(GRBNLExpr.Sin(x) + x * y <= 1);
model.AddNLConstr(x / y == 2.0);

The overloaded comparison operator creates an object of type GRBTempNLConstr, which is then immediately passed to GRBModel.AddNLConstr.