vrptw optaplanner

amrnrhlw  于 2021-07-03  发布在  Java
关注(0)|答案(1)|浏览(405)

我已经在vrp问题中实现了分区搜索,效果很好。然后我尝试实现vrptw问题。初始化进程之后,previousstandstill的到达时间有时为空,并导致 ArrivalTimeUpdatingVariableListener.java 特别是什么时候 .getDepartureTime() 被称为。

Long departureTime = previousStandstill == null ? null
                : (previousStandstill instanceof TimeWindowedCustomer)
                        ? ((TimeWindowedCustomer) previousStandstill).getDepartureTime()
                        : ((TimeWindowedDepot) ((Vehicle) previousStandstill).getDepot()).getReadyTime();
15:34:47.101 [PartThread-2] DEBUG             CH step (197), time spent (8548), score (-2init/0hard/-8026964soft), selected move count (247), picked move (TimeWindowedCustomer-350 {null -> TimeWindowedCustomer-222}).
15:34:47.106 [PartThread-1] INFO          Construction Heuristic phase (0) ended: time spent (8552), best score (0hard/-8128814soft), score calculation speed (9281/sec), step total (200).
15:34:47.146 [PartThread-2] DEBUG             CH step (198), time spent (8593), score (-1init/0hard/-8124288soft), selected move count (248), picked move (TimeWindowedCustomer-164 {null -> Vehicle-51}).
15:34:47.200 [PartThread-2] DEBUG             CH step (199), time spent (8647), score (0hard/-8138330soft), selected move count (249), picked move (TimeWindowedCustomer-72 {null -> TimeWindowedCustomer-270}).
15:34:47.203 [PartThread-2] INFO          Construction Heuristic phase (0) ended: time spent (8650), best score (0hard/-8138330soft), score calculation speed (9196/sec), step total (200).
previousStandstill arrivalTime is null
previousStandstill arrivalTime is null
previousStandstill arrivalTime is null
previousStandstill arrivalTime is null
previousStandstill arrivalTime is null
previousStandstill arrivalTime is null
previousStandstill arrivalTime is null
previousStandstill arrivalTime is null
previousStandstill arrivalTime is null

有没有人遇到过和我一样的问题?谢谢你的帮助。

pxyaymoc

pxyaymoc1#

对于输入/输出模型,阴影变量应该与真正的变量同步。
例如,如果c=a+5,a是10,那么c应该是15。如果a是200,那么c应该是205。如果a为null,那么c应该为null。
尝试打开environmentmode full\ u assert,它验证此需求的输入数据。

相关问题