Live data from Hacker News

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

news.ycombinator.com

71–80 of 158 posts

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

#71

After several years of exploring, my current gotos are: * Minion for IP for scheduling + edge crossing minimization. * cvxpy (wrapping ECOS, OSQP, and SCS by default) for convex optimization for making nice geometry. * Z3 and STP for SAT/SMT for program analysis. All are FLOSS, which is my main criterion in many situations. Beyond that, I like minion for its focus on only providing efficiently implementable primitive…

I'm curious what kind of person has 3 favorite constraint optimizers. What do you do that has you making use of so many different ones?

Not OP, but I work as a data scientist consultant, so various industries applications require different types of solvers e.g. mining operations optimization, branch location optimization, etc. would often each require a different solver depending on the problem space.

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

#73
I've used lpsolve [1] for over 20 years in various projects in the beginning. When the project momentum picks up and the finances can be justified, it's CPLEX.

lpsolve is simple to use. Open source, with packages in most every language. Easy to embed.

CPLEX because it's fast. With CPLEX I often find it takes more time (1 - 2 orders of magnitude) to formulate/construct the problem than it does for CPLEX to actually solve it.

I would love to get the chance to use Gurobi.

[1] https://sourceforge.net/projects/lpsolve/

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

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

We use OpenStreetMap Routing containers. There's a bit of setup, but it works great!

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

#76
You're probably looking for a performance comparison. Look here:

http://plato.asu.edu/bench.html

This one stays pretty well updated. On the MIP side:

  * COPT
  * SCIP
  * HiGHS
seem to be top performers (of the OSS variety).

IIRC OR-Tools often by default uses SCIP for its MILP backend.

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

#77
post #62
post #46

Earlier quoted context omitted.

I love JuMP too. I am very amateur when it comes to optimization, but I found it to be a very efficient way to describe a matching algorithm for a post card exchange I ran (think of it as a Secret Santa, but generalized to each person sending multiple gifts, and discouraging mutual exchanges.) Here's the code: https://twitter.com/paulgb/status/1462483698427781120 To OP's question, besides JuMP, the other use case I'v…

> here’s the code > link to twitter visible_confusion.png.jpg.exe

I hadn't before realised that you can circumvent the Twitter character limit by turning your message into an image and attaching it. Clever!

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

#78
CPLEX, XPRESS and Gurobi are the gold standard for solving an MIP of a meaningful scale (relative performance will depend on the specific problem but you cannot go wrong with either of these three). Unfortunately there is a big gap between performance of open source v/s commercial solvers in OR space. Type of problems I need to solve are usually unsolvable on open source solvers (very large scale supply chain problems). For smaller problems, OR-Tools or GLPK or CBC do work fine - but once you go commercial, there is no need to switch back to an open source solver.

My typical setup is using Pyomo for model formulation (gives me flexibility to switch out solvers with ease). I bundle multiple licenses using GAMS, it is more cost effective than purchasing individual licenses from solver companies.

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

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

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.

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

#80

SCIP, GLPK. I don't mind the overhead in developer time. Once you 'git gud' at translating problems to MIP/ LP, it's just a matter of learning syntax. The real trick is in translating problems. It's a shame more CS courses don't focus on this problem translation meta-algorithm. You can get it in tough theory courses with problem mapping to prove complexity, but its usefulness goes way, way beyond that somewhat niche…

That skill can be learned, in part, by taking OR-related business administration classes. Some supply chain management courses I looked into were about learning about standard problems (say, travelling salesman problem) and being able to formulate constraints to extend them. Not very theoretical, but useful in practice.
Post reply on HN