Ask HN: Do you use an optimization solver? Which one? Do you like it?
41–50 of 158 posts
Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?
#42I 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…
I think there are much better algorithms in metaheuristic search than just simulated annealing.
Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?
#43Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?
#44After 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…
Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?
#45SciPy.optimize: Similar pros/cons as Matlab other than open-source.
CVXPY (& its default backends): Modeling languages are great. First thing I will try for a new convex problem.
CVXGEN: Amazing, but infuriating that it can only be used through a web app.
PyTorch: Only supports unconstrained first-order methods. Automatic differentiation of arbitrarily complex functions is huge. Somebody should implement interior-point and SQP on the GPU for PyTorch.
---
As a researcher, my first impression is that your product is designed for people who want to deploy optimization in some service or business process, not for me.
Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?
#46I 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…
To OP's question, besides JuMP, the other use case I've had for optimization is for optimizing the drawing order of pen plots, for which I used or-tools. A write-up on it is here: https://nb.paulbutler.org/optimizing-plots-with-tsp-solver/
Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?
#47After 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?
Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?
#48Minizinc!
I like how it targets both MIP and CP solvers. It's actually the tool that first led me to CP and Gecode.
Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?
#49In general, I would recoment OR Tools.
Re: Ask HN: Do you use an optimization solver? Which one? Do you like it?
#50I 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 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 the best bounding box for display purposes.
I should probably check it out again.
Also: agreed regarding Gurobi licensing.