XPRBnewctr
PurposeSynopsisXPRBctr XPRBnewctr(XPRBprob prob, const char *name, int qrtype);
Arguments
prob Reference to a problem. name The constraint name (of unlimited length). May be NULL if not required. type Type of the constraint, which must be one of
XPRB_L XPRB_G XPRB_E XPRB_N Return valueReference to the new constraint if function executed successfully, NULL otherwise.ExampleThe following creates a new equality constraint.XPRBprob prob; XPRBctr ctr1; ... ctr1 = XPRBnewctr(prob, "r1", XPRB_E);Further informationThis function creates a new constraint and returns the reference to this constraint, i.e. the constraint's model name. It has to be called before XPRBaddterm is used to add terms to the constraint. Range constraints can first be created with any type and then converted using the function XPRBsetrange. If the indicated name is already in use, BCL adds an index to it. If no constraint name is given, BCL generates a default name starting with CTR.Related topics
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.