mcapino / rmtrack

0 stars 2 forks source link

No such vertex in graph #2

Closed ghost closed 7 years ago

ghost commented 7 years ago

I get the following error, although the vertices exist. Is it a known issue?

I updated empty hall with a small graph and ran the following:

java -jar solver.jar -problemfile instances/empty-hall-r25/1.xml -method RMTRACK -maxtime 60000 -timestep 340 -showvis
01:44:05 [DEBUG] (TrajectoryCoordinationProblemXMLDeserializer.java:328) - The environment consist of boundary and 27 obstacles, with total 605 corners.
01:44:05 [DEBUG] (TrajectoryCoordinationProblemXMLDeserializer.java:209) - Graph (|V|=42, |E|=77) parsing took 5 ms
01:44:05 [INFO ] (Util.java:54) - Computing trajectory for robot 0 from (602, 500) to (1715, 500)
Exception in thread "main" java.lang.IllegalArgumentException: no such vertex in graph
    at org.jgrapht.graph.AbstractGraph.assertVertexExist(Unknown Source)
    at org.jgrapht.graph.AbstractBaseGraph$DirectedSpecifics.getEdgeContainer(Unknown Source)
    at org.jgrapht.graph.AbstractBaseGraph$DirectedSpecifics.incomingEdgesOf(Unknown Source)
    at org.jgrapht.graph.AbstractBaseGraph.incomingEdgesOf(Unknown Source)
    at org.jgrapht.graph.GraphDelegator.incomingEdgesOf(Unknown Source)
    at org.jgrapht.graph.EdgeReversedGraph.outgoingEdgesOf(Unknown Source)
    at org.jgrapht.alg.specifics.DirectedSpecifics.outgoingEdgesOf(DirectedSpecifics.java:27)
    at org.jgrapht.alg.AStarShortestPathSimple.findPath(AStarShortestPathSimple.java:171)
    at org.jgrapht.alg.AStarShortestPathSimple.findPath(AStarShortestPathSimple.java:103)
    at org.jgrapht.util.heuristics.PerfectHeuristic$DijkstraShortestPath.calculateDistancesToGoal(PerfectHeuristic.java:49)
    at org.jgrapht.util.heuristics.PerfectHeuristic$DijkstraShortestPath.access$000(PerfectHeuristic.java:38)
    at org.jgrapht.util.heuristics.PerfectHeuristic.getDistances(PerfectHeuristic.java:29)
    at org.jgrapht.util.heuristics.PerfectHeuristic.<init>(PerfectHeuristic.java:24)
    at cz.agents.rmtrack.util.BestResponse.computeBestResponse(BestResponse.java:68)
    at cz.agents.rmtrack.Util.solve(Util.java:55)
    at cz.agents.rmtrack.Util.findCollisionFreeTrajs(Util.java:27)
    at cz.agents.rmtrack.ScenarioCreator.solveTracking(ScenarioCreator.java:163)
    at cz.agents.rmtrack.ScenarioCreator.createFromArgs(ScenarioCreator.java:126)
    at cz.agents.rmtrack.ScenarioCreator.main(ScenarioCreator.java:47)

Contents of 1.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<multiagentproblem>
<environment>
<obstacles>
<obstacle>2862,1336 2864,1336 2867,1339 2867,1342 2865,1344 2864,1344 2863,1345 2862,1344 2861,1344 2859,1342 2859,1340 2860,1339 2860,1338 </obstacle>
<obstacle>2845,1325 2846,1324 2846,1323 2848,1321 2853,1321 2856,1318 2857,1318 2858,1317 2864,1317 2865,1318 2866,1318 2868,1320 2868,1322 2869,1323 2869,1327 2870,1328 2873,1328 2874,1329 2874,1331 2873,1332 2871,1332 2870,1331 2864,1331 2863,1332 2862,1332 2861,1331 2859,1331 2858,1330 2857,1330 2855,1328 2850,1328 2849,1329 2848,1329 2845,1326 </obstacle>
<obstacle>2197,1315 2198,1314 2198,1312 2203,1308 2206,1308 2210,1310 2214,1310 2215,1309 2219,1309 2220,1310 2234,1309 2237,1312 2237,1317 2238,1318 2238,1320 2241,1324 2241,1327 2240,1328 2234,1328 2232,1326 2229,1325 2224,1320 2220,1320 2217,1322 2210,1322 2210,1326 2208,1328 2206,1328 2204,1326 2204,1324 2198,1319 </obstacle>
<obstacle>1601,1306 1603,1308 1603,1312 1601,1314 1600,1314 1599,1315 1598,1314 1597,1314 1596,1313 1596,1312 1595,1311 1596,1310 1596,1308 1598,1306 </obstacle>
<obstacle>1279,1305 1280,1304 1280,1302 1282,1300 1283,1300 1284,1299 1288,1299 1291,1302 1296,1302 1297,1301 1302,1301 1306,1305 1311,1305 1314,1308 1314,1310 1313,1311 1309,1311 1308,1310 1500,1310 1302,1311 1297,1311 1296,1310 1291,1310 1289,1312 1284,1312 1283,1311 1282,1311 1280,1309 1280,1307 1279,1306 </obstacle>
<obstacle>1308,298 1309,299 1309,300 1310,301 1310,306 1309,307 1309,308 1305,312 1299,312 1295,308 1295,304 1296,500 1296,302 1300,298 1500,298 1304,297 1306,297 1307,298 </obstacle>
<obstacle>410,1204 410,1199 412,1197 412,1196 416,1192 417,1192 419,1190 420,1190 421,1189 430,1189 431,1190 437,1190 440,1193 440,1195 439,1196 439,1197 434,1202 432,1202 431,1203 428,1203 427,1204 426,1204 425,1205 425,1206 422,1209 414,1209 411,1206 411,1205 </obstacle>
<obstacle>404,1151 408,1148 410,1148 414,1151 418,1151 422,1149 423,1150 426,1150 428,1152 432,1152 435,1149 442,1149 443,1150 457,1150 461,1153 461,1156 458,1160 453,1162 440,1162 439,1161 437,1161 434,1158 430,1158 427,1161 422,1161 416,1157 412,1157 409,1159 405,1159 404,1158 </obstacle>
<obstacle>430,1129 433,1129 436,1132 436,1135 433,1138 430,1138 427,1135 427,1132 </obstacle>
<obstacle>460,1124 464,1124 469,1129 469,1132 467,1134 466,1134 465,1133 463,1133 462,1132 460,1132 459,1131 459,1130 458,1129 458,1126 </obstacle>
<obstacle>364,1128 364,1125 367,1121 367,1120 370,1117 370,1115 379,1106 381,1106 382,1105 385,1106 387,1109 387,1116 391,1116 394,1114 399,1114 400,1115 402,1115 404,1116 406,1119 406,1123 404,1125 389,1125 388,1124 382,1124 372,1131 367,1131 </obstacle>
<obstacle>429,1094 432,1091 435,1091 436,1090 440,1090 441,1091 443,1091 445,1092 447,1094 447,1103 455,1103 459,1105 464,1110 465,1112 465,1115 464,1117 462,1119 455,1119 448,1115 446,1115 444,1114 442,1112 442,1108 444,1106 444,1102 434,1102 432,1101 430,1098 430,1096 </obstacle>
<obstacle>381,1064 382,1065 384,1065 386,1067 386,1071 384,1073 380,1073 377,1070 377,1067 379,1065 380,1065 </obstacle>
<obstacle>407,1005 408,1006 408,1010 405,1013 404,1013 403,1014 401,1014 400,1015 399,1015 398,1014 397,1014 396,1013 396,1010 397,1009 397,1008 399,1006 400,1006 402,1004 405,1004 406,1005 </obstacle>
<obstacle>469,991 472,991 475,994 475,1000 474,1001 470,1001 468,999 468,998 467,997 467,993 </obstacle>
<obstacle>372,974 373,973 373,972 375,970 376,970 379,968 386,968 387,969 388,969 389,970 390,970 393,972 395,972 396,973 398,973 401,976 401,980 397,984 392,984 391,983 380,983 379,982 378,982 377,981 376,981 373,978 373,976 372,975 </obstacle>
<obstacle>410,970 410,966 411,965 410,954 414,950 422,950 423,951 430,951 431,950 444,950 445,951 448,951 450,952 453,955 453,959 450,962 438,962 437,961 431,961 430,962 421,962 419,963 419,968 416,972 412,972 </obstacle>
<obstacle>453,917 453,922 449,926 448,926 447,927 443,927 442,926 439,926 438,925 434,925 433,924 430,924 429,923 415,923 414,924 412,924 409,921 409,917 412,914 413,914 414,913 418,913 421,915 427,915 428,914 429,914 430,913 432,913 433,912 439,912 440,913 449,913 </obstacle>
<obstacle>384,801 385,802 386,802 388,804 388,807 385,810 381,810 380,809 380,808 379,807 379,805 382,802 383,802 </obstacle>
<obstacle>373,787 375,787 376,788 378,788 379,789 379,790 380,791 380,794 379,795 379,796 377,798 372,798 369,795 369,790 371,788 372,788 </obstacle>
<obstacle>459,757 460,756 460,755 463,752 466,752 467,753 469,753 470,754 472,754 473,755 475,755 477,757 477,760 476,761 476,762 474,764 473,764 472,765 469,765 468,766 467,766 466,767 462,767 459,764 </obstacle>
<obstacle>442,701 442,705 440,707 436,707 429,714 427,714 418,720 414,720 413,721 404,721 401,723 388,723 383,719 383,715 386,712 391,710 402,711 409,704 414,702 431,702 435,699 440,699 </obstacle>
<obstacle>389,542 393,542 395,544 395,549 394,550 389,550 387,548 387,544 </obstacle>
<obstacle>473,462 476,462 477,463 478,463 479,464 479,469 478,470 477,470 476,471 474,471 473,470 472,470 471,469 471,467 470,466 471,465 471,464 </obstacle>
<obstacle>458,429 460,429 461,430 463,430 466,433 466,434 467,435 467,439 464,442 461,442 461,446 463,448 463,450 464,451 464,457 462,459 458,459 457,458 454,457 448,451 448,450 446,448 446,446 448,444 451,444 452,443 455,443 455,439 453,436 453,434 454,433 454,432 456,430 457,430 </obstacle>
<obstacle>369,378 371,376 378,376 379,377 380,377 384,381 385,381 386,382 386,389 384,391 383,391 382,392 378,392 377,391 376,391 375,390 374,390 369,385 369,383 368,382 368,381 369,380 </obstacle>
<obstacle>417,369 416,370 416,371 414,373 408,373 408,380 407,381 407,382 405,384 398,384 397,383 396,383 391,380 389,380 388,379 388,377 387,376 387,374 388,373 388,372 394,366 398,366 399,367 400,367 403,370 407,370 407,367 409,365 410,365 411,364 412,365 415,366 </obstacle>
</obstacles>
<boundary>508,252 507,745 543,763 507,790 498,1327 934,1332 960,1226 967,1332 2309,1347 2339,1242 2550,1290 2562,1350 2639,1319 2613,1351 2899,1342 2916,280 </boundary>
</environment>
<graph>
<vertices>549,500 602,500 655,500 708,500 761,500 814,500 867,500 920,500 973,500 1026,500 1079,500 1132,500 1185,500 1238,500 1344,500 1397,500 1450,500 1503,500 1556,500 1609,500 1662,500 1715,500 1768,500 1821,500 1874,500 1927,500 1980,500 2033,500 2086,500 2139,500 2192,500 2245,500 2298,500 2351,500 2404,500 2457,500 2510,500 2563,500 2616,500 2669,500 2722,500 2775,500 </vertices>
<edges>549,500 602,500 ;602,500 549,500 ;602,500 655,500 ;655,500 602,500 ;655,500 708,500 ;708,500 655,500 ;708,500 761,500 ;761,500 814,500 ;814,500 867,500 ;867,500 814,500 ;867,500 920,500 ;920,500 867,500 ;920,500 973,500 ;973,500 920,500 ;973,500 1026,500 ;1026,500 973,500 ;1026,500 1079,500 ;1079,500 1026,500 ;1079,500 1132,500 ;1132,500 1079,500 ;1132,500 1185,500 ;1185,500 1132,500 ;1185,500 1238,500 ;1238,500 1185,500 ;1238,500 1344,500 ;1344,500 1238,500 ;1344,500 1397,500 ;1397,500 1344,500 ;1397,500 1450,500 ;1450,500 1397,500 ;1450,500 1503,500 ;1503,500 1450,500 ;1503,500 1556,500 ;1556,500 1503,500 ;1556,500 1609,500 ;1609,500 1556,500 ;1609,500 1662,500 ;1662,500 1609,500 ;1662,500 1715,500 ;1715,500 1662,500 ;1715,500 1768,500 ;1768,500 1715,500 ;1768,500 1821,500 ;1821,500 1768,500 ;1821,500 1874,500 ;1874,500 1927,500 ;1927,500 1874,500 ;1927,500 1980,500 ;1980,500 1927,500 ;1980,500 2033,500 ;2033,500 1980,500 ;2033,500 2086,500 ;2086,500 2033,500 ;2086,500 2139,500 ;2139,500 2192,500 ;2192,500 2245,500 ;2245,500 2192,500 ;2245,500 2298,500 ;2298,500 2245,500 ;2298,500 2351,500 ;2351,500 2298,500 ;2351,500 2404,500 ;2404,500 2351,500 ;2404,500 2457,500 ;2457,500 2404,500 ;2457,500 2510,500 ;2510,500 2457,500 ;2510,500 2563,500 ;2563,500 2510,500 ;2563,500 2616,500 ;2616,500 2563,500 ;2616,500 2669,500 ;2669,500 2616,500 ;2669,500 2722,500 ;2722,500 2669,500 ;2722,500 2775,500 ;2775,500 2722,500 ;</edges>
</graph>
<agents>
<agent maxspeed="0.0500" radius="20" start="602,500" target="1715,500"/>
<agent maxspeed="0.0500" radius="20" start="1662,500" target="2404,500"/>
<agent maxspeed="0.0500" radius="20" start="1344,500" target="1768,500"/>
<agent maxspeed="0.0500" radius="20" start="1079,500" target="1609,500"/>
<agent maxspeed="0.0500" radius="20" start="2351,500" target="2192,500"/>
<agent maxspeed="0.0500" radius="20" start="549,500" target="814,500"/>
<agent maxspeed="0.0500" radius="20" start="655,500" target="761,500"/>
<agent maxspeed="0.0500" radius="20" start="1503,500" target="2298,500"/>
<agent maxspeed="0.0500" radius="20" start="1821,500" target="2457,500"/>
<agent maxspeed="0.0500" radius="20" start="708,500" target="867,500"/>
</agents>
<docks/>
</multiagentproblem>
ghost commented 7 years ago

However, if I only enable the first agent, the error is not shown.

<agents>
<agent maxspeed="0.0500" radius="20" start="602,500" target="1715,500"/>
<!--<agent maxspeed="0.0500" radius="20" start="1662,500" target="2404,500"/>
<agent maxspeed="0.0500" radius="20" start="1344,500" target="1768,500"/>
<agent maxspeed="0.0500" radius="20" start="1079,500" target="1609,500"/>
<agent maxspeed="0.0500" radius="20" start="2351,500" target="2192,500"/>
<agent maxspeed="0.0500" radius="20" start="549,500" target="814,500"/>
<agent maxspeed="0.0500" radius="20" start="655,500" target="761,500"/>
<agent maxspeed="0.0500" radius="20" start="1503,500" target="2298,500"/>
<agent maxspeed="0.0500" radius="20" start="1821,500" target="2457,500"/>
<agent maxspeed="0.0500" radius="20" start="708,500" target="867,500"/>-->
</agents>
mcapino commented 7 years ago

This is most likely caused by the roadmap not containing the vertex representing the start position of a robot - each robot must start at a vertex of a graph.

ghost commented 7 years ago

The warning was misleading. The issue is with the start and target of the next agent