DOI: 10.3390/a19100840 ISSN: 1999-4893

A Multi-Language Framework for the Carousel Greedy Algorithm: Python, R, MATLAB, and Julia Implementations

Raffaele Dragone, Carmine Cerrone, Bruce L. Golden

In recent years, the Carousel Greedy (CG) algorithm has gained increasing attention as a simple yet effective heuristic for a broad class of combinatorial optimization problems, with applications ranging from graph theory to logistics and network analysis. Building on a preliminary study that presented the first open-source implementation of CG in Python, this work provides CG libraries in Python, R, MATLAB, and Julia. The four implementations share a common interface and modular organization while adapting to the paradigms of their respective languages. Concise code snippets illustrate their use and the implementation of problem-specific components. The libraries also include an additional feasibility-aware feature of CG that avoids unnecessary candidate insertions during the iterative phase when the current solution is already feasible. The libraries, documentation, examples, benchmark scripts, and detailed results are made available through a public unified repository, providing accessible and reproducible resources for applying CG in different programming environments.