OptaPlanner : ValueSelector can not use ValueRangeType.FROM_PLANNING_ENTITY_PROPERTY

前端 未结 1 1875
栀梦
栀梦 2021-01-28 02:46

I am using MoveSelector configuration in the ConstructionHeuristic Phase. It works fine with configuring filterClass and comparatorClass in EntitySelector.

However, in

相关标签:
1条回答
  • 2021-01-28 03:12

    That valueSelector is SORTED, so it needs to cache (to be able to sort them). But caching with a @ValueRangeProvider per entity is not supported if I recall correctly.

    This implies that the CH with a @ValueRangeProvider per entity only supports FIRST_FIT and FIRST_FIT_DECREASING, but not WEAKEST_FIT or STRONGEST_FIT. I believe there's a jira for this already (do link it here if you find it). We need to fix this.

    Meanwhile: a workaround would be to not use SORTED, but already sort them in each entity's value range list.

    0 讨论(0)
提交回复
热议问题