<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>Hi,<br><br>not sure I got all the details (seeing rules could help, I did not understand what is wrong with your approach).<br><br>As far I undertand, you already has a list containing the jov sequence, so you can update "prevJob" and "nextJob" attributes of you planning variables "Job".<br>If yes, let's say you have 2 methods that returns "prevJobBreak" (or null if no prevJob)<br>I would then add 2 rules for your 2 criteria :<br><br>rule "min_small_breaks"<br>when<br>&nbsp; &nbsp;&nbsp; $small_breaks : Number from accumulate( Job($break : prevJobBreak != null &amp;&amp; &lt;= 20), sum($break) )&nbsp; // not sure of exact syntax, see accumulate doc)<br>then<br>&nbsp;&nbsp;&nbsp;&nbsp; // insert soft with : $small_breaks<br>end<br><br>rule "max_big_breaks"<br>when<br>&nbsp; &nbsp;&nbsp; $big_breaks : Number from 
accumulate( Job($break : prevJobBreak != null &amp;&amp; &gt; 20), 
sum($break) )&nbsp; <br>then<br>&nbsp;&nbsp;&nbsp;&nbsp; // insert soft with : -1 * $big_breaks&nbsp; (or anything else with a suitable weigth according to the other criteria)<br>end<br><br><br>Note that I only use prev, but nextJob can be used to add rules (contraints or criterion) over consecutives jobs (forbidden/mandatory sequences for instance).<br>I also sum over all big breaks. I don't know if you have a constraint that limits the number of big breaks to 1. If &gt;1, may be you have to find a formula to optimise also the number of single 'as big as possible' big breaks in a day.<br><br></div></body></html>