Search code examples
optaplanner

CloudBalance example tweak


I've been playing with the basic CloudBalance example, and have given it input of one Computer and two Processes. Both processes are too much to fit on the computer, so only one should go on. However, when solving the solution (albeit with negative HardScore) is that both Processes are on the Computer. I understand there is not actual solution for both Processes, but shouldn't the result only have one Process assigned to the Computer, and the other not assigned? How would I need to change the setup to make that happen?


Solution

  • Look at Overconstrained Planning in the docs. By default, OptaPlanner will assign all Processes, because assigning to null is not an option.