Giter VIP home page Giter VIP logo

ttpbeam's Introduction

A Randomized Beam Search Approach to the Traveling Tournament Problem

The traveling tournament problem is a difficult sports league scheduling problem introduced by

Easton, K., Nemhauser, G., Trick, M.: The traveling tournament problem description and benchmarks. In: International Conference on Principles and Practice of Constraint Programming. LNCS, vol. 2239, pp. 580–584. Springer (2001)

The problem description, benchmark problem instances, and currently best known lower and upper bounds can be found on Michael Trick's TTP page and more recently at the RobinX repository.

This repository contains a Julia implementation of a beam search approach as presented in [1].

The code has been tested with Julia 1.10.2 and DataStructures.jl 0.18.20. Google OR-Tools 9.9 with Python 3.12 are interfaced via PyCall.jl.

Installation of dependencies assuming a python3 with ortools installed in the path:

julia --project=. -e "import Pkg; Pkg.instantiate(verbose=true)"

PYTHON=`which python3` julia --project=. -e 'using Pkg; Pkg.build("PyCall")'

To precalculate the lower bounds for teams' states of an instance (aka disjoint pattern database, similar as done by [2,3]), to be saved into a pickled and bz2 compressed numpy array:

julia --project=. ttp_bounds_precalculation.jl insts/circ/circ14.txt 3 data/circ14_cvrph.pkl.bz2 true

To subsequently call the randomized beam search approach with shuffled team ordering and relative noise of 0.001:

julia --project=. ttp_beam_search.jl insts/circ/circ14.txt 3 true data/circ14_cvrph.pkl.bz2 10000 true random 0.001 -1 false

A final feasible local search using the TTSA neighborhoods [4] can be activated by setting the last parameter to true.

There is also a parallel beam search implementation for the TTP also faster in single threaded mode.

Alternatively, Google OR-Tools can be used to solve the arising capacitated vehicle routing problems (CVRPs) on the fly used as guidance for the beam search and keep already solved problems in a cache:

julia --project=. ttp_beam_search_ortools.jl insts/circ/circ14.txt 3 true 16384 true lexicographic none 0.0 false -1 false

For the latter, there is also an iterative variant, which increases the beam width by a factor every number of runs until either a time or maximum beam width is hit:

julia --project=. ttp_beam_search_ortools_iter.jl insts/NL/nl10.txt 3 true 3600 128 32768 2 true random none 0.001 2 true -1

[ks^-1] are thousands of nodes explored per second, lce [log] represents a log cache efficiency by a cache miss fraction (e.g., -3 means every 1000th CVRP calculation needed to be performed from scratch, the remaining were retrieved from cache), tph [ms] is the average time per such a CVRP calculation in milliseconds.

References

[1]

Frohner, N., Neumann, B., and Raidl, G. R. (2020). A beam search approach to the traveling tournament problem. In Paquete, L. and Zarges, C., editors, Evolutionary Computation in Combinatorial Optimization – 20th European Conference, EvoCOP 2020, Held as Part of EvoStar 2020, volume 12102 of LNCS, pages 67–82, Sevilla, Spain. Springer.

[2]

David C Uthus, Patricia J Riddle, and Hans W Guesgen. DFS* and the traveling tournament problem. In International Conference on AI and OR Techniques in Constraint Programming for Combinatorial Optimization Problems volume 5547 of LNCS, pages 279–293. Springer, 2009.

[3]

David C Uthus, Patricia J Riddle, and Hans W Guesgen. Solving the traveling tournament problem with iterative-deepening A*. Journal of Scheduling, 15(5): 601–614, 2012.

[4]

Aris Anagnostopoulos, Laurent Michel, Pascal Van Hentenryck, and Yannis Vergados. A simulated annealing approach to the traveling tournament problem. Journal of Scheduling, 9(2):177–193, 2006.

ttpbeam's People

Contributors

nfrohner avatar

Stargazers

 avatar Carlos Linares López avatar data_lover avatar

Watchers

 avatar

ttpbeam's Issues

Missing argument in description ttp_beam_search_ortools.jl

Run final ls argument is missing in usage description:

println("Usage: $PROGRAM_FILE <instance-file> <streak-limit> <no-repeat> <beam-width> <dead_teams_check> <team-ordering> <reflective-symmetry-breaking> <relative-sigma> <cvrp-heuristic-respect-home-games> <first-k-layers-noisy>")

Should be:

println("Usage: $PROGRAM_FILE <instance-file> <streak-limit> <no-repeat> <beam-width> <dead_teams_check> <team-ordering> <reflective-symmetry-breaking> <relative-sigma> <cvrp-heuristic-respect-home-games> <first-k-layers-noisy> <run_final_ls>")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.