[rules-users] Drools Planner - Time Slots vs Time Periods

Geoffrey De Smet ge0ffrey.spam at gmail.com
Wed May 5 06:00:37 EDT 2010


I 've heard this use case a couple of time ("machine queue planning")
and Drools Planner is highly suited for it.
Vehicle routing suffers from the same pitfall you describe.

You don't have fixed time slots, so you don't have discrete timeslot 
start times.
Don't start assigning items to indiscrete (=dynamic) start times.
Your number of possible solutions will go through the roof
(the pas example with 10^6700 possible solutions will look like a joke)
and almost all of them (a lot more than 99,99999999999%) will have 
unwelcome gaps.

Instead, assign items to a sequence number on a certain machine.
Optionally, also assign gaps if you need gaps.
Your moves will be more complicated as they will have to
squeeze an item in or out the middle of a queue,
forcing the items coming later to change sequence number too.
Your score rules will be more complicated
as you 'll have to determine the start time of an time by accumulating 
the duration of all the items coming before it (possibly even taking 
work breaks such as lunch, nights and weekends into account or maybe you 
can ignore because breaks are a 0 operation).

Those complications are annoying, but IMHO, assigning items directly to 
indiscrete start times will never be performant enough to get to a 
feasible solution of a real-world problem.
Although I'd love it if you can prove me wrong :)

With kind regards,
Geoffrey De Smet
Drools Planner lead


awuttke schreef:
> Hello,
> 
> most of the Drools Planner examples deal with fixed time slots. Lessons are
> assigned to defined time slots, nurses are assigned to work at fixed time
> slots, etc. So the time slots start at a defined time and have a defined
> length.
> 
> What I'm looking for is an example which is dealing with flexible time
> periods instead (flexible start times and durations). 
> 
> E.g. a work item needs a defined time to be processed on a machine
> (processing time can vary for each work item). In order to keep all machines
> busy all the time the work items should be scheduled without gaps if
> possible. In addition work items should be assigned only to machines that
> have a certain capability required by the work item. Some work items might
> have a defined order in which they have to be processed. Some items can have
> a defined time when they should start, etc.
> 
> I assume that in this case the planner move logic would have to be changed.
> Instead of exchanging fixed time slots the time periods would have to be
> modified. 
> 
> Any idea how this could be modelled / implemented? 
> 
> Thanks for any comment on this,
> Andreas
> 




More information about the rules-users mailing list