Live data from Hacker News

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

news.ycombinator.com

151–158 of 158 posts

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

#151

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…

Gurobi is so frustrating. I had the same experience: blistering performance on my problems, much better than OR-Tools, but just couldn't make it work at all with the licensing. It's like they've never heard of the cloud, or had any concept that anyone would use their software in any way other than big "batch" jobs on an in-house machine. I feel like someone could make a killing just buying Gurobi and making it work i…

Disclaimer: I work for Gurobi, but these views are my own.

---

I'm sorry to hear that you find our licensing frustrating. It is true that in the past we focused a lot on local deployments holding on to the notion of a physical machine. However, we have added a few licensing options that you might find interesting, specifically the Web License Service (https://www.gurobi.com/web-license-service/), where you can get a short-lived JSON Web Token inside of a Docker container which renews automatically. You can find our Docker Hub images here (https://hub.docker.com/orgs/gurobi/repositories).

There are also other ways like the Instant Cloud (https://www.gurobi.com/products/gurobi-instant-cloud/) which give you a very scalable SaaS approach.

Feel free to reach out to me (@gurobi.com) to discuss more!

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

#152

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…

Disclaimer: I work for Gurobi but views are my own

---

Sorry to hear you found our licensing problematic! You might find interesting that we now have developed a Web License Service (https://www.gurobi.com/web-license-service/), where you can retrieve a short-lived JSON Web Token inside of your container to run Gurobi; our Docker Hub images are here: https://hub.docker.com/orgs/gurobi/repositories.

From what you are saying ("autoscaling containers"), this may be a good fit for you. What do you think?

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

#153
Optimisation solvers are complex and incredibly powerful pieces of software. However, there are lots of different options and choosing which to use can be a daunting task.

There are some open source options ([COIN](https://www.coin-or.org/), [OR-tools](https://developers.google.com/optimization), [Minion](https://constraintmodelling.org/minion/), [CVXPY](https://www.cvxpy.org/)) and other commercial offerings ([gurobi](https://www.gurobi.com/), [Mosek](https://www.mosek.com/)), other people write their own for thiner specifics purposes. Some [benchmarks](http://plato.asu.edu/bench.html.) are maintained by Hans Mittelmannt.

Personally, I have used OR-tools, maintained by a team at Google, for vehicle routing optimisation and found it powerful but poorly documented with an inconsistent API. I've also used R's [optim](https://www.rdocumentation.org/packages/stats/versions/3.6.2...) function and [lpsolve](https://cran.r-project.org/web/packages/lpSolve/index.html) for linear and integer problems.

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

#154
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…

Honestly that constraint is pretty straightforward to formulate as a MILP. Four machines, each has a starting and ending time as decision variables. Total duration by machine = 0, each machine's end time I'm doing almost exactly this right now on a client project (I consult in supply chain optimization)

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

#156
post #68

Related question, what are broad recommendations for vehicle routing with capacity, time windows, and a smattering of other constraints? I'm a generalist SWE by trade and my (shallow) survey of the field revealed: General solvers: - LocalSolver: good docs, reasonable pricing, docs make it sound fast - ORTools: Open source, we we're leaning towards this since we're not doing anything incredibly fancy and it'd be nice…

VRPs are extremely complex MIPs so usually heuristics are used. So ortools is probably the best option in this case for cost.

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

#157
post #98

Ah, it must be due to Easter! From this thread it seems that now, finally, after all this time, OR (operations research and optimization) have risen from the dead! Sorry for the sacrilege. Ah, YouTube has some really good performances of Parsifal ! At one time, OR looked good to me, and I bet a lot of my career on it: Off and on I heard about various parts of optimization. Then at FedEx, in a rush I wrote some simple…

I'm having a pretty good career in optimization and OR, even in the corporate sector...

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

#158

Earlier quoted context omitted.

Genetic algorithms are known to produce quasi-optimal results in a short time, if set up accordingly. They can be also applied to problems where constraints are very complex to explicitly formulate. Designing one is no picnic, though, and always problem-specific.

Interesting. What do you mean by quasi optimal? Genetic algorithms product quasi optimal results but simulated annealing will not?

Quasi-optimal means you can't prove that the algorithm will always find the optimal solution, though for all practical purposes, the algorithm will find it for over 99% of the time.
Post reply on HN