我只是想知道为什么optaplanner会在我的数据上引发异常。是因为它的局限性吗?我的CVRP数据集包含1800个点,需要33辆车。数据集是这样的:
NAME : X-n1784-k33
COMMENT : morteza 2019
TYPE : CVRP
DIMENSION : 1784
EDGE_WEIGHT_TYPE : EUC_2D
CAPACITY : 330
NODE_COORD_SECTION
1 369 715
2 0 858
3 1 871
4 1 872
......
1783 544 625
1784 596 646
DEMAND_SECTION
1 0
2 14
3 2
......
1784 25
DEPOT_SECTION
1
-1
EOF
我以前读过this answer,但我认为这不是问题。
基于您通过电子邮件发送给我的例外情况:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Exception in inputFile (D:\Projects\POWERBI\algorithm\routing\12 - existing solutions\CVRP existing codes\x_N1784_K33_1.vrp)
...
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: The number of demands with 0 demand (55) differs from the number of depots (1).
at org.optaplanner.examples.vehiclerouting.persistence.VehicleRoutingImporter$VehicleRoutingInputBuilder.readVrpWebDepotList(VehicleRoutingImporter.java:356)
...
似乎VehicleRoutingImporter无法正确解析您的输入文件:
java.lang.IllegalStateException: The number of demands with 0 demand (55) differs from the number of depots (1).