Op 12-02-13 07:31, Michiel Vermandel schreef:
Hi Geoffry,

Thanks for the advice.

About: Is 4) worse than 1)?
Yes it is because in 4) there is a gap (P7) and in 1) there is not.
I understand it seems strange, but that is a requirement of the customer...
The customer is king :)

That does mean you could use a move that changes this
X--
-X-
--X

into
X--
X--
X--
or
--X
--X
--X

Note that there's no need to change into (although it wouldn't hurt much if it was there)
-X-
-X-
-X-
because the existing (change) moves can easily go to the temp situation first:
X--
-X-
-X-
or
-X-
-X-
--X

Regards,

Michiel

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

From: Geoffrey De Smet <ge0ffrey.spam@gmail.com>
To: rules-users@lists.jboss.org
Sent: Monday, February 11, 2013 11:21 AM
Subject: Re: [rules-users] Planner: What is a good example/algo to chain entities?


Op 08-02-13 09:20, Michiel Vermandel schreef:
Hi,

Any one got an idea?

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

From: Michiel Vermandel <mvermand@yahoo.com>
To: Rules lists.jboss.org <rules-users@lists.jboss.org>
Sent: Wednesday, February 6, 2013 8:44 AM
Subject: [rules-users] Planner: What is a good example/algo to chain entities?

Hi,

I need to keep some Planning entities (Tasks) together and I am looking for some insights/ideas/examples in how to tackle this.
Tasks are grouped by a groupId (Groups are problem facts).
The Tasks do not have to be grouped like a pillar but more like an accordion.
One of the planning variables is "Period", a Period typically is 3 weeks and we have 12 Periods to plan the tasks into.

The requirement is that all tasks within  a group need to be kept together in such a way that:
- the spread (nr of periods) of the tasks is minimal
- the spread is never more than the sum of the duration of the separate tasks in the group.

So given a group of 3 tasks:

1)This is good:

Period 12345789ABC
T1:      xxx
T2:         xx
T3:           x

2)This is better:

Period 12345789ABC
T1:      xxx
T2:       xx
T3:         x

3)This is (one of) the best:

Period 12345789ABC
T1:      xxx
T2:       xx
T3:        x

4)This is bad:

Period 12345789ABC
T1:      xxx
T2:       xx
T3:          x
Is 4) worse than 1)?

Of course 3 is favorite, but maybe not possible due to other planning variables (-> availability of people to execute the tasks).
I need to plan a few hundred of such groups of tasks which all share the same Period space and list of available people.
(A person can only do one task per period)

I have got the DRL rule that keeps the tasks together (rule counts the gaps) , but giving penalty for making gaps (by shifting a single task) makes it hard to find a good solution.
What would be the best approach to solve this problem?

- A combination of custom mover and swapper which moves/swaps groups instead of single tasks?
- The above in combination with a group shuffle factory (swapping tasks in a single group)?
Not sure what you mean with these last 2 questions,
but course grained moves are probably a good way to get out this situations.
For example: move all T's in the same period (or that share a period).
<pillarSwapMoveSelector> does this if the value is exactly the same (you'll need variableNameInclude since 6.0.0.Alpha7 if you have multiple vars...)
Otherwise, take a look at BedDesignationPillarPartSwapMoveFactory for inspiration (it's pretty different, but interesting to learn).

Other ideas?


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

_______________________________________________
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


_______________________________________________
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