<span style>I'm new to constraint programming and Drools Planner. I've read through the</span><br style><span style>docs and built some rules that would probably get me to the right answer,</span><br style><span style>eventually :)</span><br style>
<br style><span style>I was hoping to get your suggestions for better concrete rules.</span><br style><br style><span style>The problem is I need to order items in a performance with the following</span><br style><span style>logical rules:</span><br style>
<span style>1) All items of the same category must appear together.</span><br style><span style>2) A performer can be in multiple items, but ideally there'd be at least</span><br style><span style>three items between any of her two items</span><br style>
<br style><span style>The approaches I took are:</span><br style><span style>- For (1), count the number of transitions from one category to another.</span><br style><span style>Subtract this to the hard score.</span><br style>
<span style>- For (2), three separate rules, each of which assert that an item at</span><br style><span style>position i does not share performers with an item at position i+1, i+2 and</span><br style><span style>i+3 (one of these per rule). The number of shared performers would be</span><br style>
<span style>subtracted from the hard score.</span><br style><br style><span style>The scoring and my choice for construction heuristic (FIRST_FIT) are just</span><br style><span style>naive selections. I haven't gotten to optimizing either of these -- just</span><br style>
<span style>wanted to check with you guys to make sure my rules are sane.</span><br style><br style><span style>Thanks in advance,</span><br style><span style>jason</span><br style>