构造启发式使2个变量未初始化

时间:2018-04-17 14:12:39

标签: java solver optaplanner heuristics uninitialized-constant

我正在使用时间纹理模式创建求解器。它类似于会议安排。它确实有不可移动的实体,用于支持用户的固定时间表 在启动求解器时,构造启发式结束,留下-2初始分数。终止标准是30秒。在此之后,如下面的日志中所示,解决方案在没有适当解决方案的情

我哪里错了?

19:23:25.587 [main] INFO o.o.core.impl.solver.DefaultSolver - Solving started: time spent (22), best score (-4init/0hard/0soft), environment mode (REPRODUCIBLE), random (JDK with seed 0). 19:23:25.613 [main] DEBUG o.o.c.i.c.DefaultConstructionHeuristicPhase - CH step (0), time spent (50), score (-3init/1522656532800hard/12soft), selected move count (96), picked move (com.atomiton.vopak.activities.Activity@762ef0ea {null -> TimeGrain - 95 [1524180600000]}). 19:23:25.620 [main] DEBUG o.o.c.i.c.DefaultConstructionHeuristicPhase - CH step (1), time spent (57), score (-2init/3045313098000hard/24soft), selected move count (96), picked move (com.atomiton.vopak.activities.Activity@31f9b85e {null -> TimeGrain - 95 [1524180600000]}). 19:23:25.621 [main] INFO o.o.c.i.c.DefaultConstructionHeuristicPhase - Construction Heuristic phase (0) ended: time spent (58), best score (-2init/3045313098000hard/24soft), score calculation speed (6655/sec), step total (2). 19:23:55.563 [main] DEBUG o.o.c.i.l.DefaultLocalSearchPhase - LS step (0), time spent (30000), score (-2init/3045311298000hard/24soft), best score (-2init/3045313098000hard/24soft), accepted/selected move count (0/6961207), picked move (com.atomiton.vopak.activities.Activity@76ed1b7c {TimeGrain - 95 [1524180600000] -> TimeGrain - 94 [1524178800000]}). 19:23:55.563 [main] INFO o.o.c.i.l.DefaultLocalSearchPhase - Local Search phase (1) ended: time spent (30000), best score (-2init/3045313098000hard/24soft), score calculation speed (232497/sec), step total (1). 19:23:55.564 [main] INFO o.o.core.impl.solver.DefaultSolver - Solving ended: time spent (30001), best score (-2init/3045313098000hard/24soft), score calculation speed (232038/sec), phase total (2), environment mode (REPRODUCIBLE).

1 个答案:

答案 0 :(得分:0)

Construction Heuristic phase (0) ended:
    time spent (58),
    best score (-2init/3045313098000hard/24soft),
    score calculation speed (6655/sec),
    step total (2).

2个步骤,因此只有2个实体可移动。 其余内容必须是不可移动的,包括导致-2init的内容。

PS:硬分数有问题。它溢出(使用长分变体)或它的约束符号是错误的。

CH step (1), time spent (57), score (-2init/3045313098000hard/24soft),
    selected move count (96),
    picked move (...Activity@31f9b85e {null -> TimeGrain - 95 [1524180600000]})

选择的移动似乎是一个简单的ChangeMove,因此只有一个计划变量。