4

I am developing a solver using Optaplanner 6.1.0, similar to the Vehicle Routing Problem. When I run my solver on 700 installers and 200 bookings, it will successfully solve the planning problem. But, when I used against a larger dataset (700 installers and 1220 bookings), I get

Caused by: java.lang.IllegalStateException: Local Search phase started with an uninitialized Solution. First initialize the Solution. For example, run a Construction Heuristic phase first.

but right before the exception,

16:10:40,378 INFO [DefaultConstructionHeuristicPhase] [http-listener-1(4)] Construction Heuristic phase (0) ended: step total (194), time spent (30693), best score (-1hard/-688803soft).

I am using <constructionHeuristicType>FIRST_FIT_DECREASING</constructionHeuristicType> in my config.

Am I using it wrong?

4

1 回答 1

2

也许计划变量的值范围为空。特别是对于来自实体的价值范围提供者,这更有可能。在这种情况下,请随时提交错误消息应该改进的 jira。

诊断待办事项:注释掉本地求解器阶段,运行求解器(因此它只执行构造启发式),然后遍历规划实体并打印出每个规划值的值。检查那里是否有任何空值。

您的 CH 中有 194 个步骤,而不是 200 个步骤,这一事实表明了这一点。(如果其他 6 个规划实体是不动的,则不会触发此异常(更多信息),所以这不是问题。)

于 2015-02-24T09:30:37.703 回答