To run the SICStus program, execute the following command in the root directory of the project:
</path/to/sicstus> -l source/sicstus/main.pl --goal "<run_predicate>."run_predicate is one of:
run('/path/to/input/folder');run('/path/to/input/folder', SearchParameters);run('/path/to/input/folder', SearchParameters, Statistics).
The parameters for the predicates are:
SearchParametersis a list of parameters for labelling of the clpfd library, which means it can include:- One of [
leftmost(default),min,max,ff,ffc]; - One of [
step(default),enum,bisect]; - One of [
up(default),down]; - Running the first command is equivalent of running the second with [
min,bisect,down].
- One of [
Statisticsis one offalse,fdorall.- Running the second command is equivalent of running the third one with
false.
- Running the second command is equivalent of running the third one with
In the input folder the program will expect two files:
- flights.json;
- students.json.
To test it with our input files and default search parameters, run:
</path/to/sicstus> -l source/sicstus/main.pl --goal "run('data/new')."And, to execute it with the same files, fd statistics and [min, step, up] as the search parameters run:
</path/to/sicstus> -l source/sicstus/main.pl --goal "run('data/new', [min], fd)."To run the OR-Tools version of the program you first need to install OR-Tools on your computer
Then just use the following command on the "or-tools" folder:
python main.pyTo run the other implementation of a solution to this problem just use the same command but in the "old" sub-folder.
To run the DOcplext version of the program, execute the Jupyter Notebook on source/cplex/model.ipynb.
This project was made by Alexandre Abreu, Pedro Seixas and Xavier Pisco for the Constraint logic programming course at FEUP in 2021/2022.