I'm working with Optaplanner to solve a problem similar to the patient admission scheduling example.
I'm facing two problems.
Firstly when one of the planning entities (similar to bedDesignation of the example) is positioned by someone (not optaplanner), this planning entity is scored like the others. The planning entity manually placed become an immovable planning entity but it is still scored like movable planning entity. And because of that it breaks some hard constraint.
Secondly still when one of the planning entities (similar to bedDesignation) is positioned by someone (not optaplanner), this planning entity is moved during the local search phase. The local search phase is configured like this (same configuration than the example) :
<localSearch>
<unionMoveSelector>
<moveListFactory>
<moveListFactoryClass>org.optaplanner.examples.pas.solver.move.factory.BedDesignationPillarPartSwapMoveFactory</moveListFactoryClass>
</moveListFactory>
</unionMoveSelector>
<acceptor>
<entityTabuSize>7</entityTabuSize>
</acceptor>
<forager>
<acceptedCountLimit>1000</acceptedCountLimit>
</forager>
</localSearch>
The BedDesignationPillarPartSwapMoveFactory class is unchanged from the example. I read in the documentation that for an immovable planning entities we must make sure that the custom moveListFactory don't move immovable entities. But how ? In the config xml file or in the class itself ?
Thank you for your help.