-
Bug
-
Resolution: Done
-
Minor
-
7.0.0.Final, 7.38.0.Final
-
None
-
2023 Week 03-05 (from Jan 16), 2023 Week 06-08 (from Feb 6), 2023 Week 09-11 (from Feb 27), 2023 Week 12-14 (from Mar 20)
-
-
NEW
-
NEW
The NearbyEntityValueSelector drops the first (nearest) value if the value class.isAssignableFrom(entity class) is true. I guess the purpose of this behavior is to remove the origin entity itself from the values.
The problem is if a NearbyDistanceMeter returns 0 for values other than the origin entity, the order of the values depends on the order of valueRangeProviderRefs, and the first value is not guaranteed to be the origin entity. This could result some values may remain unused, for example when every move is nearby selected.
I attached two reproducers for the vehicle routing example. Both has a CH with nearby selection, the first is an example problem with a customer and a vehicle at the same location, the second is a slightly modified distance meter which ruins any problem.
The easiest workaround is to change the order of the valueRangeProviderRefs on previousStandstill.