GRBModel.addRanges()


GRBModel.addRanges()

Add new range constraints to a model. A range constraint states that the value of the input expression must be between the specified lower and upper bounds in any solution.

GRBConstr[] addRanges ( GRBLinExpr[] exprs,
    double[] lower,
    double[] upper,
    String[] names )

Arguments:

exprs: Linear expressions for the new range constraints.

lower: Lower bounds for linear expressions.

upper: Upper bounds for linear expressions.

names: Names for new range constraints.

Return value:

Array of new constraint objects.