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.
atoms.lp
)
src
folder.git clone https://github.com/Adamouization/ASP-Timetable
cd ASP-Timetable/src/
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 specifiedtimetable.lp
contains the generators, rules, constraints and dislay options to generate the optimal timetableatoms.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 scriptpython Timetable.py
runs the Python script to parse the JSON output and create the Tkinter GUI with the data from the optimal answer.Wait until the timetable is generated in ASP and the GUI is launched in Python.
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/.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.