0

我已经实现了 Google OR-Tools 的 VRPTW。我的时间矩阵如下

public long[,] TimeMatrix = {
               {0,5,20,10,0,5},
              {5,0,25,10,5,5},
              {20,25,0,30,20,20},
              {10,10,30,0,10,15},
              {0,5,20,10,0,5},
              {5,5,20,15,5,0}
}

时间窗口是

Depot - Time Window (8:00 AM to 6:00 PM) 
Loc1 - Time Window (2:00 PM to 3:00 PM)
Loc2 - Time Window (1:00 PM to 2:00 PM)
Loc3 - Time Window (2:00 PM to 3:00 PM)
Loc4 - Time Window (12:00 PM to 1:00 PM)
Loc5 - Time Window (3:00 PM to 4:00 PM)

几分钟后

public long[,] TimeWindows = {
               {0, 600},    // depot
              {360, 420},   // 1
              {300, 360},  // 2
              {360, 420},  // 3
              {240, 300},  // 4
              {420, 480},    // 5
            };

但它不起作用。解决方案为空。

当我像这样更改时间窗口数组时

public long[,] TimeWindows = {
              {0, 40},    // depot
              {5, 25},   // 1
              {20, 30},  // 2
              {10, 30},  // 3
              {0, 20},  // 4
              {5, 20},    // 5
    }

然后它起作用了。但我不需要这个时间窗口。

我究竟做错了什么?请提出任何解决方案?

4

0 回答 0