int QSchange_objcoef (QSprob p, int indx, double coef)
/* Change the objective coefficient of variable y to 5.0 */ int rval = 0; int yindex; /* Find the index of of y */ rval = QSget_column_index (p, "y", &yindex); if (rval) { fprintf (stderr, "could not get index, error code %d\n", rval); } else { if (yindex == -1) { printf ("y is not a variable in the problem\n"); } else { rval = QSchange_objcoef (p, yindex, 5.0); if (rval) { fprintf (stderr, "could not change coef, error %d\n", rval); } } }