[rules-users] Error selecting order decrease

André Fróes arfmoraes at gmail.com
Mon Jan 28 08:59:41 EST 2013


Hello there, i'm getting this error:

-------------------
11:26:50.394 [main] INFO  o.d.p.core.solver.DefaultSolver - Solving
started: time spend (187), score (null), new best score (null), random seed
(0).
Exception in thread "main" java.lang.IllegalStateException: The
selectionOrder (DECREASING_DIFFICULTY) can not be used on a PlanningEntity
(com.swa.planner.domain.CloudProcess) that has no support for difficulty
sorting. Check the @PlanningEntity annotation.
at
org.drools.planner.core.heuristic.selector.entity.PlanningEntitySelector.validate(PlanningEntitySelector.java:53)
at
org.drools.planner.core.heuristic.selector.entity.PlanningEntitySelector.phaseStarted(PlanningEntitySelector.java:45)
at
org.drools.planner.core.constructionheuristic.greedyFit.selector.GreedyPlanningEntitySelector.phaseStarted(GreedyPlanningEntitySelector.java:41)
at
org.drools.planner.core.constructionheuristic.greedyFit.DefaultGreedyFitSolverPhase.phaseStarted(DefaultGreedyFitSolverPhase.java:111)
at
org.drools.planner.core.constructionheuristic.greedyFit.DefaultGreedyFitSolverPhase.solve(DefaultGreedyFitSolverPhase.java:57)
at
org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:190)
at
org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:155)
at com.swa.planner.domain.CloudTest.main(CloudTest.java:51)
-------------------------

I know why it is happening though (at least i think so), but will I have to
implement the comparator to every planner I do or is there any other way to
make it work?

I'm reproducing the example from the guide, when it passes the drools rules
it gives that message. I didn't implement CloudComputerStrengthComparator
neither CloudProcessDifficultyComparator, will I have to implement those so
this example works?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130128/8146b065/attachment-0001.html 


More information about the rules-users mailing list