https://github.com/adamouization/asp-timetable

:calendar: ASP-Timetable is an AI logic program implemented in a declarative manner using ASP and Clingo (2017)

https://github.com/adamouization/asp-timetable

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.8%) to scientific vocabulary

Keywords

answer-set-programming asp clingo json prolog python tkinter tkinter-gui
Last synced: 5 months ago · JSON representation

Repository

:calendar: ASP-Timetable is an AI logic program implemented in a declarative manner using ASP and Clingo (2017)

Basic Info
  • Host: GitHub
  • Owner: Adamouization
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 353 KB
Statistics
  • Stars: 6
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
answer-set-programming asp clingo json prolog python tkinter tkinter-gui
Created almost 9 years ago · Last pushed almost 8 years ago
Metadata Files
Readme License

README.md

ASP Timetable

ASP Timetable is a timetabling application implemented in a declarative manner using Answer Set Programming and the Clingo solver my Artificial Intelligence course. Timetabling is considered a classic A.I. problem involving many constraints, and this program tackles the different challenges and considerations that go into generating timetables.

Features

  • General
    • Clingo output parsed and interpreted by a Python script to create a Tkinter GUI
    • Generated sets written entirely in AnsProlog
    • Program documented using LANA
  • Constraints
    • students cannot attend two lectures at the same time
    • lecturers cannot teach two units at the same time
    • rooms can only be used for one lecture at a time
    • lecturers cannot teach when they have other commitments
    • students and lecturers have all their units schedule
  • Weak Constraints (add penalty points to the sets that do not accommodate this rule)
    • lecturers can have preferred teaching times
    • timetables offer a lunch break where possible
    • no scheduled lectures on Wednesday afternoons
  • Atoms (user-specified in atoms.lp)
    • students
    • rooms
    • units
    • lecturers
    • capacity of the rooms
    • units taken by a student
    • units taught by a lecturer
    • times that a lecturer has other commitments

Screenshots

Tkinter GUI screenshot

GUI screenshot

Command Line Clingo output screenshot

CLI screenshot

Usage

Basic Usage

  1. Clone the project and cd to the project's src folder.

git clone https://github.com/Adamouization/ASP-Timetable cd ASP-Timetable/src/

  1. Generate the answer set using Clingo and pipe the output to the python script that will parse the data and generate a GUI: clingo -n 0 asp/timetable.lp asp/atoms.lp --outf=2 | python Timetable.py where:
* `clingo` is the command used to run generate the answer set using the AnsProlog files specified
* `timetable.lp` contains the generators, rules, constraints and dislay options to generate the optimal timetable
* `atoms.lp` contains all the atoms such as courses, lecturers, rooms, ...
* `--outf=2` outputs the generated answer set in JSON format
* `|` pipes the JSON output into the python script
* `python Timetable.py` runs the Python script to parse the JSON output and create the Tkinter GUI with the data from the optimal answer. 
  1. Wait until the timetable is generated in ASP and the GUI is launched in Python.

Advanced Usage

If you just wish to just generate the answer set using clingo without the Tkinter GUI:

clingo -n 0 asp/timetable.lp asp/atoms.lp

If you just wish to run the test cases, be sure you are in the "src" folder before using this command and replace with the test case in the ASP-Timetable/src/asp/test_cases directory:

clingo -n 0 asp/timetable.lp asp/test_cases/<test-file>.lp --outf=2 | python Timetable.py

You can view the LANA documentation on your web browser (generated using SeaLion Eclipse extension). To do so, go to the documentation folder and open the index.html file in your web browser.

License

Contact

  • email: adam@jaamour.com
  • website: www.adam.jaamour.com
  • twitter: @Adamouization

Owner

  • Name: Adam Jaamour
  • Login: Adamouization
  • Kind: user
  • Location: United Kingdom
  • Company: @NewDayTechnology

💻 Data Scientist @NewDayTechnology 🧠 MSc AI @ Uni of St Andrews 📓 BSc Computer Science @ Uni of Bath 💼 Former SWE @ Scuderia Alpha Tauri F1 Team

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels