Phreak isn't ready for general consumption yet :) We're working hard to
make it ready though.
Regardless, the fact that Phreak doesn't expose this issue is a coincidence.
There's actually a potential issue in OptaPlanner:
Given the recent uptake in VRP implementations, I 'll try to give this
priority in the next month or so.
To fix your problem you can either go alternative B) or use the
described workaround hack to get alternative A) to function properly.
On 15-05-13 10:54, Paul T wrote:
Hi Geoffrey
Thanks for attending to the Jira.
I am at a loss as how to continue using Rete if my model cannot be handled
by Rete so as Phreak works .....
tried out using Drools,OptaPlanner as per 2013-05-14 snapshots,
turned on Phreak in OptaPlanner ScoreDirectorFactoryConfig,
used OptaCrashExample-2.tar.gz from the Jira ,
changed testConfigDRL.xml from minimalAcceptedSelection to
acceptedCountLimit
which resulted in the following error: which appears similar to the
previous score corruption problem.
2013-05-15 07:38:26,149 [main] INFO Loaded: data/plansched/solved/tmp.xml
2013-05-15 07:38:28,308 [main] INFO KieModule was added:MemoryKieModule[
ReleaseId=org.default:artifact:1.0.0-SNAPSHOT]
OptaPlanner 2013-5-14 PT PhreakOption.ENABLED
2013-05-15 07:38:28,666 [main] INFO Solving started: time spend (146),
score (0hard/0medium/0soft), new best score (0hard/0medium/0soft), random
seed (0).
2013-05-15 07:38:28,669 [main] INFO Phase (0) constructionHeuristic ended:
step total (0), time spend (149), best score (0hard/0medium/0soft).
Exception in thread "main" Exception executing consequence for rule
"standtime vs maxendtime" in com.umple.solver:
java.lang.IllegalStateException: The constraintMatchTotal
(com.umple.solver/standtime vs maxendtime/level2=11) could not remove
constraintMatch (com.umple.solver/standtime vs maxendtime/level2/[ Plan: id
12 fry snitzel, Plan: id 10 fry chips, [Table-2],
org.drools.core.reteoo.InitialFactImpl@4dde85f0]=-11) from its
constraintMatchSet ([]).
at
org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at
org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1448)
at
org.drools.core.phreak.RuleExecutor.evaluateNetwork(RuleExecutor.java:105)
at
org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1334)
at
org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1585)
at
org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:654)
at
org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:618)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:233)
at
org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.calculateScore(DroolsScoreDirector.java:181)
at
org.optaplanner.core.impl.solver.scope.DefaultSolverScope.calculateScore(DefaultSolverScope.java:93)
at
org.optaplanner.core.impl.phase.AbstractSolverPhaseScope.calculateScore(AbstractSolverPhaseScope.java:117)
at
org.optaplanner.core.impl.localsearch.decider.DefaultDecider.processMove(DefaultDecider.java:157)
at
org.optaplanner.core.impl.localsearch.decider.DefaultDecider.doMove(DefaultDecider.java:144)
at
org.optaplanner.core.impl.localsearch.decider.DefaultDecider.decideNextStep(DefaultDecider.java:116)
at
org.optaplanner.core.impl.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:62)
at
org.optaplanner.core.impl.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:190)
at
org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:155)
at
com.umple.app.PlanSchedHelloWorld.pseudoBenchMark(PlanSchedHelloWorld.java:77)
at com.umple.app.PlanSchedHelloWorld.main(PlanSchedHelloWorld.java:60)
Caused by: java.lang.IllegalStateException: The constraintMatchTotal
(com.umple.solver/standtime vs maxendtime/level2=11) could not remove
constraintMatch (com.umple.solver/standtime vs maxendtime/level2/[ Plan: id
12 fry snitzel, Plan: id 10 fry chips, [Table-2],
org.drools.core.reteoo.InitialFactImpl@4dde85f0]=-11) from its
constraintMatchSet ([]).
at
org.optaplanner.core.api.score.constraint.primint.IntConstraintMatchTotal.removeConstraintMatch(IntConstraintMatchTotal.java:101)
at
org.optaplanner.core.api.score.holder.AbstractScoreHolder$2.unMatch(AbstractScoreHolder.java:87)
at
org.optaplanner.core.api.score.holder.AbstractScoreHolder.prepareAgendaItemForUnMatchListener(AbstractScoreHolder.java:218)
at
org.optaplanner.core.api.score.holder.AbstractScoreHolder.registerIntConstraintMatch(AbstractScoreHolder.java:72)
at
org.optaplanner.core.api.score.buildin.hardmediumsoft.HardMediumSoftScoreHolder.addSoftConstraintMatch(HardMediumSoftScoreHolder.java:90)
at
com.umple.solver.Rule_standtime_vs_maxendtime2105489009.defaultConsequence(Rule_standtime_vs_maxendtime2105489009.java:13)
at
com.umple.solver.Rule_standtime_vs_maxendtime2105489009DefaultConsequenceInvokerGenerated.evaluate(Unknown
Source)
at
com.umple.solver.Rule_standtime_vs_maxendtime2105489009DefaultConsequenceInvoker.evaluate(Unknown
Source)
at
org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1438)
Any suggestions:
- do you think that my requirement is unsuited to using rule based scoring ?
- stay with SimpleScore ?
Thanks
Paul
--
View this message in context:
http://drools.46999.n3.nabble.com/Optaplan6-0-0Beta1-chaining-simpleScore...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users