{"action":"created","issue":{"url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/27","labels_url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/27/comments","events_url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/27/events","html_url":"https://github.com/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/27","id":111272799,"number":27,"title":"Fix doesIntersectionContain for mode=\"i\"","user":{"login":"pgagarinov","id":4868370,"avatar_url":"https://avatars.githubusercontent.com/u/4868370?v=3","gravatar_id":"","url":"https://api.github.com/users/pgagarinov","html_url":"https://github.com/pgagarinov","followers_url":"https://api.github.com/users/pgagarinov/followers","following_url":"https://api.github.com/users/pgagarinov/following{/other_user}","gists_url":"https://api.github.com/users/pgagarinov/gists{/gist_id}","starred_url":"https://api.github.com/users/pgagarinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgagarinov/subscriptions","organizations_url":"https://api.github.com/users/pgagarinov/orgs","repos_url":"https://api.github.com/users/pgagarinov/repos","events_url":"https://api.github.com/users/pgagarinov/events{/privacy}","received_events_url":"https://api.github.com/users/pgagarinov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"AiLubimov","id":15003024,"avatar_url":"https://avatars.githubusercontent.com/u/15003024?v=3","gravatar_id":"","url":"https://api.github.com/users/AiLubimov","html_url":"https://github.com/AiLubimov","followers_url":"https://api.github.com/users/AiLubimov/followers","following_url":"https://api.github.com/users/AiLubimov/following{/other_user}","gists_url":"https://api.github.com/users/AiLubimov/gists{/gist_id}","starred_url":"https://api.github.com/users/AiLubimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AiLubimov/subscriptions","organizations_url":"https://api.github.com/users/AiLubimov/orgs","repos_url":"https://api.github.com/users/AiLubimov/repos","events_url":"https://api.github.com/users/AiLubimov/events{/privacy}","received_events_url":"https://api.github.com/users/AiLubimov/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/milestones/2","html_url":"https://github.com/SystemAnalysisDpt-CMC-MSU/ellipsoids/milestones/Autumn-Winter%202015","labels_url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/milestones/2/labels","id":1357610,"number":2,"title":"Autumn-Winter 2015","description":"","creator":{"login":"pgagarinov","id":4868370,"avatar_url":"https://avatars.githubusercontent.com/u/4868370?v=3","gravatar_id":"","url":"https://api.github.com/users/pgagarinov","html_url":"https://github.com/pgagarinov","followers_url":"https://api.github.com/users/pgagarinov/followers","following_url":"https://api.github.com/users/pgagarinov/following{/other_user}","gists_url":"https://api.github.com/users/pgagarinov/gists{/gist_id}","starred_url":"https://api.github.com/users/pgagarinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgagarinov/subscriptions","organizations_url":"https://api.github.com/users/pgagarinov/orgs","repos_url":"https://api.github.com/users/pgagarinov/repos","events_url":"https://api.github.com/users/pgagarinov/events{/privacy}","received_events_url":"https://api.github.com/users/pgagarinov/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":0,"state":"open","created_at":"2015-10-15T16:08:29Z","updated_at":"2015-10-15T16:09:20Z","due_on":"2017-12-20T21:00:00Z","closed_at":null},"comments":1,"created_at":"2015-10-13T21:16:24Z","updated_at":"2015-10-17T16:57:37Z","closed_at":null,"body":"doesIntersectionContain method uses qcqp subfunction for the intersection case (mode = 'i')\r\nqcqp function uses minimization of quadratic form\r\n\r\nminimize(xVec'*invQMat*xVec + 2*(-invQMat*qVec)'*xVec + ...\r\n    (qVec'*invQMat*qVec - 1))\r\n\t\r\nwhich is incorrect and contradicts the function description in the help header.\r\n\r\nAll this means that there are no any tests right now neither in \r\nC:\\Users\\Administrator\\Documents\\_Ellipsoids\\ellipsoids\\products\\+elltool\\+core\\+test\\+mlunit\\EllSecTCMultiDim.m\r\nnor in any other test case that check this particular case of intersection. \r\n\r\nPlease \r\n1) Write a few non-trivial tests that check that particular case and make sure that they fail. Or, if you find some existing tests from\r\nEllSecTCMultiDim (or any other test case) that can be slightly tweaked/enhanced to capture this problem - do that instead of writing completely new tests.\r\n2) Change minimize to maximize and make sure that all the tests pass (old and new).\r\n"},"comment":{"url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/comments/148933995","html_url":"https://github.com/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/27#issuecomment-148933995","issue_url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/27","id":148933995,"user":{"login":"pgagarinov","id":4868370,"avatar_url":"https://avatars.githubusercontent.com/u/4868370?v=3","gravatar_id":"","url":"https://api.github.com/users/pgagarinov","html_url":"https://github.com/pgagarinov","followers_url":"https://api.github.com/users/pgagarinov/followers","following_url":"https://api.github.com/users/pgagarinov/following{/other_user}","gists_url":"https://api.github.com/users/pgagarinov/gists{/gist_id}","starred_url":"https://api.github.com/users/pgagarinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgagarinov/subscriptions","organizations_url":"https://api.github.com/users/pgagarinov/orgs","repos_url":"https://api.github.com/users/pgagarinov/repos","events_url":"https://api.github.com/users/pgagarinov/events{/privacy}","received_events_url":"https://api.github.com/users/pgagarinov/received_events","type":"User","site_admin":false},"created_at":"2015-10-17T16:57:37Z","updated_at":"2015-10-17T16:57:37Z","body":"Good evening, \r\nI've found that when I replace minimize to maximize cvx throw error:\r\n\"Cannot maximize a(n) convex expression.\"\r\n\r\nThere are writen following\r\n\"CVX supports three different types of disciplined convex programs:\r\nA minimization problem, consisting of a convex objective function and zero or more constraints.\r\nA maximization problem, consisting of a concave objective function and zero or more constraints.\r\nA feasibility problem, consisting of one or more constraints and no objective.\"\r\non the http://web.cvxr.com/cvx/doc/dcp.html \"Top-level rules\" section.\r\n\r\nSo, does I need to realize this functionality, either it is too hard for warm-up exercise?\r\n\r\nThanks,\r\nLubimov A. I. \r\n-----------------------------------------------------\r\nPeter Gagarinov\r\nTo: Arthur \r\nSee section 4.4 on page 152 in Boyd's \"Convex Optimization\"\r\nhttps://drive.google.com/open?id=0B5OqL4IVOIC8RHpWYTRvYlRGeHc\r\nthat confirms that the problem is not convex so you are right that it is not trivial. I hoped that CVX solver can actually handle this problem by at least finding a local maximum but looks like it cannot do it. \r\n\r\nI suggest the following plan to be 100%:\r\n\r\n1) you create a simple test that makes sure that the function as it is implemented right now (with minimum) doesn't work correctly i.e. it cannot correctly determine if an ellipsoid belongs to an intersection of other ellipsoids.\r\n\r\n2) You change the implementation to use ellipsoid.doesContain function to veryfy that fstEll is contained within each of ellipsoids from secEllArr. Please note that doesContain uses S-procedure to check for an ellipsoid containment (see page 655 from the same book).\r\n\r\n3) You make sure that the tests now pass."}}