manbet体育手机客户端


GRBModel::addGenConstrMin()

Add a new general constraint of typeGRB_GENCONSTR_MINto a model.

A MIN constraint<span>$</span>r = \min\{x_1,\ldots,x_n,c\}<span>$</span>states that the resultant variable<span>$</span>r<span>$</span>should be equal to the minimum of the operand variables<span>$</span>x_1,\ldots,x_n<span>$</span>一个nd the constant<span>$</span>c<span>$</span>.

GRBGenConstr 一个ddGenConstrMin( GRBVar resvar,
const GRBVar* vars,
int len,
double constant=GRB_INFINITY,
string name="" )
    Arguments:

    resvar: The resultant variable of the new constraint.

    vars: Array of variables that are the operands of the new constraint.

    len: Number of operands in the new constraint (length ofvars一个rray).

    constant (optional): The additional constant operand of the new constraint.

    name (optional): Name for the new general constraint.

    Return value:

    New general constraint.