Initializing help system before first use

# XPRSgetpivots

Purpose
Returns a list of potential leaving variables if a specified variable enters the basis.
Topic areas
Simplex, LP
Synopsis
`int XPRS_CC XPRSgetpivots(XPRSprob prob, int enter, int outlist[], double x[], double *p_objval, int *p_npivots, int maxpivots);`
Arguments

prob | The current problem.
enter | Index of the specified row or column to enter basis.
outlist | Integer array of length maxpivots to hold list of potential leaving variables. May be NULL if not required.
x | Double array of length ROWS + SPAREROWS + COLS to hold the values of all the variables that would result if enter entered the basis. May be NULL if not required.
p_objval | Pointer to a double where the objective function value that would result if enter entered the basis will be returned.
p_npivots | Pointer to an integer where the actual number of potential leaving variables will be returned.
maxpivots | Maximum number of potential leaving variables to return.

Error value

425 | Indicates enter is invalid (out of range or already basic).

Example
The following retrieves a list of up to 5 potential leaving variables if variable 6 enters the basis:

    int npivots, outlist[5];
    double objective;
    ...
    XPRSgetpivots(prob,6,outlist,NULL,&objective,&npivots,5);

Further information
1. If the variable enter enters the basis and the problem is degenerate then several basic variables are candidates for leaving the basis. If variable enter were to be pivoted in, then because the problem is degenerate, the resulting values of the objective function and all the variables do not depend on which of the candidates from outlist is chosen to leave the basis. The number of potential candidates is returned in p_npivots and up to maxpivots of them are returned in outlist. The value of the objective is returned in p_objval and the values of the variables into x.
2. Row indices are in the range 0 to ROWS- 1, whilst columns are in the range ROWS+ SPAREROWS to ROWS+ SPAREROWS+ COLS- 1.
Related topics
XPRSgetpivotorder, XPRSpivot.
Parent Topic Console and Library Functions

© 2001-2026 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.