So your Solution.getProblemFacts() method adds all Shifts and all Demands? Then the rule should fire if there is indeed such a combination. Write a SimpleScoreCalculator to verify this (see docs). Later on, you can reuse that SimpleScoreCalculator in <assertionScoreDirectorFactory> to validate your DRL (which is much faster). On 04-11-13 16:26, nkgxgongxi wrote:
Ge0ffery, Thank you very much for the reply. I have double-checked my code, and I did use addAll() here.I also used one of my simplest OptaPlanner projects as a test, and the same thing occurred. Later last Friday I found out a workaround of picking up planning entity first (in my rule definition). Then I can access to the problem facts via condition match. But this made the code complex and not elegant. Would you elaborate more if I misunderstand how OptaPlanner solver behaves? Once again, I really appreciate your help and your effort on this powerful software. Cheers, -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Ask-for-help-with-OptaPlanner-tp4026583p4026626.html Sent from the Drools: User forum mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users |
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users