{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/comments/56191402","id":56191402,"diff_hunk":"@@ -49,3 +49,11 @@ objective.fg!(results.minimum, g)\n for i = 1:N\n     @test abs(g[i]) < 3e-3 || (results.minimum[i] < -boxl+1e-3 && g[i] > 0) || (results.minimum[i] > boxl-1e-3 && g[i] < 0)\n end\n+\n+# tests for #180\n+results = Optim.optimize(objective, x0, l, u, Fminbox(); iterations = 2)\n+@test results.iterations == 2\n+@test results.f_minimum == objective.f(results.minimum)\n+\n+results = Optim.optimize(objective, x0, l, u, Fminbox(); optimizer_o = OptimizationOptions(iterations = 2))\n+@test results.iterations == 470","path":"test/constrained.jl","position":11,"original_position":11,"commit_id":"1eedee497586819c96859cf80c3a88b89f4a43cb","original_commit_id":"1eedee497586819c96859cf80c3a88b89f4a43cb","user":{"login":"johnmyleswhite","id":22064,"avatar_url":"https://avatars.githubusercontent.com/u/22064?v=3","gravatar_id":"","url":"https://api.github.com/users/johnmyleswhite","html_url":"https://github.com/johnmyleswhite","followers_url":"https://api.github.com/users/johnmyleswhite/followers","following_url":"https://api.github.com/users/johnmyleswhite/following{/other_user}","gists_url":"https://api.github.com/users/johnmyleswhite/gists{/gist_id}","starred_url":"https://api.github.com/users/johnmyleswhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnmyleswhite/subscriptions","organizations_url":"https://api.github.com/users/johnmyleswhite/orgs","repos_url":"https://api.github.com/users/johnmyleswhite/repos","events_url":"https://api.github.com/users/johnmyleswhite/events{/privacy}","received_events_url":"https://api.github.com/users/johnmyleswhite/received_events","type":"User","site_admin":false},"body":"This seems troubling to me. What guarantee do we have that this number of iterations will be performed? If we improved our line search procedure, would this test break?","created_at":"2016-03-15T16:13:55Z","updated_at":"2016-03-15T16:13:55Z","html_url":"https://github.com/JuliaOpt/Optim.jl/pull/180#discussion_r56191402","pull_request_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/180","_links":{"self":{"href":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/comments/56191402"},"html":{"href":"https://github.com/JuliaOpt/Optim.jl/pull/180#discussion_r56191402"},"pull_request":{"href":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/180"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/180","id":61477839,"html_url":"https://github.com/JuliaOpt/Optim.jl/pull/180","diff_url":"https://github.com/JuliaOpt/Optim.jl/pull/180.diff","patch_url":"https://github.com/JuliaOpt/Optim.jl/pull/180.patch","issue_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/180","number":180,"state":"open","locked":false,"title":"Fix minimum value, max iteration break condition, fix the use of appe…","user":{"login":"pkofod","id":8431156,"avatar_url":"https://avatars.githubusercontent.com/u/8431156?v=3","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},"body":"…nd, and remove export.\r\n\r\nFixes #167 \r\n\r\nI don't think it's unreasonable for `f_minimum` to return the objective function value at the minimizer, even if a barrier function was added during optimization.\r\n\r\n<s>I also added `results.iterations >= iterations`. Before, the algorithm could run beyond the stated maximum number of iterations.</s>\r\nI've also added separate outer and inner options.\r\n\r\nAdded `first = false` if in the `first == true` branch of the `append!` part of the code, this fixes the returned `MultivariateOptimizationResults` such that it actually adds all calls and iterations together.","created_at":"2016-03-02T22:24:19Z","updated_at":"2016-03-15T16:13:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4ca69defaa61de499aee706422575705083dede","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/180/commits","review_comments_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/180/comments","review_comment_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/180/comments","statuses_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/statuses/1eedee497586819c96859cf80c3a88b89f4a43cb","head":{"label":"JuliaOpt:pkm/f_minimum","ref":"pkm/f_minimum","sha":"1eedee497586819c96859cf80c3a88b89f4a43cb","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":3933868,"name":"Optim.jl","full_name":"JuliaOpt/Optim.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/Optim.jl","description":"Optimization functions for Julia","fork":false,"url":"https://api.github.com/repos/JuliaOpt/Optim.jl","forks_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/forks","keys_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/teams","hooks_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/events","assignees_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/tags","blobs_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/subscription","commits_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/merges","archive_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/downloads","issues_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/deployments","created_at":"2012-04-04T22:19:35Z","updated_at":"2016-03-14T21:06:38Z","pushed_at":"2016-03-14T10:19:22Z","git_url":"git://github.com/JuliaOpt/Optim.jl.git","ssh_url":"git@github.com:JuliaOpt/Optim.jl.git","clone_url":"https://github.com/JuliaOpt/Optim.jl.git","svn_url":"https://github.com/JuliaOpt/Optim.jl","homepage":"","size":712,"stargazers_count":162,"watchers_count":162,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":27,"forks":57,"open_issues":27,"watchers":162,"default_branch":"master"}},"base":{"label":"JuliaOpt:master","ref":"master","sha":"93cd7c02a9cedc35b071193739adcf217723f92a","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":3933868,"name":"Optim.jl","full_name":"JuliaOpt/Optim.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/Optim.jl","description":"Optimization functions for Julia","fork":false,"url":"https://api.github.com/repos/JuliaOpt/Optim.jl","forks_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/forks","keys_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/teams","hooks_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/events","assignees_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/tags","blobs_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/subscription","commits_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/merges","archive_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/downloads","issues_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/deployments","created_at":"2012-04-04T22:19:35Z","updated_at":"2016-03-14T21:06:38Z","pushed_at":"2016-03-14T10:19:22Z","git_url":"git://github.com/JuliaOpt/Optim.jl.git","ssh_url":"git@github.com:JuliaOpt/Optim.jl.git","clone_url":"https://github.com/JuliaOpt/Optim.jl.git","svn_url":"https://github.com/JuliaOpt/Optim.jl","homepage":"","size":712,"stargazers_count":162,"watchers_count":162,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":27,"forks":57,"open_issues":27,"watchers":162,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/180"},"html":{"href":"https://github.com/JuliaOpt/Optim.jl/pull/180"},"issue":{"href":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/180"},"comments":{"href":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/180/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/180/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/180/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaOpt/Optim.jl/statuses/1eedee497586819c96859cf80c3a88b89f4a43cb"}}}}