GRBModel::addSOS()

Add an SOS constraint to the model. Please refer to this section for details on SOS constraints.

GRBSOS addSOS ( const GRBVar* vars,
    const double* weights,
    int len,
    int type )
    Arguments:

    vars: Array of variables that participate in the SOS constraint.

    weights: Weights for the variables in the SOS constraint.

    len: Number of members in the new SOS set (length of vars and weights arrays).

    type: SOS type (can be GRB_SOS_TYPE1 or GRB_SOS_TYPE2).

    Return value:

    New SOS constraint.