Initializing help system before first use

problem.getpivots

problem.getpivots


Purpose
Returns a list of potential leaving variables if a specified variable enters the basis. The return value is a tuple containing the objective function value that would result if in entered the basis; and an integer where the actual number of potential leaving variables will be returned.
Synopsis
dobj, npiv = problem.getpivots (in, outlist, x, maxpiv)
Arguments
in 
Index of the specified row or column to enter basis.
outlist 
Array of length at least maxpiv to hold list of potential leaving variables. May be None if not required.
Array of length problem.attributes.rows + problem.attributes.sparerows + problem.attributes.cols to hold the values of all the variables that would result if in entered the basis. May be None if not required.
maxpiv 
Maximum number of potential leaving variables to return.
Example
The following retrieves a list of up to 5 potential leaving variables if variable 6 enters the basis:
outlist = []
x = []
obj, npiv = p.getpivots (2, outlist, x, 10)
Further information
1. If the variable in enters the basis and the problem is degenerate then several basic variables are candidates for leaving the basis, and the number of potential candidates is returned in npiv. A list of at most maxpiv of these candidates is returned in outlist which must be at least maxpiv long. If variable in 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 value of the objective is returned in dobj 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