[rules-users] How to ensure that a person does not execute the same task twice in a row?

Michiel Vermandel mvermand at yahoo.com
Wed Dec 5 02:05:00 EST 2012


Hi Cedric,

Thanks for your comment.
How should I model this schedule object? I mean, at which point do I put a 'assignment' in the list?
Should I do this within a rule?
Could you elaborate a bit on this solution?

Thanks!

Michiel


 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials


________________________________
 From: Cedric Hurst <cedric at spantree.net>
To: Michiel Vermandel <mvermand at yahoo.com>; Rules Users List <rules-users at lists.jboss.org> 
Sent: Tuesday, December 4, 2012 11:22 PM
Subject: Re: [rules-users] How to ensure that a person does not execute the same task twice in a row?
 

I believe you'll probably to create a schedule object that keeps track of all assignments.  From there , we can create a rule to assign a negative constraint penalty to any schedules with two adjacent assignments for the same person with the same task.  

Sent from my iPhone

On Dec 4, 2012, at 10:40 AM, Michiel Vermandel <mvermand at yahoo.com> wrote:


Hi,
>
>
>In my usecase I need to plan tasks (PlanningEntity).
>I have two kinds of tasks (for example CleaningTask and InspectionTask (inspect that cleaning was OK)).
>Each taskneeds to be assigned to a person and a period.
>Person and period both are PlanningVariables.
>
>
>I need to ensure that a person does not execute an InspectionTask twice in a row.
>How can I find out what the previous task is that is assigned to a person?
>It is not guaranteed that the person had a task in the previous period (period-1).
> 
>Thanks,
>
>Michiel
>
>-----------------
>http://www.codessentials.com - Your essential software, for free!
>Follow us at http://twitter.com/#!/Codessentials
_______________________________________________
>rules-users mailing list
>rules-users at lists.jboss.org
>https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20121204/3142fad5/attachment-0001.html 


More information about the rules-users mailing list