Skip to content

Repository files navigation

Modelling & solving the Sports Tournament Scheduling (STS) problem

Start Docker

To start the Docker container, run the following command in your terminal in the root folder:

chmod +x docker_run.sh

./docker_run.sh build

./docker_run.sh run

Having -v option in the docker_run.sh script allows you to mount the current directory into the Docker container, so you can access your files directly from within the container, modify them, and run commands without needing to copy files back and forth.

Run the solution checker

To run the solution checker, you can use the following command in the root folder:

python solution_checker.py <path_to_json_folder>

Example:

python solution_checker.py res/CP

CP

Design-solver experiments

To run design-solver experiments, use the following command in the Docker container:

python runner.py <n_teams> <model>

Where:

  • <n_teams>: Number of teams (must be even and at least 2)
  • <model>: Choose from CP_base, CP_SB, or CP_SB_IC

Example:

python runner.py 8 CP_base

It will run each model with Gecode and Chuffed in both the decision and optimization versions.

Search experiments

To run search experiments, use the following command in the Docker container:

python runner_search.py <n_teams> <model>

Where:

  • <n_teams>: Number of teams (must be even and at least 2)
  • <model>: Choose from FF_RAND, DWD_RAND, FF_MIN, or DWD_MIN

Example:

python runner_search.py 8 FF_RAND

It will run each model with Gecode in both the decision and optimization versions.

SAT-SMT

To run the SAT or SMT models, use:

python3.11 SAT-SMT/main.py -t <teams> -m <method> [options]

Required arguments

  • -t, --teams : Number of teams (must be even).
  • -m, --method : Solver to use: SAT or SMT.

Options

  • -o, --optimize : Optimize the schedule.
  • -e, --encoding : SAT only – choose pb (pseudo-Boolean) or seq (sequential) encoding for the constraints.
  • -s, --symmetry-break : Apply symmetry breaking.
  • -i, --implied : Add implied constraints (required if --symmetry-break is not set).

MIP

Run directly all the experiments defined in the paper

python runner.py 

While single experiments can be run with:

python mip_sts.py --n <teams> --solver <solver> [options]

Required arguments

  • --n : Number of teams (must be even).
  • --solver : Solver to use: cbc or glpk (default: cbc).

Options

  • --ic : Use implied constraints.
  • --sb : Use basic symmetry breaking.
  • --obj : Use additional objective function.
  • --balance : Optimize home/away balance.

Example:

python mip_sts.py --n 8 --solver cbc --ic --sb

About

Modelling & solving the Sports Tournament Scheduling (STS) problem

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages