Giter Club home page Giter Club logo

tup-solver's Introduction

Traveling Umpire Problem Solver

Overview


This program is based on the paper Solving the Travelling Umpire Problem with Answer Set Programming . The goal is to solve instances of traveling umpire problem (TUP), the definition of TUP can be viewed here . This program uses a Python script to generate source code files in Clingo language which are used together with the Clingo solver to find optimal solutions for the instances of TUP.

Dependencies


  • Python version 3.8.3
  • Clingo - easiest way to install is conda install -c potassco clingo, otherwise see release

Running the Project


  1. Download TUP instance files and add them to the /instances directory
  2. (Optional) Compile your own program in Clingo language
  3. Open Anaconda Prompt
  4. (Optional) Change configuration of experiments in run.py
  5. Run python run.py [-h] [-t [TIME_OUT]] [-n [NUM_PROC]] [--src [SRC]] [--inst [INST]] script
  6. View results in the /out directory

Optional command line arguments for the TUP solver:

  • -h, --help       Show the help message and exit
  • -t [TIME_OUT], --time-out [TIME_OUT]       Time out for the Clingo solver specified in seconds, default=300
  • -n [NUM_PROC], --num-proc [NUM_PROC]       Number of parallel processes of the Clingo solver, default=1
  • --src [SRC]       Path to the directory that will contain generated '.lp' source files in Clingo language, default='src_asp'
  • --inst [INST]       Path to the directory containing TUP instancesdefault='instances'

If you want to run individual ASP programs with your own parameters you can use Clingo directly: clingo [SRC] --opt-mode=optN --time-limit=[T] --parallel-mode=[NUM_PROC],[MODE] -q

If you want to view the models that are computed, don't run Clingo with the paremeter -q. Be midful that the sheer volume of output is rather confusing. If you only want to view the setting of specific atoms you need to modify the ASP program with #show A/n directive, whereA is the name of the atom and n is its arity.

tup-solver's People

Contributors

a-bak avatar

Watchers

 avatar

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.