All the scipy examples are using the older versions and I'm looking for an example on how to use the newer version.
https://docs.scipy.org/doc/scipy/reference/optimize.linprog-simplex.html
I created a super simple code and it prints that the problem is unbounded. Any help is appreciated.
Minimize x - y
with
x >= 2
y <= 3
In standard form
-x - s1 = -2
y + s2 = 3
One of many solutions should be x = 2, y = 3
c = [1, -1]
A = [[-1, 0, -1, 0],[0, 1, 0, 1]]
b = [-2, 3]
linprog(c, method="simplex", options={'A': A, 'b': b})
result
------------------
con: array([], dtype=float64)
fun: -inf
message: 'The problem is (trivially) unbounded because there are no non-trivial constraints and a) at least one decision variable is unbounded above and its corresponding cost is negative, or b) at least one decision variable is unbounded below and its corresponding cost is positive. '
nit: 0
slack: array([], dtype=float64)
status: 3
success: False
x: array([ 0., inf])