well I looked at this illustration in docs:
in docs it says:
For one planning variable, the ChangeMove selects one planning entity and one planning value and assigns the entity’s variable to that value.
but if we would do exactly what it says, we would end up in an invalid state, where both Amts.
and Berlin
are pointing to Brus.
as their parent?
The illustration is actually showing a SubChainChangeMove
with length = 1. So is OptaPlanner automatically replace ChangeMove
by a SubChainChangeMove
when it encounters chained variables or do I understand it wrong?
OptaPlanner handles ChangeMove's on chained variables differently: it does chain correction to avoid getting into an invalid state. See ChainedChangeMove that extends ChangeMove.