Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Ompr – mixed integer linear programming in R (github.com/dirkschumacher)
39 points by watwatwat123 on July 19, 2017 | hide | past | favorite | 6 comments



Good stuff. That's pretty nice to re-use the existing ROI solver bindings. I can see there's also an experimental ROI plugin for Gurobi (https://github.com/kuol/ROI.plugin.gurobi ) - my former MIP-loving colleagues used to delight in how much better Gurobi seemed to perform then CPLEX.

Similarly, if anyone uses python and is interested in solving similar problems you may find the following links useful:

https://pythonhosted.org/PuLP/

http://cvxopt.org/ http://www.cvxpy.org/en/latest/ (not MIPs but able to tackle a variety of convex optimisation problems)

I think once you start getting into harder optimisation problems then sometimes you need to take advantage of the APIs offered by specific solvers (e.g. for lazy constraint generation using callbacks) which tends to get in the way of using a lot of this, but these DSLs + common solver interfaces are pretty nice for prototyping and rapid development during projects while the definition of what optimisation problem you're meant to be solving is still oscillating...


Is there any documentation for Gurobi being much better for MILP than CPLEX? I'd be very interested in those details.


a good place for MIP solver comparisons (including expensive commercial solvers like Gurobi and CPLEX, as well as other commercial and open source options) is Hans Mittelmann's website:

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

here are MILP current benchmark results (updated this month) including CPLEX and Gurobi

http://plato.asu.edu/ftp/milpc.html

If you are interested in which is the best (fastest? finds feasible solutions most often?) solver for a particular kind of problem, these general benchmarks perhaps don't matter as much - you need to compare the solvers on instances of your problem.

edit: i think it is possible to get free trials of commercial solvers if you are interested in trying them on your problems. Gurobi also appears to have a cloud offering where you can pay to rent a solver for a short time.


Thanks for the help. My company uses CPLEX in production on some massive models with a lot of constraints. I'm always curious if Gurobi would be better, but I'm not sure how much work it would be to port it to run on a trial version of Gurobi on the same hardware.

Edit: What are the numbers in the links provided? Number of solved cases or time?


I'm curious. What prompted you to write this? It's not everyday where someone sits down and says "I want to write a MILP modeling system"


Last year I read the part about Non-standard evaluation in Hadley Wickham's Book (http://adv-r.had.co.nz/Computing-on-the-language.html) when I thought that this can be used to build a DSL for modelling MIPs. Then I developed a quick PoC over the weekend which evolved into this package. And that initial impulse to work on this topic was probably inspired by the JuMP (https://jump.readthedocs.io/en/latest/) project in julia which I had used for a graph layouting problem before (and I guess by other modelling DSLs I have used / played with in the past).

In general I just like the theory and practical applications of MILPs, however I don't work on these problems in my day job. I am just hobbyist.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: