scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturns
_pivot_col(T, tol=1e-09, bland=False)

Parameters

T : 2-D array

A 2-D array representing the simplex tableau, T, corresponding to the linear programming problem. It should have the form:

[[A[0, 0], A[0, 1], ..., A[0, n_total], b[0]],

[A[1, 0], A[1, 1], ..., A[1, n_total], b[1]], . . . [A[m, 0], A[m, 1], ..., A[m, n_total], b[m]], [c[0], c[1], ..., c[n_total], 0]]

for a Phase 2 problem, or the form:

[[A[0, 0], A[0, 1], ..., A[0, n_total], b[0]],

[A[1, 0], A[1, 1], ..., A[1, n_total], b[1]], . . . [A[m, 0], A[m, 1], ..., A[m, n_total], b[m]], [c[0], c[1], ..., c[n_total], 0], [c'[0], c'[1], ..., c'[n_total], 0]]

for a Phase 1 problem (a problem in which a basic feasible solution is sought prior to maximizing the actual objective. T is modified in place by _solve_simplex .

tol : float

Elements in the objective row larger than -tol will not be considered for pivoting. Nominally this value is zero, but numerical issues cause a tolerance about zero to be necessary.

bland : bool

If True, use Bland's rule for selection of the column (select the first column with a negative coefficient in the objective row, regardless of magnitude).

Returns

status: bool

True if a suitable pivot column was found, otherwise False. A return of False indicates that the linear programming simplex algorithm is complete.

col: int

The index of the column of the pivot element. If status is False, col will be returned as nan.

Given a linear programming simplex tableau, determine the column of the variable to enter the basis.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/optimize/_linprog_simplex.py#37
type: <class 'function'>
Commit: