I am using pythons linprog to solve the following linear program. I am using a callback to have linprog display the tableau on each iteration below. I don't understand how the last tableau is calculated. I would think the pivot would be 1 (row [0],col [1]) but it seems like linprog selects -2(row[1],col[1]). I thought in a linear program the pivot had to be greater than 0? And actually linprog prints out (nan,nan) for pivot but it seems as though the -2 is used to reduce the problem.
x[1] + x[2] <= 10
-x[1] + x[2] <= -10
max f = x[1] + 2*x[2]
[[ 1. 1. 1. 0. 0. 10.]
[ 1. -1. -0. -1. 1. 10.]
[ -1. -2. 0. 0. 0. 0.]
[ -1. 1. 0. 1. 0. -10.]]
(0, 0)
[[ 1. 1. 1. 0. 0. 10.]
[ 0. -2. -1. -1. 1. 0.]
[ 0. -1. 1. 0. 0. 10.]
[ 0. 2. 1. 1. 0. 0.]]
(nan, nan)
[[ 1. 0. 0.5 -0.5 10. ]
[ -0. 1. 0.5 0.5 -0. ]
[ 0. 0. 1.5 0.5 10. ]]
(nan, nan)