<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hello there,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I&#39;m pretty new to OptaPlanner, and I must say I&#39;m really impressed with the maturity of it all. Great software with a great documentation !</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I&#39;ve been working on a variation of the Cloud Balancing example, with a few differences, which make it look like the Machine Reassignment problem as well :</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">- Some processes are already placed and are immovable (using a Selection Filter checking a boolean property of the planning entity)</div>
<div style="font-family:arial,sans-serif;font-size:13px">- The Computer (the planning variable) is nullable (basically this is Multiple Muti-Dimensional Knapsack problem) which means I added a soft constraint penalty for processes with a null host.</div>
<div style="font-family:arial,sans-serif;font-size:13px">- Processes can only be of a few classes (which I called services, a Problem Fact). Processes of a given service type have a certain amount of required cpu and ram.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Taking these elements into account, I do get very good results with OptaPlanner. However, the following constraints always put me into a score trap :</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">- For some services, processes work in groups. For instance, if groups are of size 3, having 7 processes is not any better than having 6 processes. If there were already 2 processes (immovable and placed), I should only add 4 processes and not 5, even if there are enough resources. For this constraint, I have tried using a rule (medium constraint) accumulating processes of that service and using the modulo operator with the group size.</div>
<div style="font-family:arial,sans-serif;font-size:13px">- Some services are dependant on one another. For instance, I know that if I have n1 groups of processes of the service 1, I require Math.ceil(2.5*n1) groups of processes of the service 2. I have implemented this similarly with a medium constraint...</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">With any (or both) of these constraints, little to no processes of the concerned services are added and I fail to reach a good solution. I have tried benchmarking with several local search methods and various parameters, but all give the same results... </div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I feel like the next logical step would be to used the often mentioned in the documentation &quot;Coarse Grained Moves&quot; but I fail to locate any simple example. The Nurse Rostering example seems to use that technique to some extent but it seems like an overly complicated example, is it not.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Thank you very much for reading this far, if you have any question, guideline, or just a trick, I&#39;d be absolutely delighted to hear from you !</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Cheers,</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
Woody</div></div>