33

While it's true that much more O.R. code could - and probably should, when public money paid for its development - be public, this is changing and nowadays it's increasingly more common to share the sources (e.g., on GitHub) and create a corresponding referenceable artefact (e.g., on Zenodo). I think the main reason that hinders sharing is poor code quality....


23

All answers to this question are opinions. So I will add another one. If you are a researcher and you are good at implementation, you may be able to produce a sequence of papers and results quickly in your subfield of OR. This is especially true if you focus on heuristics for very hard optimization problems. If you share your code, then you create an ...


20

OpenSolver is an LP/IP/NLP solver that plugs into Microsoft Excel. I used it for some classroom stuff a while back and was quite pleased with it. If you are interested in metaheuristics, there are quite a few open-source contributions floating around (about which I mostly know nothing). I have used the Watchmaker Framework for Evolutionary Computation (i.e.,...


19

Mittelmann benchmarks a number of (LP-)Solvers, some of which are open source. A recent new open source solver is HiGHS.


18

The pitfall is to only focus on performance, will ignoring scalability, maintenance, integration and reliability. Some of these are easier to measure than others: Performance: if I give 2 constraint solvers a - for example a VRP - dataset with 100 visits, which one is better after 5 minutes. See Marco's answer on this question and my blog post on ...


16

For the evaluation of several solvers you need several solvers a testset of instances a performance measure Several solvers you probably already have in mind. The testset of instances is a bit tricky, because ideally, this is a not too small, not too large, not trivial, not too hard, still representative set of instances (that is, LPs or MIPs) that you ...


16

I compiled a list of solvers I could find last year. Several are COIN-OR-affiliated, but others include Mini-CP, DSP, BiqBin, OSQP, ECOS, and Dakota. (Edit - not all are dedicated LP, see comments below)


15

I agree with @independentvariable. What might be added is that many researchers actually do publish (and what's maybe even more valuable: maintain) their code, if they think it is useful. Take a look at COIN-OR. I guess one of the differences is that in OR, people tend to publish full-blown general purpose software (often fit for industrial usage) rather ...


14

I read through the code of several solvers before developing Tulip.jl. To be honest, unless you are yourself developing a solver/interface, or need to reproduce an author's implementation, there is probably a better use of your time than reading solvers' source code. Reading the user guide or, when applicable, the paper(s) that describe the software's ...


13

Good question! I would say: OR is older, way older than AI and ML OR people don't come from a programming background, and the main focus is usually having efficient maths rather than efficient coding (but I don't deny that OR people also write awesome codes :) ) OR is collected around mathematics, if one is convinced with the theorem, there is no reason to ...


13

VRPy is a python library for solving a range of vehicle routing problems. It is open source and open to new contributors. There are at least two ways to contribute: solve one of the existing issues have fun with it and propose new enhancements based on your personal experience with the library


12

I believe SCIP is the fastest non-commercial solver. It’s free for academic use. You can check out the benchmarks by Hans Mittelmann for other suggestions.


11

I think the five answers (up to now) give a representative sample of the different reasons for not publishing code in the OR community. That answers your question. To provoke a bit, I would say most of them are invalid. As an exercise, it helps to read LeVeque's Top Ten Reasons To Not Share Your Code (and why you should anyway) and imagine mathematicians ...


10

Probably because a lot of us are mathematicians and are ashamed of our code quality. I have just released the code to BCP, a poorly-named (don't blame me) algorithm for solving the multi-agent pathfinding problem using branch-and-cut-and-price. It is substantially faster than the previous state-of-the-art algorithm CBSH-RM. The paper and experimental ...


10

Just to add another, easily google-able, resource: Wikipedia, more or less, "maintains" a "List of optimization software" -- which includes the super handy "Mathematical optimization software" template I -- disclaimer: shameless self-plug -- started 6 years ago (and never bothered to curate) [the latter also includes references to alternat(iv)e taxonomies in ...


10

There are lots of projects at COIN-OR, many of which I'm sure would welcome contributions. You would need to discuss with the individual project developers what the best way to help would be, but one thing that's nearly always welcome is help with documentation, including reference manuals, tutorials, example code calling library functions, etc.


9

If you're just trying to "evaluate performance" to decide what to use, then avoid LP_SOLVE and GLPK (and the results above are also indicative of their LP performance) and the solution time for LPs (and MIPs, so long as they aren't really nasty) won't be an issue. I suggest Clp/Soplex/HiGHS for LP and SCIP/Cbc for MIP.


9

You can solve your model via the NEOS server which provides Gurobi, Cplex, and other solvers for free if it is the matter of not having a solver. I am not familiar with PuLP but I know it is easy to implement the solvers in NEOS if you model the problem in Pyomo. May it helps you to find PuLP syntax for it, I provide lines of code written for Pyomo using ...


9

Here and here (list is generated by Github based on the tags on the open projects) you can find long lists of open operations research projects on Github. By clicking on the "Open Issues" link on each page you can directly access the Github repository for that specific project. Note that @Kuifje's own repository VRPy is a great example.


8

There are several packages I can think of with an interface to CBC: Pyomo PuLP MIP


8

Easy: minimize (sum(c(k,i,j)*x[k][i][j] for k in range(K) for i in range(n) for j in range(n) if j != i)) But note that your sums start from indices $1$ and end at $n$, while range(n) gives you $0$ to $n-1$.


8

In my point of view, the main reasons that people overlook sharing their codes are: It is really time-consuming and challenging to get a good-quality code. It might take the same amount of time to clean up the code compared to the time that you originally spent on it. You may see inconsistencies in results after cleaning it and many other troubles. The ...


8

Meindl and Templ published the paper Analysis of commercial and free and open source solvers for linear optimization problems in 2012 in which they investigate the running times and solving percentages of various solvers. The main table is replicated below. \begin{array}{cr}\hline\sf{solver}&\sf{running\,time}&\sf{instances\,solved}&\sf{solved}\,(...


7

Which advantages does each one (arXiv vs. OO) of them (and others if not included) provide? The arXiv site has more, and an extensive review process. It is not without controversy. The Optimization Online site is supported by the Mathematical Optimization Society (MOS), an international organization dedicated to the promotion and the maintenance of high ...


6

Ipopt seems to have a C# binding. From my own experience WORHP is easy to wrap in high level languages, due a variety of interfaces compatible with different programming styles. Ipopt is a local interior point solver that performs well on quadratic problems. WORHP uses as SQP algorithm, if all constraints and the objective are marked as quadratic or linear ...


5

There are software tools (typically language-specific, I think) that will ingest a software project and excrete a map of dependencies (basically, which methods / classes / files invoke something from which other methods / classes / files). If you pick an open-source project and run it through such a tool, you should be able to sort all the files etc. into a ...


5

Funny you should mention MINOTAUR, I actually learned C++ by modifying MINOTAUR's source code for my PhD. In my opinion, virtually no solver has documentation that helps understand how the code itself works and why it's put together the way it is. The reason is that the overall algorithms are straightforward, you can learn those in a couple of days. Solver ...


5

Another open-source software is the GNU Linear Programming Kit (GLPK) and can be downloaded here. Description (from Wikipedia): The GNU Linear Programming Kit is a software package intended for solving large-scale linear programming, mixed integer programming, and other related problems. It is a set of routines written in ANSI C and organized in the form ...


4

You might be surprised how much OR algorithm code is open source: OptaPlanner (Java) is on Github, including algorithm's such as: Late Acceptance Hill Climbing Tabu Search Simulated Annealing First Fit Cheapest Insertion Brute Force Branch and Bound ... Oscar (Scala) is on BitBucket Choco (Java) is on GitHub Now, the thing is that production solvers can ...


4

The most important things have been said already but I want to add that in my opinion the best way to read code is to read it while stepping through a relatively easy test case in the debugger. When looking at an LP or MILP solver I would start by stepping through a tiny instance to get an idea of the program flow, do that multiple times, and stepping into ...


Only top voted, non community-wiki answers of a minimum length are eligible