I've written some predicates to solve large scheduling problem and they work well but I'd like them to have some better performance. I've run profile/1
and what I see is that CLPFD-related predicates take 99% of the time. Especially garbage_collect
- it takes 37% of the execution time.
Now, what can I do? My code isn't especially complex, it uses a lot of cumulative/2
and some global_cardinality/2
, nothing special above that. I've tried some different options for labeling/1
(ff, ffc, bisect), but there is no difference (bisect makes things worse, actually). I've tried raising memory limits with set_prolog_stack/2
(global limit, local limit, global min_free, local min_free).
Is there anything more I can do?
Are there any alternative imlpementations of cumulative/2
or global_cardinality/2
which could have better performance?
Without any code and just the problem domain, all I can suggest is consider adding redundant constraints to further cut down search space.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With