10
$\begingroup$

There aren't many examples of reusable functionality shared as a result of research or commercial software development.

Has anyone come across any?

Here is one I just learned of:

https://github.com/grid-parity-exchange/Egret

$\endgroup$
  • 2
    $\begingroup$ Are you just asking if there are public repos that contain code generated as part of research projects? $\endgroup$ – LarrySnyder610 Jun 13 at 19:12
  • 1
    $\begingroup$ Yes, I agree it would be helpful to clarify. Also, if there are particular areas you're interested in (e.g., power systems), that may help respondents as well. $\endgroup$ – E. Tucker Jun 13 at 19:14
  • 2
    $\begingroup$ @MichaelTrick I think [soft-question] was the right tag (eg, math.stackexchange.com/questions/tagged/soft-question) so I rolled back your edit. You or the OP can reverse me if I was wrong. $\endgroup$ – LarrySnyder610 Jun 13 at 20:36
  • $\begingroup$ @larrysnyder610 See the discussion at or.meta.stackexchange.com/questions/163/… Cartaino, as SE Director of Community Development, has a certain legitimacy here. or.meta.stackexchange.com/users/11/robert-cartaino $\endgroup$ – Michael Trick Jun 13 at 20:47
  • 1
    $\begingroup$ @MichaelTrick aha, got it. So we should remove [soft-question] not because we can’t ask this kind of question but because it’s a meta tag. That makes sense. Sorry, I missed that question on meta. So, shall we remove the tag here (again!)? $\endgroup$ – LarrySnyder610 Jun 13 at 20:56
8
$\begingroup$

I try to publish all my O.R. code on my GitHub page. There are both exact and heuristic algorithms.

I am learning about better coding practices every day, so there is no guarantee that code I published 1-4 years ago is of acceptable quality (for my standards of today and even less for my future standards), but perhaps it is better than nothing!

Frameworks

  • as: this is my general-purpose C++ library with a few goodies for operational research. For example, a class to parse TSPLIB and derived instances (such as for the orienteering problem); one to solve TSP problems calling either Concorde or a simple MTZ model; a simple implementation of the Adaptive large Neighbourhood Search (ALNS) metaheuristic; utilities to work with and plot graphs, which can be used e.g. to visualise routes in routing problems; tools for solving the maximum weighted independent set and the max-clique problems, using respectively the exactcolors and the pmc libraries, which are also available online here and here.

  • adaptive-large-neighbourhood-search: as the name suggests, it is a C++ framework to implement ALNS heuristics. There is also a version of ALNS hybridised with Tabu Search to solve flat-landscape problems.

  • biased-random-key-ga: a C++ implementation of the BRKGA framework, with an example application to the TSP. I also have a Java implementation of the same framework; in the beginning I implemented it to do some experimentation, but in the end I think it is modular enough that it can be used as a framework.

  • simple-ga-cpp: a toy, but working, C++ implementation of a Genetic Algorithm framework.

Solvers

  • tsp_bc: is a work-in-progress branch & cut solver for the TSP. It's not going to be state-of-the-art; just a quick experiment to give a more data-driven answer to this question.

  • selective-graph-colouring: mainly a branch & price solver for the Selective Graph Colouring Problem (SGCP). You can have a look at the corresponding paper for more information.

  • sgcp-via-cliques: another SGCP solver which uses a transformation into a max-clique problem; here is the corresponding work-in-progress paper.

  • orienteering-alns: an ALNS heuristic solver for the Orienteering Problem, presented in this paper.

  • maritime-vrp: a branch-and-price solver for a maritime vehicle routing problem for container shipping feeder networks. This is the corresponding paper.

  • fast-bwkp: a C implementation of a collection of exact and heuristic solvers for the black-and-white knapsack problem.

  • tsppddl: a C++ branch & cut solver for the TSP with Pickup, Delivery, and Draught Limits, a problem arising in the shipping industry and detailed in this paper.

  • train-energy-genetic-algorithm: is an attempted C implementation of a genetic algorithm to come up with driving profiles for electric and diesel trains, which would minimise energy consumption. I abandoned it half-way through.

Tutorials

  • cplex-example: example code I use to teach students the basics of modelling with CPLEX's C++ API.
$\endgroup$
7
$\begingroup$

This may be a related question: Why is the programming code of many algorithms not public in the OR community?

A recent example I've liked is this large-scale location modeling paper by Cordeau, Furini and Ljubic, 2019. Here's their code.

$\endgroup$
  • 1
    $\begingroup$ Yes indeed this is a step in the right direction. But I am interested in a framework or suite whereby multiple can be run in the same manner. Perhaps then even deployed as part of a larger solution! $\endgroup$ – fhk Jun 13 at 20:57
5
$\begingroup$

For biased random-key genetic algorithms (BRKGA) there is a paper of Toso & Resende and accompanying software. In a BRKGA the solution is represented as vector $v\in\mathbb{R}^n$ of real "keys" and all you have to do is to provide a "decoder" that maps $v$ to a solution and computes its fitness.

A bit dated, but still useful is the chapter on Metaheuristic Class Libraries in the Handbook of Metaheuristics.

$\endgroup$
  • 1
    $\begingroup$ Hi! I also have my BRKGA implementations out there. This one is in C++, and this one is in Java. $\endgroup$ – Alberto Santini Jun 14 at 7:18
4
$\begingroup$

Hastie, Tibshirani and Tibshirani did a comparison of Best Subset Selection (the MIP-formulation introduced by Bertsimas, King and Mazumder), Forward Stepwise Selection and the Lasso. For their calculations they created an R-package which they shared here.

$\endgroup$
4
$\begingroup$

One group at LANL published several collections of model formulations around infrastructure optimization (power grid, gas pipelines, etc.): https://lanl-ansi.github.io/software/

The formulations are implemented with JuMP and highly configurable. So it's a good setup for comparing different formulations on the same problem type and input data.

$\endgroup$
3
$\begingroup$

The Python package PyPSA does power system analysis, including optimal power flow (OPF) and a bunch of other optimization routines (built on Pyomo). It's a bit like MATPOWER for Python but (I believe) has more functionality. I haven't played around with it much yet, but I mean to—it seems rather awesome.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.