{"action":"reopened","issue":{"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/409","labels_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/409/labels{/name}","comments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/409/comments","events_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/409/events","html_url":"https://github.com/JuliaOpt/JuMP.jl/issues/409","id":60012544,"number":409,"title":"getValue for nonlinear expressions","user":{"login":"rgiordan","id":4494910,"avatar_url":"https://avatars.githubusercontent.com/u/4494910?v=3","gravatar_id":"","url":"https://api.github.com/users/rgiordan","html_url":"https://github.com/rgiordan","followers_url":"https://api.github.com/users/rgiordan/followers","following_url":"https://api.github.com/users/rgiordan/following{/other_user}","gists_url":"https://api.github.com/users/rgiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/rgiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgiordan/subscriptions","organizations_url":"https://api.github.com/users/rgiordan/orgs","repos_url":"https://api.github.com/users/rgiordan/repos","events_url":"https://api.github.com/users/rgiordan/events{/privacy}","received_events_url":"https://api.github.com/users/rgiordan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-05T20:40:56Z","updated_at":"2015-03-06T21:21:50Z","closed_at":null,"body":"Right now, it looks like getValue works for defExpr but not defNLExpr expressions (an example is below).  We're developing a fairly complex model with a lot of interdependent nonlinear expressions, and a feature like this would be very convenient for unit testing and debugging.\r\n\r\n```\r\njulia> using JuMP\r\njulia> m = Model()\r\nFeasibility problem with:\r\n * 0 linear constraints\r\n * 0 variables\r\nSolver set to Default\r\njulia> @defVar(m, 0 <= beta <= 1)\r\nbeta\r\njulia> @defExpr(beta2, beta * beta)\r\nbeta² + 0\r\njulia> setValue(beta, 0.5)\r\njulia> getValue(beta)\r\n0.5\r\njulia> getValue(beta2)\r\n0.25\r\njulia> @defNLExpr(beta2nl, beta * beta)\r\nParametricExpression{0}(:(__R##24112##beta * __R##24112##beta),(symbol(\"__R##24112##beta\"),),(beta,),(),0x557fb675ca10c687)\r\njulia> getValue(beta2nl)\r\nERROR: `getValue` has no method matching getValue(::ParametricExpression{0})\r\n```"}}