You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when the clingo package is installed in python, Clyngor will use the propagator and the ClingoAnswers by default. This is because the use_clingo_module variable in solving.py is by default set to True and the clingo package check with have_clingo_module() wil return something because "import clingo" raises no error.
Then when we use Clyngor to solve and parse answers, the script will return results without applying the answer functions (like int_not_parsed or with_optimization) because the script uses the class ClingoAnswers instead of the class Answers. And the __iter__ function of ClingoAnswers have a different behaviour than the function of Answers.
I think this happens when a user install Clingo with the conda command: conda install -c potassco clingo
Hello,
when the clingo package is installed in python, Clyngor will use the propagator and the ClingoAnswers by default. This is because the use_clingo_module variable in solving.py is by default set to True and the clingo package check with have_clingo_module() wil return something because "import clingo" raises no error.
Then when we use Clyngor to solve and parse answers, the script will return results without applying the answer functions (like
int_not_parsed
orwith_optimization
) because the script uses the class ClingoAnswers instead of the class Answers. And the__iter__
function of ClingoAnswers have a different behaviour than the function of Answers.I think this happens when a user install Clingo with the conda command: conda install -c potassco clingo
And encapsulation:
Results are (with clingo installed):
Results are (after deleting clingo so deleting
/path/to/lib/python3.6/site-packages/clingo.cpython-36m-x86_64-linux-gnu.so
):We see that the atoms_as_string function was not applied with clingo python package installed.
One way to solve this is by setting the variable
use_clingo_module
to False when calling the solver.The text was updated successfully, but these errors were encountered: