XPRBnewsos
XPRBnewsos |
Purpose
Synopsis
XPRBsos XPRBnewsos(XPRBprob prob, const char *name, int type);
Arguments
prob
|
Reference to a problem.
|
||||
name
|
The name of the set.
|
||||
type
|
The set type, which must be one of:
|
Return value
Reference to the new SOS if function executed successfully,
NULL otherwise.
Example
The following creates an SOS of type 1, called
sos1.
XPRBprob prob; XPRBsos set1; ... set1 = XPRBnewsos(prob, "sos1", XPRB_S1);
Further information
This function creates a Special Ordered Set (SOS) of type 1 or 2 (abbreviated SOS1 and SOS2). It returns the address of the set that is taken as a parameter in the functions for adding set members, such as
XPRBaddsosel, deleting single elements
XPRBdelsosel or the entire set
XPRBdelsos. If the indicated name is already in use, BCL adds an index to it. If no name is given for the set, BCL generates a default name starting with
SOS. (The generation of unique names will only take place if the names dictionary is enabled, see
XPRBsetdictionarysize.)
Related topics