[rules-users] Planner 5.3.Final - "presumedScore is corrupted" when using "update" on the rules working memory

Geoffrey De Smet ge0ffrey.spam at gmail.com
Wed Nov 30 04:01:51 EST 2011



Op 30-11-11 01:11, guyramirez schreef:
> I am looking into Planner for a schedule assignment business case.
>
> I created a move factory, got the local search phase set up and quicly ran
> into a "presumedScore is corrupted because it is not the realScore" error.
> As a work around, I changed my Move::doMove(..) implementation to "retract"
> then "insert" rather than "update" the new updated planning entity and the
> issue went away.
That's a hack.
It will probably reduce the effect of delta score calculation (see 
manual), also called incremental score calculation.
> Then I worked on setting a construction heuristic and I again ran into the
> same error. By applying a local code patch to the
> PlanningValueWalker::changeWorkingValue(..) method to also "retract" and
> "insert" rather than "update" also fixed the issue.
There the hack breaks. Don't do that hack :)
> I also tried to correctly implement the hashCode() and equals(..) methods on
> my planning entity (as mentioned in Drools Expert documentation) as well as
> use the default implementation of those methods (as in the nurse rostering
> example) with the same unsuccessful results.
>
> I must mention than I am able to run the nurse rostering example without any
> issues.
>
> Could someone maybe point me to the right direction on why "update" does not
> work for me? I can provide detailed information if needed.
There's a bug in your undoMove method or in one of your score rules.

You're not the only one running into this, so Planner 5.4 will improve 
this in 2 ways:
- Writing Move's and MoveFactory's will become optional: out-of-the-box 
several good implementations will be included
- Planner's "presumedScore is corrupted because it is not the realScore" 
exception should analyse and clearly list what could be wrong.
https://issues.jboss.org/browse/JBRULES-3301

Meanwhile, to understand your bug, read
https://issues.jboss.org/browse/JBRULES-3301
and read the section "delta based score calculation" in the manual.

HTH

> Thanks,
> Guy
>
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Planner-5-3-Final-presumedScore-is-corrupted-when-using-update-on-the-rules-working-memory-tp3546932p3546932.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

-- 
With kind regards,
Geoffrey De Smet





More information about the rules-users mailing list