{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/627","repository_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl","labels_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/627/labels{/name}","comments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/627/comments","events_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/627/events","html_url":"https://github.com/JuliaOpt/JuMP.jl/issues/627","id":120514186,"number":627,"title":"setName is not working well on this example","user":{"login":"emreyamangil","id":13877722,"avatar_url":"https://avatars.githubusercontent.com/u/13877722?v=3","gravatar_id":"","url":"https://api.github.com/users/emreyamangil","html_url":"https://github.com/emreyamangil","followers_url":"https://api.github.com/users/emreyamangil/followers","following_url":"https://api.github.com/users/emreyamangil/following{/other_user}","gists_url":"https://api.github.com/users/emreyamangil/gists{/gist_id}","starred_url":"https://api.github.com/users/emreyamangil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emreyamangil/subscriptions","organizations_url":"https://api.github.com/users/emreyamangil/orgs","repos_url":"https://api.github.com/users/emreyamangil/repos","events_url":"https://api.github.com/users/emreyamangil/events{/privacy}","received_events_url":"https://api.github.com/users/emreyamangil/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/labels/printing","name":"printing","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-05T00:31:56Z","updated_at":"2016-03-16T14:05:42Z","closed_at":null,"body":"The following example doesn't print correctly the labels of the variables, is this a known issue? many thanks!!!\r\n\r\n\r\njulia> using JuMP\r\n\r\njulia> using CPLEX\r\n\r\njulia> numBins = [2,3,1]\r\n3-element Array{Int64,1}:\r\n 2\r\n 3\r\n 1\r\n\r\njulia> m = Model(solver=CplexSolver())\r\nFeasibility problem with:\r\n * 0 linear constraints\r\n * 0 variables\r\nSolver set to CPLEX.Cplex\r\n\r\njulia> N = 3\r\n3\r\n\r\njulia> t = Array(Vector{Variable},N)\r\n3-element Array{Array{JuMP.Variable,1},1}:\r\n #undef\r\n #undef\r\n #undef\r\n\r\njulia> for k in 1:N\r\n               @defVar(m, t[k][j=1:numBins[k]], Bin)\r\n       end\r\n\r\njulia> for k = 1:N\r\n       for j = 1:numBins[k]\r\n       setName(t[k][j], \"t[$k][$j]\")\r\n       end\r\n       end\r\n\r\njulia> println(m)\r\nMin 0\r\nSubject to\r\n t[k][j] ∈ {0,1} ∀ j ∈ {1,2}\r\n t[k][j] ∈ {0,1} ∀ j ∈ {1,2,3}\r\n t[k][j] ∈ {0,1} ∀ j ∈ {1}\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/comments/197346619","html_url":"https://github.com/JuliaOpt/JuMP.jl/issues/627#issuecomment-197346619","issue_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/627","id":197346619,"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":"2016-03-16T14:05:42Z","updated_at":"2016-03-16T14:05:42Z","body":"Note on JuMP master you can replace the setName loop with:\r\n```\r\n@defVar(m.m, x[1:10, 1:2], basename=\"x[$myind]\")\r\n```"}}