{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/comments/33530931","id":33530931,"diff_hunk":"@@ -95,6 +95,23 @@ This form of constructing variables is not considered idiomatic JuMP code.\n     The reference to the first set of variables has been lost, although they will remain\n     in the model.\n \n+Semidefinite variables\n+^^^^^^^^^^^^^^^^^^^^^^\n+\n+JuMP supports modeling with `semidefinite variables <https://en.wikipedia.org/wiki/Semidefinite_programming>`_. A square symmetric matrix :math:`X` is semidefinite if all eigenvalues are nonnegative; this is typically denoted by :math:`X \\succeq 0`. A\n+\n+    @defVar(m, X[1:3,1:3], SDP)\n+\n+Note in particular the indexing: 1) exactly two index sets must be specified, 2) they must both be unit ranges starting at 1. Variable bounds have special meaning with the ``SDP`` annotation; for example,\n+\n+    n = 3\n+    @defVar(m, X[1:n,1:n] >= eye(n), SDP)\n+\n+constrains :math:`X - I \\succeq 0`. In particular, this is (almost) equivalent to","path":"doc/refvariable.rst","position":16,"original_position":16,"commit_id":"501894f13aafa37813d2cbbf3e75258503413840","original_commit_id":"501894f13aafa37813d2cbbf3e75258503413840","user":{"login":"joehuchette","id":1373010,"avatar_url":"https://avatars.githubusercontent.com/u/1373010?v=3","gravatar_id":"","url":"https://api.github.com/users/joehuchette","html_url":"https://github.com/joehuchette","followers_url":"https://api.github.com/users/joehuchette/followers","following_url":"https://api.github.com/users/joehuchette/following{/other_user}","gists_url":"https://api.github.com/users/joehuchette/gists{/gist_id}","starred_url":"https://api.github.com/users/joehuchette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joehuchette/subscriptions","organizations_url":"https://api.github.com/users/joehuchette/orgs","repos_url":"https://api.github.com/users/joehuchette/repos","events_url":"https://api.github.com/users/joehuchette/events{/privacy}","received_events_url":"https://api.github.com/users/joehuchette/received_events","type":"User","site_admin":false},"body":"``@defVar(m, X[1:3,1:3], SDP)`` only adds n(n+1)/2 ``Variable``s to the model, then returns a ``JuMPArray`` with ``X[i,j] == X[j,i]``. See [here](https://github.com/JuliaOpt/JuMP.jl/blob/501894f13aafa37813d2cbbf3e75258503413840/src/macros.jl#L84-L101).  So it is encoded differently, though a solver with any presolve at all would render them equivalently.","created_at":"2015-06-30T00:46:36Z","updated_at":"2015-06-30T00:46:36Z","html_url":"https://github.com/JuliaOpt/JuMP.jl/pull/453#discussion_r33530931","pull_request_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/453","_links":{"self":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/comments/33530931"},"html":{"href":"https://github.com/JuliaOpt/JuMP.jl/pull/453#discussion_r33530931"},"pull_request":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/453"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/453","id":36097524,"html_url":"https://github.com/JuliaOpt/JuMP.jl/pull/453","diff_url":"https://github.com/JuliaOpt/JuMP.jl/pull/453.diff","patch_url":"https://github.com/JuliaOpt/JuMP.jl/pull/453.patch","issue_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/453","number":453,"state":"open","locked":false,"title":"[RFC] Yet another SDP branch","user":{"login":"joehuchette","id":1373010,"avatar_url":"https://avatars.githubusercontent.com/u/1373010?v=3","gravatar_id":"","url":"https://api.github.com/users/joehuchette","html_url":"https://github.com/joehuchette","followers_url":"https://api.github.com/users/joehuchette/followers","following_url":"https://api.github.com/users/joehuchette/following{/other_user}","gists_url":"https://api.github.com/users/joehuchette/gists{/gist_id}","starred_url":"https://api.github.com/users/joehuchette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joehuchette/subscriptions","organizations_url":"https://api.github.com/users/joehuchette/orgs","repos_url":"https://api.github.com/users/joehuchette/repos","events_url":"https://api.github.com/users/joehuchette/events{/privacy}","received_events_url":"https://api.github.com/users/joehuchette/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-24T03:32:40Z","updated_at":"2015-06-30T00:46:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4953e68fa348b722fb4b61fc0698922237fac82a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/453/commits","review_comments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/453/comments","review_comment_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/453/comments","statuses_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/statuses/501894f13aafa37813d2cbbf3e75258503413840","head":{"label":"JuliaOpt:sdp3","ref":"sdp3","sha":"501894f13aafa37813d2cbbf3e75258503413840","user":{"login":"JuliaOpt","id":5667382,"avatar_url":"https://avatars.githubusercontent.com/u/5667382?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaOpt","html_url":"https://github.com/JuliaOpt","followers_url":"https://api.github.com/users/JuliaOpt/followers","following_url":"https://api.github.com/users/JuliaOpt/following{/other_user}","gists_url":"https://api.github.com/users/JuliaOpt/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaOpt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaOpt/subscriptions","organizations_url":"https://api.github.com/users/JuliaOpt/orgs","repos_url":"https://api.github.com/users/JuliaOpt/repos","events_url":"https://api.github.com/users/JuliaOpt/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaOpt/received_events","type":"Organization","site_admin":false},"repo":{"id":6150069,"name":"JuMP.jl","full_name":"JuliaOpt/JuMP.jl","owner":{"login":"JuliaOpt","id":5667382,"avatar_url":"https://avatars.githubusercontent.com/u/5667382?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaOpt","html_url":"https://github.com/JuliaOpt","followers_url":"https://api.github.com/users/JuliaOpt/followers","following_url":"https://api.github.com/users/JuliaOpt/following{/other_user}","gists_url":"https://api.github.com/users/JuliaOpt/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaOpt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaOpt/subscriptions","organizations_url":"https://api.github.com/users/JuliaOpt/orgs","repos_url":"https://api.github.com/users/JuliaOpt/repos","events_url":"https://api.github.com/users/JuliaOpt/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaOpt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaOpt/JuMP.jl","description":"Modeling language for Mathematical Programming (linear, mixed-integer, conic, nonlinear)","fork":false,"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl","forks_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/forks","keys_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/teams","hooks_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/events","assignees_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/tags","blobs_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/subscription","commits_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/merges","archive_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/downloads","issues_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/releases{/id}","created_at":"2012-10-10T00:34:45Z","updated_at":"2015-06-26T19:47:33Z","pushed_at":"2015-06-30T00:32:55Z","git_url":"git://github.com/JuliaOpt/JuMP.jl.git","ssh_url":"git@github.com:JuliaOpt/JuMP.jl.git","clone_url":"https://github.com/JuliaOpt/JuMP.jl.git","svn_url":"https://github.com/JuliaOpt/JuMP.jl","homepage":"","size":8702,"stargazers_count":158,"watchers_count":158,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":62,"forks":41,"open_issues":62,"watchers":158,"default_branch":"master"}},"base":{"label":"JuliaOpt:master","ref":"master","sha":"b71b9be3e1c80aa565c5bb6ca2ec52056b298289","user":{"login":"JuliaOpt","id":5667382,"avatar_url":"https://avatars.githubusercontent.com/u/5667382?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaOpt","html_url":"https://github.com/JuliaOpt","followers_url":"https://api.github.com/users/JuliaOpt/followers","following_url":"https://api.github.com/users/JuliaOpt/following{/other_user}","gists_url":"https://api.github.com/users/JuliaOpt/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaOpt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaOpt/subscriptions","organizations_url":"https://api.github.com/users/JuliaOpt/orgs","repos_url":"https://api.github.com/users/JuliaOpt/repos","events_url":"https://api.github.com/users/JuliaOpt/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaOpt/received_events","type":"Organization","site_admin":false},"repo":{"id":6150069,"name":"JuMP.jl","full_name":"JuliaOpt/JuMP.jl","owner":{"login":"JuliaOpt","id":5667382,"avatar_url":"https://avatars.githubusercontent.com/u/5667382?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaOpt","html_url":"https://github.com/JuliaOpt","followers_url":"https://api.github.com/users/JuliaOpt/followers","following_url":"https://api.github.com/users/JuliaOpt/following{/other_user}","gists_url":"https://api.github.com/users/JuliaOpt/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaOpt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaOpt/subscriptions","organizations_url":"https://api.github.com/users/JuliaOpt/orgs","repos_url":"https://api.github.com/users/JuliaOpt/repos","events_url":"https://api.github.com/users/JuliaOpt/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaOpt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaOpt/JuMP.jl","description":"Modeling language for Mathematical Programming (linear, mixed-integer, conic, nonlinear)","fork":false,"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl","forks_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/forks","keys_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/teams","hooks_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/events","assignees_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/tags","blobs_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/subscription","commits_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/merges","archive_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/downloads","issues_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/releases{/id}","created_at":"2012-10-10T00:34:45Z","updated_at":"2015-06-26T19:47:33Z","pushed_at":"2015-06-30T00:32:55Z","git_url":"git://github.com/JuliaOpt/JuMP.jl.git","ssh_url":"git@github.com:JuliaOpt/JuMP.jl.git","clone_url":"https://github.com/JuliaOpt/JuMP.jl.git","svn_url":"https://github.com/JuliaOpt/JuMP.jl","homepage":"","size":8702,"stargazers_count":158,"watchers_count":158,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":62,"forks":41,"open_issues":62,"watchers":158,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/453"},"html":{"href":"https://github.com/JuliaOpt/JuMP.jl/pull/453"},"issue":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/453"},"comments":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/453/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/453/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/453/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/statuses/501894f13aafa37813d2cbbf3e75258503413840"}}}}