VRP停顿查询

问题描述 投票:0回答:1

VRP中Standstill的目的是什么?我试图理解VRP示例中的以下规则。什么是previousStandstill?

rule "distanceToPreviousStandstill"
    when
        $customer : Customer(previousStandstill != null, $distanceFromPreviousStandstill : distanceFromPreviousStandstill)
    then
        scoreHolder.addSoftConstraintMatch(kcontext, - $distanceFromPreviousStandstill);
end
optaplanner
1个回答
0
投票

previousStandstill是车辆或其他客户。

防爆。 ROUTE = VEHICLE(仓库) - >客户A - >客户B - >客户C - >客户D

CUSTOMER B的previousStandstill是CUSTOMER A.

CUSTOMER A的previousStandstill是VEHICLE

车辆位置与仓库的位置相同。

因此,此规则为路线中的所有距离添加软分数,除了从CUSTOMER D到Vehicle的最后一部分

© www.soinside.com 2019 - 2024. All rights reserved.