-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance Issue - Clingo in concurrent threads #64
Comments
Hi, I do not know much about stream reasoning but can tell you what the limitations of the clingo system are.
(*) It is also possible to extend the inputs dynamically but this is getting complicated. |
Hi,
With that, only the assignment rules have to be continuously grounded and added as new modules but not the whole problem encoding. Naturally, this won't scale ad infinitum either but should provide a notable improvement to your original approach. |
Pobermei and rkaminsk, thanks a lot for your answer. My second question: Is it possible to remove some obsolete predicates from the grounding set of the solver during the solving process? Best |
Representing so many time points with atoms will certainly not scale. You might want to have a look into clingcon, which can handle variables over (finite) numbers. But note that it does not support multi-shot solving yet.
To remove something from a logic program, externals can be used. Releasing #external a.
b :- a. will remove |
Hello,
I am using Clingo 4.5.3 which is assumed to be considered as a stream reasoner. The idea is to feed the incremental ASP solver with the data that is continuously coming from a number of sensors. In order to model such system, I have implemented two concurrent threads in Java. The first thread reads the database table at each second to fetch the newly arrived data and share it with the second thread which has initialized clingo and is waiting to feed it with the data. This model works fine only during the first two minutes after running the threads. The second thread starts to get slower after about 2 minutes (~ timestampe 200) and thus causes considerable delays in reading and parsing the sensor data in real time.
However, when I run the solver alone and feed it manually (not through threads) it quickly solves the program with the given data and without getting slower even at timestamps larger than 200.
I appreciate if you let me know how to deal with the performance issue, or any hints about modeling or initializing the solver.
Best
The text was updated successfully, but these errors were encountered: