{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/303","repository_url":"https://api.github.com/repos/JuliaOpt/Optim.jl","labels_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/303/comments","events_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/303/events","html_url":"https://github.com/JuliaOpt/Optim.jl/pull/303","id":188022667,"number":303,"title":"Constrained optimization episode 2: revenge of the slack variables","user":{"login":"timholy","id":1525481,"avatar_url":"https://avatars.githubusercontent.com/u/1525481?v=3","gravatar_id":"","url":"https://api.github.com/users/timholy","html_url":"https://github.com/timholy","followers_url":"https://api.github.com/users/timholy/followers","following_url":"https://api.github.com/users/timholy/following{/other_user}","gists_url":"https://api.github.com/users/timholy/gists{/gist_id}","starred_url":"https://api.github.com/users/timholy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timholy/subscriptions","organizations_url":"https://api.github.com/users/timholy/orgs","repos_url":"https://api.github.com/users/timholy/repos","events_url":"https://api.github.com/users/timholy/events{/privacy}","received_events_url":"https://api.github.com/users/timholy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"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},"assignees":[{"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}],"milestone":null,"comments":33,"created_at":"2016-11-08T15:32:20Z","updated_at":"2016-12-16T08:07:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaOpt/Optim.jl/pulls/303","html_url":"https://github.com/JuliaOpt/Optim.jl/pull/303","diff_url":"https://github.com/JuliaOpt/Optim.jl/pull/303.diff","patch_url":"https://github.com/JuliaOpt/Optim.jl/pull/303.patch"},"body":"No matter how the American election turns out, today we have something to celebrate: the beginning of what I hope will be a merge-worthy native Julia constrained optimization framework.\r\n\r\nLong ago said that I would not work on hard-core optimization without a debugger (errors triggered 1 hour into an optimization run are too painful to fix otherwise), but @Keno has delivered, so now it's time for me to pony up. Besides, I've grown tired of maintaining my own fork of Optim and want access to all the goodies and cleanups (*especially* the cleanups) that others have contributed.\r\n\r\nRather than implementing the whole framework at once, I decided to try to keep things \"simple\" (if a ~~1600~~2000 line diff can be called simple) by implementing just one method. I picked the interior-point Newton method, since that seems to be the mostly widely-used and/or described method, and for which the iteration is relatively simple. There are also many, many bells and whistles one could add. But I want to get a basic implementation of *something* merged before going on to other things.\r\n\r\nCompared to #50, there are almost too many differences to mention, as this was a clean start. A few of the highlights:\r\n- it's more in line with the MathProgBase interface (still not a perfect match, but pretty close), for example in [how the bounds are specified](https://github.com/JuliaOpt/Optim.jl/pull/50#issuecomment-37338779) and [how the constraint hessian is requested](https://github.com/JuliaOpt/Optim.jl/pull/50#issuecomment-37261452).\r\n- it supports both equality and inequality constraints\r\n- it should exhibit far greater numerical stability near the edges of the feasible region (this has been a big problem with the approach in #50)\r\n\r\nIt's also worth briefly mentioning that this might have some nice features, though it needs real-world testing for us to know whether these will materialize. For example, unlike Ipopt this is guaranteed to roughly preserve the descent direction of the user's objective function (it will not choose such a high barrier coefficient that it pushes the solution into a different basin).  \r\n\r\nTesting are a mixed bag: there's quite a few tests for the low-level mathematics, but any overall tests (e.g., ones that involve a call to `optimize`) are a work in progress. I'm hoping to make use of CUTEst (https://github.com/JuliaSmoothOptimizers/CUTEst.jl/issues/43#issuecomment-256709346) and do a fairly thorough job, but that will take some time.\r\n\r\nIt's worth noting a few details:\r\n- argument order may be somewhat confused; in some places I adopt mutated-first, in others (where I'm trying to match some preexisting API) it's last. It's my understanding that Optim will eventually migrate to mutated-first, but perhaps this is too inconsistent now\r\n- I needed to customize the line search algorithm to account for constraints, so this goes against the migration to [LineSearches.jl](https://github.com/anriseth/LineSearches.jl) and reintroduces a linesearch method to Optim. Aside from simplicity in making updates (I don't want to be bothered with tagging another package just to make tests for a RFC pass), I kept this here because I was also trying to move towards a more sane linesearch API and so it doesn't fit with our classic functions. (It's based on the fact that anonymous functions are fast with julia 0.5 and higher---if people are unhappy with the overhead this causes on 0.4, tough. We have to write code for the future, not the past.)\r\n\r\nCC @Cody-G, @dpo, @abelsiqueira.\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/comments/267539549","html_url":"https://github.com/JuliaOpt/Optim.jl/pull/303#issuecomment-267539549","issue_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/303","id":267539549,"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},"created_at":"2016-12-16T08:07:42Z","updated_at":"2016-12-16T08:07:42Z","body":"I wonder why the number of iterations in fminbox differs between the linux and mac build..."}}
{"actor":{"display_login":"pkofod"}}