Step1: install the Clingo on either macOS or Windows via https://github.com/zhunyoung/clingoTutorial (This instruction is demonstrating under MacOS)
Step4: On the Terminal run the following command line by line to get the result for each input instance individually.
Note: After running each command line above, the Clingo will generate 5 results individually depend oneach input instance
clingo version 5.4.
Reading from referee.lp ...
referee.lp:12:27-30: info: global variable in tuple of aggregate
element:
Rid
referee.lp:40:43-46: info: global variable in tuple of aggregate
element:
Rid
referee.lp:55:52-55: info: global variable in tuple of aggregate
element:
Rid
Solving...
Answer: 1
assign(4,5)
Optimization: 185
OPTIMUM FOUND
Models : 1
Optimum : yes
Optimization : 185
Calls : 1
Time : 0.006s (Solving: 0.00s 1st Model: 0.00s Unsat:
0.00s)
CPU Time : 0.006s
clingo version 5.4.
Reading from referee.lp ...
referee.lp:12:27-30: info: global variable in tuple of aggregate
element:
Rid
referee.lp:40:43-46: info: global variable in tuple of aggregate
element:
Rid
referee.lp:55:52-55: info: global variable in tuple of aggregate
element:
Rid
Solving...
Answer: 1
assign(5,7)
Optimization: 4260
OPTIMUM FOUND
Models : 1
Optimum : yes
Optimization : 4260
Calls : 1
Time : 0.008s (Solving: 0.00s 1st Model: 0.00s Unsat:
0.00s)
CPU Time : 0.007s
clingo version 5.4.
Reading from referee.lp ...
referee.lp:12:27-30: info: global variable in tuple of aggregate
element:
Rid
referee.lp:40:43-46: info: global variable in tuple of aggregate
element:
Rid
referee.lp:55:52-55: info: global variable in tuple of aggregate
element:
Rid
Solving...
Answer: 1
assign(6,11)
Optimization: 2486
OPTIMUM FOUND
Models : 1
Optimum : yes
Optimization : 2486
Calls : 1
Time : 0.007s (Solving: 0.00s 1st Model: 0.00s Unsat:
0.00s)
CPU Time : 0.007s
clingo version 5.4.
Reading from referee.lp ...
referee.lp:12:27-30: info: global variable in tuple of aggregate
element:
Rid
referee.lp:40:43-46: info: global variable in tuple of aggregate
element:
Rid
referee.lp:55:52-55: info: global variable in tuple of aggregate
element:
Rid
Solving...
Answer: 1
assign(7,13)
Optimization: 5794
Answer: 2
assign(7,14)
Optimization: 5494
OPTIMUM FOUND
Models : 2
Optimum : yes
Optimization : 5494
Calls : 1
Time : 0.008s (Solving: 0.00s 1st Model: 0.00s Unsat:
0.00s)
CPU Time : 0.007s
clingo version 5.4.
Reading from referee.lp ...
referee.lp:12:27-30: info: global variable in tuple of aggregate
element:
Rid
referee.lp:40:43-46: info: global variable in tuple of aggregate
element:
Rid
referee.lp:55:52-55: info: global variable in tuple of aggregate
element:
Rid
Solving...
Answer: 1
assign(8,18)
Optimization: 715
Answer: 2
assign(8,17)
Optimization: 714
OPTIMUM FOUND
Models : 2
Optimum : yes
Optimization : 714
Calls : 1
Time : 0.007s (Solving: 0.00s 1st Model: 0.00s Unsat:
0.00s)
CPU Time : 0.006s