Initializing help system before first use

XPRBsetqterm

XPRBsetqterm


Purpose
Set a quadratic constraint term.
Synopsis
int XPRBsetqterm(XPRBctr ctr, XPRBvar var1, XPRBvar var2, double coeff);
Arguments
ctr 
Reference to a previously defined constraint.
var1 
Reference to a variable.
var2 
Reference to a variable (not necessarily different from first variable).
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;
XPRBctr ctr1;
 ...
ctr1 = XPRBnewctr(prob, "r1", XPRB_L);
x2 = XPRBnewvar(prob, XPRB_PL, "abc1", 0, XPRB_INFINITY);
XPRBaddqterm(ctr1, x2, x2, 1);
XPRBsetqterm(ctr1, x2, x2, 5.2); 
This sets the coefficient of the term x2*x2 to 5.2.
Further information
This function sets the coefficient of a quadratic term in a constraint to the value coeff.
Note:
all terms that are added to a constraint must belong to the same problem as the constraint itself.

Related topics

© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.