QSopt QSopt_pivotin_row QSopt > Callable Library > Function List
  QSopt
  Downloads
  LP Info
  Software
  Problem Formats
  Callable Library
  Overview
Function List
  Rational Solver
  Beta
  Contact Info
Purpose
Pivot logical variables into the basis.
Synopsis
int QSopt_pivotin_row (QSprob p, int rcnt, int *rlist)
Arguments
p a handle to an initialized problem.
rcnt the number of rows to be pivoted into the basis.
rlist an array of length rcnt; each entry specifies the index of a row (so a value between 0 and nrows - 1, where nrows is the number of rows in the problem).
Returns
A zero value if the function terminated correctly, and a non-zero value if an error occurred.
Description

This function attempts to pivot into the current basis the columns for the logical variables associated with the rows specified in rlist. The routine sequentially pivots in the columns. The leaving column in each pivot is a column (not one in the list) that results in the least movement from the current solution, chosen from among the columns that yield suitable pivot values.

Example
/* p is an initialized QSprob, a handle to an existing LP problem.  */
/* Delete rows 1 and 3 from the LP, but to keep a basis for the     */
/* modified problem, first pivot into the basis the logical         */
/* variables associated with the two rows.                          */

int rval;
int dellist[2] = { 1, 3 };

rval = QSopt_pivotin_row (p, 2, dellist);
if (rval) {
    fprintf(stderr,
            "QSopt_pivotin_row failed with return code %d\n", rval);
} else {
    rval = QSdelete_rows (p, 2, dellist);
    if (rval) {
        fprintf(stderr,
                "QSdelete_rows failed with return code %d\n", rval);
    }
}
 
QSopt | Problem Formats | Downloads Back
Last Updated: November 2003