Purpose
Set a quadratic
objective term.
Synopsis
int XPRBsetqterm(XPRBprob prob, XPRBvar var1, XPRBvar var2,
double coeff);
Arguments
prob
|
Reference to a problem.
|
var1
|
Reference to a variable.
|
var2
|
Reference to a variable (not necessarily different).
|
coeff
|
Value to be added to the coefficient of the term var1 * var2.
|
Return value
0 if function executed successfully, 1 otherwise.
Example
XPRBprob prob;
XPRBvar x2;
...
x2 = XPRBnewvar(prob, XPRB_PL, "abc1", 0, XPRB_INFINITY);
XPRBaddqterm(prob, x2, x2, 1);
XPRBsetqterm(prob, x2, x2, 5.2);
This sets the coefficient of the objective term x2*x2 to 5.2.
Further information
This function sets the coefficient of a quadratic term in the objective function to the value coeff.
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.