add_SOSAdd a SOS (Special Ordered Sets) constraint. int add_SOS(lprec *lp, char *name, short sostype, int priority, int count, int *sosvars, REAL *weights); Return Value add_SOS returns the list index of the new SOS if the operation was successful. A return value
of 0 indicates an error. Parameters lp Pointer to previously created lp model. See return value of make_lp, copy_lp, read_lp, read_lp_file, read_LP, read_mps, read_MPS name The name of the SOS constraint. sostype The type of the SOS constraint. Must be >= 1 priority Priority of the SOS constraint in the SOS set. count The number of variables in the SOS list. sosvars An array specifying the count variables (their column numbers). weights An array specifying the count variable weights. Remarks The add_SOS function adds an SOS constraint. Example
See Also make_lp, copy_lp, read_lp, read_lp_file, read_LP, read_mps, read_MPS, is_SOS_var |