{"action":"created","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/8662","repository_url":"https://api.github.com/repos/scipy/scipy","labels_url":"https://api.github.com/repos/scipy/scipy/issues/8662/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/8662/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/8662/events","html_url":"https://github.com/scipy/scipy/issues/8662","id":310626840,"node_id":"MDU6SXNzdWUzMTA2MjY4NDA=","number":8662,"title":"linprog answer differs when bound is added to constraints","user":{"login":"savrus","id":34567,"node_id":"MDQ6VXNlcjM0NTY3","avatar_url":"https://avatars3.githubusercontent.com/u/34567?v=4","gravatar_id":"","url":"https://api.github.com/users/savrus","html_url":"https://github.com/savrus","followers_url":"https://api.github.com/users/savrus/followers","following_url":"https://api.github.com/users/savrus/following{/other_user}","gists_url":"https://api.github.com/users/savrus/gists{/gist_id}","starred_url":"https://api.github.com/users/savrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/savrus/subscriptions","organizations_url":"https://api.github.com/users/savrus/orgs","repos_url":"https://api.github.com/users/savrus/repos","events_url":"https://api.github.com/users/savrus/events{/privacy}","received_events_url":"https://api.github.com/users/savrus/received_events","type":"User","site_admin":false},"labels":[{"id":37334597,"node_id":"MDU6TGFiZWwzNzMzNDU5Nw==","url":"https://api.github.com/repos/scipy/scipy/labels/defect","name":"defect","color":"e11d21","default":false},{"id":37341011,"node_id":"MDU6TGFiZWwzNzM0MTAxMQ==","url":"https://api.github.com/repos/scipy/scipy/labels/scipy.optimize","name":"scipy.optimize","color":"207de5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-02T22:04:22Z","updated_at":"2018-06-21T23:01:06Z","closed_at":"2018-06-21T23:01:06Z","author_association":"NONE","body":"optmize.linprog produces wrong answer with default bounds (which are (0, None)) However the answer is correct if the boundary condition is moved to constraints.\r\n\r\n### Reproducing code example:\r\n```\r\nimport scipy.optimize\r\n\r\nc = [-10, 10, 6, 3]\r\nA= [\r\n    [8, -8, -4, 6],\r\n    [-8, 8, 4, -6],\r\n    [-4, 4, 8, -4],\r\n    [3, -3, -3, -10]\r\n]\r\nb = [9, -9, -9, -4]\r\nbounds = [(0, None), (0, None), (0, None), (0, None)]\r\n\r\nres1 = scipy.optimize.linprog(c, A, b, bounds=bounds)\r\nprint res1\r\nprint\r\n\r\nA.append([0, 0, -1, 0])\r\nb.append(0)\r\nbounds[2] = (None, None)\r\n\r\nres2 = scipy.optimize.linprog(c, A, b, bounds=bounds)\r\nprint res2\r\nprint\r\n\r\nassert not (res1.success and res2.success) or abs(res1.fun - res2.fun) < 1\r\n```\r\n\r\n### Error message:\r\n```\r\n     fun: 100.00000000000004\r\n message: 'Optimization terminated successfully.'\r\n     nit: 5\r\n   slack: array([   0.  ,    0.  ,    0.  ,  122.75])\r\n  status: 0\r\n success: True\r\n       x: array([  0.  ,   6.25,   1.  ,  10.5 ])\r\n\r\n     fun: 36.000000000000028\r\n message: 'Optimization terminated successfully.'\r\n     nit: 7\r\n   slack: array([  0.00000000e+00,  -8.88178420e-16,   0.00000000e+00,\r\n         4.77500000e+01,   0.00000000e+00])\r\n  status: 0\r\n success: True\r\n       x: array([ 0.  ,  2.25,  0.  ,  4.5 ])\r\n\r\nTraceback (most recent call last):\r\n  File \"buglinprog.py\", line 25, in <module>\r\n    assert not (res1.success and res2.success) or abs(res1.fun - res2.fun) < 1\r\nAssertionError\r\n```\r\n\r\n### Scipy/Numpy/Python version information:\r\n```\r\n('1.0.1', '1.8.2', sys.version_info(major=2, minor=7, micro=6, releaselevel='final', serial=0))\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/scipy/scipy/issues/comments/399269732","html_url":"https://github.com/scipy/scipy/issues/8662#issuecomment-399269732","issue_url":"https://api.github.com/repos/scipy/scipy/issues/8662","id":399269732,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTI2OTczMg==","user":{"login":"mdhaber","id":6570539,"node_id":"MDQ6VXNlcjY1NzA1Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/6570539?v=4","gravatar_id":"","url":"https://api.github.com/users/mdhaber","html_url":"https://github.com/mdhaber","followers_url":"https://api.github.com/users/mdhaber/followers","following_url":"https://api.github.com/users/mdhaber/following{/other_user}","gists_url":"https://api.github.com/users/mdhaber/gists{/gist_id}","starred_url":"https://api.github.com/users/mdhaber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdhaber/subscriptions","organizations_url":"https://api.github.com/users/mdhaber/orgs","repos_url":"https://api.github.com/users/mdhaber/repos","events_url":"https://api.github.com/users/mdhaber/events{/privacy}","received_events_url":"https://api.github.com/users/mdhaber/received_events","type":"User","site_admin":false},"created_at":"2018-06-21T23:01:06Z","updated_at":"2018-06-21T23:01:06Z","author_association":"CONTRIBUTOR","body":"Closed via #8909"}}
{"actor":{"display_login":"mdhaber"}}