Op 10-02-12 05:24, Jason Parekh schreef:
I'm new to constraint programming and Drools Planner. I've
read
through the
docs and built some rules that would probably get me to the right answer,
eventually :)
I was hoping to get your suggestions for better concrete rules.
Sometimes it's
easier to improve the domain then the rules.
There is good advice around domain design in the manual:
http://docs.jboss.org/drools/release/5.4.0.Beta2/drools-planner-docs/html...
What class is your planning entity? What property(s) of that class is
your planning variable(s)?
The problem is I need to order items in a performance with the following
logical rules:
1) All items of the same category must appear together.
What does "appear
together" mean? Is this a hard constraint?
2) A performer can be in multiple items, but ideally there'd be
at least
three items between any of her two items
The approaches I took are:
- For (1), count the number of transitions from one category to another.
Subtract this to the hard score.
Sounds good.
- For (2), three separate rules, each of which assert that an item
at
position i does not share performers with an item at position i+1, i+2 and
i+3 (one of these per rule). The number of shared performers would be
subtracted from the hard score.
Sounds good.
The scoring and my choice for construction heuristic (FIRST_FIT) are just
naive selections.
First fit is the best way to start :)
http://docs.jboss.org/drools/release/5.4.0.Beta2/drools-planner-docs/html...
I haven't gotten to optimizing either of these -- just
wanted to check with you guys to make sure my rules are sane.
Thanks in advance,
jason
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
With kind regards,
Geoffrey De Smet