I have extended my problem base from curriculumCourse example of optaplanner samples.
And since it was necessary to solve on-hand problem, I started to use 2 variables, both from "value range provider from entity".
Now I am trying to improve my solutions, and, when I check solution, I realized that there are some lectures which can be better (based on score), if they are simply swapped, or moved left or right, etc.
I am not sure if this approach will solve this, but I catched that, with nearbySelection, planner can "coarse-grain" moves, especially based on their similarity (custom DistanceMeter)
However, problem starts at this point, I couldnt configure nearbySelection properly, here is my latest configuration xml
<changeMoveSelector>
<entitySelector id="entitySelector1">
<entityClass>....Lecture</entityClass>
</entitySelector>
<valueSelector>
<variableName>period</variableName>
<nearbySelection>
<originEntitySelector mimicSelectorRef="entitySelector1"/>
<nearbyDistanceMeterClass>.....LectureNearbyDistanceMeter</nearbyDistanceMeterClass>
<parabolicDistributionSizeMaximum>40</parabolicDistributionSizeMaximum>
</nearbySelection>
</valueSelector>
</changeMoveSelector>
If I dont provide variableName, then it doesnt work, since configurator cannot pick it automatically, however, I couldnt put variableName inside valueSelector, it complains about "java.lang.IllegalArgumentException: The valueSelector (org.optaplanner.core.impl.heuristic.selector.value.nearby.NearEntityNearbyValueSelector@2f66e802) has a variable property type (....Period) which is not a superclass of the originEntitySelector's entityClass (....Lecture)."
Can someone give me a clue, what I am doing wrong here ?