XPRSchgqobj
XPRSchgqobj |
Purpose
Used to change a single
quadratic coefficient in the
objective function corresponding to the variable pair
(icol,jcol) of the
Hessian matrix.
Synopsis
int XPRS_CC XPRSchgqobj(XPRSprob prob, int icol, int jcol, double dval);
Arguments
prob
|
The current problem.
|
icol
|
Column index for the first variable in the quadratic term.
|
jcol
|
Column index for the second variable in the quadratic term.
|
dval
|
New value for the coefficient in the quadratic Hessian matrix. If an entry in
dval is
0, the corresponding entry will be deleted.
|
Example
The following code adds the terms
[15x12 + 7x1x2]/2 to the objective function:
XPRSchgqobj(prob, 0, 0, 15); XPRSchgqobj(prob, 0, 1, 3.5);
Further information
1. The columns
icol and
jcol must already exist in the matrix. If the columns do not exist, they must be added with the routine
XPRSaddcols.
2. If
icol is not equal to
jcol, then both the matrix elements
(icol, jcol) and
(jcol, icol) are changed to leave the Hessian symmetric.
Related topics