It appears that define the --parallel-mode clasp option leads to a warning, and an unsatisfiable result. (no model found)
Here is the python program:
from pyasp import asp
PROGRAM = """
% choose two values
values(1..10).
2 {choosen(X): values(X)} 2.
% score is the sum of the values
score(S):- S=#sum{X:choosen(X)}.
% maximize the score
#maximize{S:score(S)}.
#show.
#show choosen/1.
#show score/1.
"""
def test(clasp_options):
solver = asp.Gringo4Clasp(clasp_options=clasp_options)
return solver.run([], additionalProgramText=PROGRAM)
print('FIRST: no clasp option:')
print('answers:', test(''))
print('-----------------------')
print('SECOND: use 2 threads:')
print('answers:', test('--parallel-mode=2'))
Result (python 3.4.3):
FIRST: no clasp option:
answers: [TermSet({'score(19)', 'choosen(10)', 'choosen(9)'})]
-----------------------
SECOND: use 2 threads:
WARNING: OPTIMUM FOUND but zero optimals
answers: []
It appears that define the --parallel-mode clasp option leads to a warning, and an unsatisfiable result. (no model found)
Here is the python program:
Result (python 3.4.3):