Live data from Hacker News

Ask HN: Do you use an optimization solver? Which one? Do you like it?

news.ycombinator.com

51–60 of 158 posts

Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?

#51
post #42
post #2

I would love to use one or more but the process to convert business logic to solver is painful so I ended up having to write a simulated annealing algo in Rust instead. I tried solver.com, Google OR-Tools, and a few other utilities. It was much easier to build a score-calculator for min/max based on user-tweaked parameters, then, jiggle the data, re-calculate score, and keep doing it until there was significant impro…

> so I ended up having to write a simulated annealing algo I think there are much better algorithms in metaheuristic search than just simulated annealing.

would you be able to offer some examples and some discussion of how to choose?

Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?

#52
I've mostly worked on continuous high-dimensional problems (and not as high-dimensional as large neural networks), often times grounded in physical situations, where one can anticipate reasonably convex behavior close to the optima -- things like bundle adjustment, different kinds of generalized calibration, etc. In all these cases, (approximate) second-order optimization methods have worked great (Just throwing out a few non-MECE names eg: Conjugate-Gradient and variants, Levenberg-Marquardt, BFGS, etc.).

In the context of probabilistic modeling, my experiences with belief propagation have been good, but somewhat mixed. Sometimes it feels like mean-field methods could give more bang for the buck given how much less memory they use.

Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?

#53

I loved the JuMP package in Julia for being able to write models once, then swap in different solvers. Most open-source solvers don't handle parallelization well, and they lack the latest research on techniques like branch-cutting and heuristics that can speed things up significantly. In my experience, Gurobi is still leader for linear and MiP solving. But, it's really expensive and the licensing terms seem anachroni…

I haven't looked at JuMP in a while - the last time I tried it was when I was still doing personal blogging ( https://ryanjoneil.github.io/posts/2014-07-18-are-we-getting... ). I remember liking JuMP, but Julia itself didn't feel ready yet. Some of the packages had weird behaviors. For example, Gadfly took several minutes to render some of my charts. IIRC when I looked at the source, it was solving a MIP to compute t…

Julia (and the Gadfly package, which it's worth noting is not a standard library or anything like that) have come a long way since 2014. JuMP too. Julia was indeed "not ready" in 2014; it wasn't anywhere near the 1.0 release. We're now on the 1.7.x releases: stable and guaranteed backward compatible since 1.0, and a lot of quality of life improvements between 1.0 and 1.7, including much faster compilation.

If I'm solving an optimization problem for personal curiosity, a blog post, etc., JuMP is the tool I reach for. :)

Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?

#54
At Zoba we use CLP, CBC, NLOpt, and OR-tools. Used to use Gurobi.

* CLP/CBC: open source makes deployment and devops easy, which is great. Linear models are nice in that you "know what you're getting." Performance is at times a pain point.

* Gurobi: super fast, but the licensing was just impossible. Partly that was due to high cost, but ultimately we could have borne the cost; the inability to do something like have autoscaling containers using Gurobi was ultimately the dealbreaker for us. As Zoba grew, we had to turn to alternatives.

* NLOpt: absolutely a blessing, but the variety of algorithms and tuning parameters is really opaque, even for a team with some OR experience/background.

* OR-tools: powerful but the documentation is remarkably terrible, and the vehicle routing problem solver doesn't natively support all the constraints we'd like, so we have to do some hacks.

Overall my feeling for all these tools is roughly gratitude: solvers are complex, and rolling our own would be absolutely impractical at our size. But also there's some pain in between "I've formulated my problem as a nice mathematical model" and "I can reliably get optimal results on time."

Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?

#55
Matlab: optimization and global optimization toolboxes.

Python: PyOptSparse with IPOPT (and NSGA-II, although not the best implementation) and scipy.optimize.

I use them for the Design Optimization of aircraft with multiple non-linear constraints and sometimes multiple objectives.

Post reply on HN