{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaOpt/SCS.jl/issues/40","labels_url":"https://api.github.com/repos/JuliaOpt/SCS.jl/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/JuliaOpt/SCS.jl/issues/40/comments","events_url":"https://api.github.com/repos/JuliaOpt/SCS.jl/issues/40/events","html_url":"https://github.com/JuliaOpt/SCS.jl/issues/40","id":100170912,"number":40,"title":"incorrect dual solution","user":{"login":"mlubin","id":1733683,"avatar_url":"https://avatars.githubusercontent.com/u/1733683?v=3","gravatar_id":"","url":"https://api.github.com/users/mlubin","html_url":"https://github.com/mlubin","followers_url":"https://api.github.com/users/mlubin/followers","following_url":"https://api.github.com/users/mlubin/following{/other_user}","gists_url":"https://api.github.com/users/mlubin/gists{/gist_id}","starred_url":"https://api.github.com/users/mlubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlubin/subscriptions","organizations_url":"https://api.github.com/users/mlubin/orgs","repos_url":"https://api.github.com/users/mlubin/repos","events_url":"https://api.github.com/users/mlubin/events{/privacy}","received_events_url":"https://api.github.com/users/mlubin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-10T21:20:33Z","updated_at":"2015-08-10T21:46:53Z","closed_at":null,"body":"```\r\nusing MathProgBase\r\nusing SCS\r\nsolver = SCSSolver()\r\n# min  x\r\n# s.t. y ≥ 1\r\n#      x² + y² ≤ 1\r\n# in conic form:\r\n# min  x\r\n# s.t.  -1 + y ∈ R₊\r\n#        1 - t ∈ {0}\r\n#      (t,x,y) ∈ SOC₃\r\n\r\nb = [-1, 1, 0, 0, 0]\r\nA = [ 0 -1 0\r\n      0 0 1\r\n      0 0 -1\r\n      -1 0 0\r\n      0 -1 0 ]\r\nc = [ 1, 0, 0 ]\r\nconstr_cones = [(:NonNeg,1:1),(:Zero,2:2),(:SOC,3:5)]\r\nvar_cones = [(:Free,1:3)]\r\n\r\nm = MathProgBase.model(solver)\r\nMathProgBase.loadconicproblem!(m, c, A, b, constr_cones, var_cones)\r\nMathProgBase.optimize!(m)\r\n@show MathProgBase.status(m)\r\n@show MathProgBase.getobjval(m)\r\n@show MathProgBase.getsolution(m)\r\ny = MathProgBase.getconicdual(m)\r\n@show y\r\n@show -dot(b,y) # should match primal objective\r\n@show c + A'y # should be all zeros, since variables are free\r\n```\r\ngives\r\n```\r\nMathProgBase.status(m) => :Optimal\r\nMathProgBase.getobjval(m) => -0.0005944812927751632\r\nMathProgBase.getsolution(m) => [-0.0005944812927751632,1.0000244304176664,1.000024520748117]\r\ny => [1663.6755938289195,-1663.676176978334,-1663.6760356732946,-1.0000001698583723,1663.675735133884]\r\n-(dot(b,y)) => 3327.3517708072536\r\nc + A' * y => [2.0000001698583723,-3327.3513289628036,-0.00014130503950582352]\r\n```\r\nThe dual objective doesn't match the primal, and dual feasibility isn't satisfied, according to the [MPB primal/dual pair](http://mathprogbasejl.readthedocs.org/en/latest/conic.html).\r\nCC @kaarthiksundar @karanveerm "},"comment":{"url":"https://api.github.com/repos/JuliaOpt/SCS.jl/issues/comments/129621285","html_url":"https://github.com/JuliaOpt/SCS.jl/issues/40#issuecomment-129621285","issue_url":"https://api.github.com/repos/JuliaOpt/SCS.jl/issues/40","id":129621285,"user":{"login":"mlubin","id":1733683,"avatar_url":"https://avatars.githubusercontent.com/u/1733683?v=3","gravatar_id":"","url":"https://api.github.com/users/mlubin","html_url":"https://github.com/mlubin","followers_url":"https://api.github.com/users/mlubin/followers","following_url":"https://api.github.com/users/mlubin/following{/other_user}","gists_url":"https://api.github.com/users/mlubin/gists{/gist_id}","starred_url":"https://api.github.com/users/mlubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlubin/subscriptions","organizations_url":"https://api.github.com/users/mlubin/orgs","repos_url":"https://api.github.com/users/mlubin/repos","events_url":"https://api.github.com/users/mlubin/events{/privacy}","received_events_url":"https://api.github.com/users/mlubin/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T21:46:53Z","updated_at":"2015-08-10T21:46:53Z","body":"This test is a bit rough since there's no strictly feasible point. But if you relax the constraint to ``y >= 0.9``, you still don't get a dual feasible solution and there's a negative duality gap."}}