{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues/667","repository_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl","labels_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues/667/labels{/name}","comments_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues/667/comments","events_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues/667/events","html_url":"https://github.com/JuliaNLSolvers/Optim.jl/issues/667","id":356612983,"node_id":"MDU6SXNzdWUzNTY2MTI5ODM=","number":667,"title":"Box Constraints","user":{"login":"iwelch","id":1320147,"node_id":"MDQ6VXNlcjEzMjAxNDc=","avatar_url":"https://avatars0.githubusercontent.com/u/1320147?v=4","gravatar_id":"","url":"https://api.github.com/users/iwelch","html_url":"https://github.com/iwelch","followers_url":"https://api.github.com/users/iwelch/followers","following_url":"https://api.github.com/users/iwelch/following{/other_user}","gists_url":"https://api.github.com/users/iwelch/gists{/gist_id}","starred_url":"https://api.github.com/users/iwelch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwelch/subscriptions","organizations_url":"https://api.github.com/users/iwelch/orgs","repos_url":"https://api.github.com/users/iwelch/repos","events_url":"https://api.github.com/users/iwelch/events{/privacy}","received_events_url":"https://api.github.com/users/iwelch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-03T23:29:35Z","updated_at":"2018-09-09T17:05:37Z","closed_at":"2018-09-06T20:33:54Z","author_association":"NONE","body":"\r\njulia 1.0.  \"Optim\"              => v\"0.17.0\"\r\n\r\n```\r\njulia> using Optim\r\n\r\njulia> myfun(x)= (x[1]-2)^2 + (x[2]-3)^2 + ((x[1]-2)*(x[2]-3))^2;\r\n\r\njulia> inner_optimizer= GradientDescent()\r\n\r\njulia>  results = optimize( myfun, [-Inf,-Inf], [Inf,Inf], initial_x, Fminbox(inner_optimizer))\r\nResults of Optimization Algorithm\r\n * Algorithm: Fminbox with Gradient Descent\r\n * Starting Point: [2.0,2.0]\r\n * Minimizer: [2.0,2.9999999999973572]\r\n * Minimum: 6.984259e-24\r\n * Iterations: 1\r\n * Convergence: true\r\n   * |x - x'| ≤ 0.0e+00: false\r\n     |x - x'| = 1.00e+00\r\n   * |f(x) - f(x')| ≤ 0.0e+00 |f(x)|: false\r\n     |f(x) - f(x')| = 1.43e+23 |f(x)|\r\n   * |g(x)| ≤ 1.0e-08: true\r\n     |g(x)| = 5.29e-12\r\n   * Stopped by an increasing objective: false\r\n   * Reached Maximum Number of Iterations: false\r\n * Objective Calls: 3\r\n * Gradient Calls: 3\r\n\r\njulia>  results = optimize( myfun, [-Inf,-Inf], [Inf,1.0], initial_x, Fminbox(inner_optimizer))\r\nERROR: UndefVarError: ind2sub not defined\r\nStacktrace:\r\n [1] optimize(::OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Fminbox{GradientDescent{LineSearches.InitialPrevious{Float64},LineSearches.HagerZhang{Float64,Base.RefValue{Bool}},Nothing,getfield(Optim, Symbol(\"##12#14\"))},Float64,getfield(Optim, Symbol(\"##46#48\"))}, ::Optim.Options{Float64,Nothing}) at /Users/ivo/.julia/packages/Optim/fabGe/src/multivariate/solvers/constrained/fminbox.jl:206\r\n [2] #optimize#53(::Bool, ::Symbol, ::Function, ::Function, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Fminbox{GradientDescent{LineSearches.InitialPrevious{Float64},LineSearches.HagerZhang{Float64,Base.RefValue{Bool}},Nothing,getfield(Optim, Symbol(\"##12#14\"))},Float64,getfield(Optim, Symbol(\"##46#48\"))}, ::Optim.Options{Float64,Nothing}) at /Users/ivo/.julia/packages/Optim/fabGe/src/multivariate/solvers/constrained/fminbox.jl:164\r\n [3] optimize at /Users/ivo/.julia/packages/Optim/fabGe/src/multivariate/solvers/constrained/fminbox.jl:163 [inlined] (repeats 2 times)\r\n [4] top-level scope at none:0\r\n```\r\n\r\n[a] what am I doing wrong?\r\n\r\n[b] could the error message be more informative?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues/comments/419729881","html_url":"https://github.com/JuliaNLSolvers/Optim.jl/issues/667#issuecomment-419729881","issue_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues/667","id":419729881,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTcyOTg4MQ==","user":{"login":"pkofod","id":8431156,"node_id":"MDQ6VXNlcjg0MzExNTY=","avatar_url":"https://avatars0.githubusercontent.com/u/8431156?v=4","gravatar_id":"","url":"https://api.github.com/users/pkofod","html_url":"https://github.com/pkofod","followers_url":"https://api.github.com/users/pkofod/followers","following_url":"https://api.github.com/users/pkofod/following{/other_user}","gists_url":"https://api.github.com/users/pkofod/gists{/gist_id}","starred_url":"https://api.github.com/users/pkofod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkofod/subscriptions","organizations_url":"https://api.github.com/users/pkofod/orgs","repos_url":"https://api.github.com/users/pkofod/repos","events_url":"https://api.github.com/users/pkofod/events{/privacy}","received_events_url":"https://api.github.com/users/pkofod/received_events","type":"User","site_admin":false},"created_at":"2018-09-09T17:05:37Z","updated_at":"2018-09-09T17:05:37Z","author_association":"COLLABORATOR","body":"https://github.com/JuliaLang/METADATA.jl/pull/17878"}}
{"actor":{"display_login":"pkofod"}}