Hi Paul,

Can you copy paste your rule?

On 17-04-13 12:15, Paul T wrote:
> Requirement:Equip to tasks scheduling.Earlier tasks may not exceed a waittime
> to latest endtime for each job.
>
> 2 JOBs to plan each with 2 identical TASKs with only 1 EQUIPMENT anchor:
> J1 comprises T1,T2            and         J2 comprises T1,T2.
>
> problem    Fact:      EQUIPMENT E1
> planning Entity:      TASK    T1|duration=3|waittime=2   and
> T2|duration=5|waittime=3
>     
> OptaPlan Schedule attempt
> -------------------------
> anchor(E1:T1J1,T1J2,T2J1,T2J2)      - so T1J1 is pos1,T1J2 is pos2 etc :
> timings are 3+3+5+5 and respective waittimes are 2,2,3,3
>
> Rule: get latest ending task by JOB and punish if waittime is exceeded
> between the tasks for that specific JOB.
>
>       J1 latestendtime=11 which is T2J1
>       J2 latestendtime=16 which is T2J2
>       Punish if any task endtime for JOB exceeds waittime (so for J1:
> T2J1-T1J1=(11-6-2)*-1 = -3 (SOFT)
>                - I believe that the score function remembers J1,T2J1 in 
> position 3 and
> T1J1 in position 1 with SOFT score -3
>
> OptaPlan Schedule attempt
> -------------------------
> anchor(E1:T1J1,T2J2,T2J1,T1J2)      - so T1J1 is pos1,T2J2 is pos2 etc :
> timings are 3+5+5+3 and respective waittimes are 2,3,3,2
>
> Rule: get latest ending task by JOB and punish if waittime is exceeded
> between JOBs
>
>       J1 latestendtime=13 which is T2J1
>       J2 latestendtime=16 which is T1J2
>       Punish if any task endtime for JOB exceeds waittime (so for J1:
> T2J1-T1J1=(13-6-2)*-1 = -5 (SOFT)
>                - I believe that the score function remembers J1,T2J1 in 
> position 3 and
> T1J1 in position 1 with SOFT score -5
>
> Score corruption seems to occur as the DRL scoring function has 2 identical
> set of entities/values but with different score results!
>   J1,T2J1 in position 3 and T1J1 in position 1 with SOFT score -3
>   J1,T2J1 in position 3 and T1J1 in position 1 with SOFT score -5
Looks like no unmatch happens.

I know of 1 bug in drools (5.5.0 and 6.0.0.Beta1) that causes score 
corruption:
   https://issues.jboss.org/browse/DROOLS-95
which is fixed on master (6.0.0.Beta2) and the 5.5.x branch (5.5.1.Final).

Can you try with the latest snapshot of Drools (and optionally 
OptaPlanner too):
Download the zip with the latest timestamp:
  
https://repository.jboss.org/nexus/content/groups/public/org/optaplanner/optaplanner-distribution/6.0.0-SNAPSHOT/
Let us know if that fixes it or doesn't.

>
> What has happened is that J2 has swapped its tasks around which are not(?)
> taken into account for  a chaining DRL score function and
> hence does not see them as different.
>
> Q?: Am I correct in my assumption that the DRL score function has
> insufficient data to compare for my requirement?
> Q?: If so any ideas to resolve?
>
>
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Optaplan6-0-0Beta1-chaining-simpleScore-OK-DRL-Score-corruption-tp4023365.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

Reply via email to