Skip to content

[Bug?] Example of Bland's Rule for optimize.linprog (simplex) cycling/preventing termination #8561

@mikkelmk

Description

@mikkelmk

Forcing Bland's Rule with the "bland":True options seems to prevent the code example below from terminating, while the purpose of Bland's Rule is to make sure it terminates. The problem is solved quickly when not forcing Bland's Rule, giving an optimal value of -6.044533469014448.

By "not terminating" i mean that it's still running after running for a couple of hours on a MacBook Pro, while my own implementation of Bland's Rule finds it in seconds.

Reproducing code example:

import numpy as np
import scipy.optimize as opt
import sys

np.random.seed(4)
m = int(np.round(10 * np.exp(np.log(50) * np.random.rand())))
n = int(np.round(10 * np.exp(np.log(50) * np.random.rand())))
c, A, b = np.round(10*np.random.randn(n)),np.round(10*np.random.randn(m,n)),np.round(10*np.abs(np.random.randn(m)))
opt.linprog(-1*c, A, b, options={"maxiter": sys.maxsize, "bland": True})

Scipy/Numpy/Python version information:

1.0.0 1.14.0 sys.version_info(major=3, minor=6, micro=4, releaselevel='final', serial=0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectA clear bug or issue that prevents SciPy from being installed or used as expectedscipy.optimize

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions