 |
 |
 |
 |
Purpose |
 |
 |
Change a coefficient in the right-hand-side vector.
|
 |
Synopsis |
 |
 |
int QSchange_rhscoef (QSprob p, int indx, double coef)
|
 |
Arguments |
 |
p |
 |
a handle to an initialized problem. |
indx |
 |
the index of the row whose right-hand-side coefficient will be changed. |
coef |
 |
the new value of the coefficient. |
|
 |
Returns |
 |
 |
A zero value if the function terminated correctly, and a non-zero value if an error occurred.
|
 |
Description |
 |
 |
Use this function to change a single coefficient in the right-hand-side vector; it can be used to modify an existing non-zero coefficient or to add a new non-zero coefficient to the right-hand-side vector. Note that the function assumes that the row (constraint) exists; use QSnew_row if the coefficient introduces a new row.
|
 |
Example |
 |
 |
/* Change the right-hand-side coefficient in row 1 to 7.1 */
int rval = 0;
rval = QSchange_rhscoef (p, 1, 7.1);
if (rval) {
fprintf (stderr,
"Could not change rhs value, error code %d\n", rval);
}
|
 |