Live data from Hacker News

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

news.ycombinator.com

81–90 of 158 posts

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

#81
I use different solvers for different things, depending on the type of problem to solve and the goal of solving the problem.

* MiniZinc is my favourite tool for prototyping models. Looking into the feasibility of using it in a roduction environment as well. Typically models are small to medium sized. Also using it for recreational problem solving (e.g., Advent of Code).

* Gecode is my go-to solver for writing applications where I need more control over the solving process or I want to write a custom propagator or heuristic. Used it for scheduling, planning, and configuration.

* When in the JVM ecosystem, I've used Choco.

* I've used OR-tools some, but would like to be better at it. Mainly because OR-tools has a nice set-up with a lazy clause generation solver, good automatic heuristics, and a nice portfolio solver for parallel work.

* Quite often, a custom optimization heuristic is also the right tool for the job.

I've tried to use Gurobi sometimes, but for the problems I've tried, it has either been to hard to model effectively or was not a good fit. The licensing cost is a limiting factor as well.

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

#82
To solve Vehicle Routing Problems at my company we use jsprit, and have integrated it with lpsolve. jsprit natively schedules stops into time buckets, then we use a linear equation solved by lpsolve to move them to precise ideal times. Works well.

Although jsprit isn’t the most lightning fast VRP solver, it’s highly customizable, and fast enough. Customizability is huge for us, as we have a tonne of very particular hard and soft constraints we need to be able to represent, and jsprit has always been up to the task.

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

#86
Gurobi is by far the best on the market IME. Performance is very good even on poorly designed models. The API has a lot of convenient features and while it is expensive it's not that awful to run it with their container licensing and even SaaS solutions now.

Xpress is pretty good at performance if you put a bit more effort into getting the model right and has very reasonable pricing.

CBC is increadibly slow compared to commercial solvers. Documentation is awful and it seems like they can't even compile it sensibly anymore because they forked autotools at some point.

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

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

curious to know - how do you solve this today ? what is your abstraction/solver-speak today ? I also have faced this (though im not a power user like you) - so im curious what did u end up using today ?

I have a niggling feeling somewhere that JSON is the wrong language for this. Something like cue lang may be the right thing. (https://www.sobyte.net/post/2022-04/cue/)

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

#89
The history of state-of-the-art MIP solvers is fascinating. There are very few people in the world who can develop them, and there is a strong history of developers jumping ship from one company to another, tilting performance accordingly.

Initially, CPLEX and Xpress were founded in the eighties. In the nineties, CPLEX was acquired by ILOG (a French CP company), which in turn was purchased by IBM around 2009. Around the same time, the original technical co-founder of CPLEX, along with the two latest head developers, left CPLEX to found Gurobi. Since then, there has been a slow trickle of developers leaving CPLEX for Gurobi... until 2020, when CPLEX suddenly lost its 7 remaining devs over 6 months (because of catastrophic mismanagement at IBM, from what I heard). Unsurprisingly, those devs ended up mostly at Gurobi, resulting in the CPLEX team from 20 years ago being essentially Gurobi now. Other CPLEX devs also ended up at XPRESS, which had been purchased around 2008 by FICO (the credit rating company).

Meanwhile, there is also a smaller Danish company, Mosek, that does its own thing (they have a MIP solver, but their focus seems to be on their amazing conic optimization code). And SAS (the analytics giant) has a small MIP team too.

Then over the last 2 years, three new solvers appeared out of China: COPT (by Cardinal Operations, a startup by Stanford graduates), MindOpt (Alibaba Research) and OptVerse (Huawei). They mostly have LP solvers for now, but for newcomers, the performance is extremely impressive. This is only partially out of nowhere, though: COPT in particular has hired several devs from the incumbents.

On the academic side, ZIB (a PhD-granting research institute in Berlin) maintains a source-available family of solvers, and has been a steady provider of talent for commercial solvers. The dev behind SoPlex (LP solver) went to CPLEX after his PhD and now Gurobi. The main dev behind SCIP did the same, and is now VP of R&D at Gurobi. Many more XPRESS and Gurobi people did their PhDs at ZIB.

The Coin-OR open-source codes for LP (clp) and MIP (cbc) were written decades ago by a founding father of computational optimization, John Forrest, now retired from IBM research. Their source code is difficult to read, and Coin-OR aims to eventually replace them with a new code, HiGHS. The dev who wrote the simplex code of HiGHS as his PhD thesis went on to XPRESS and now COPT. The dev who writes the MIP code of HiGHS comes from ZIB.

As you can see, everyone is very inter-connected. Hence the throwaway :-).

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

#90
post #42

Earlier quoted context omitted.

> 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?

https://link.springer.com/book/10.1007/978-1-4419-1665-5
Post reply on HN