You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running simulation 'default_scenario'
java.lang.AssertionError: No path from Nt2@(3253.28,2184.33) to Nt2@(1763.40,268.05). The simulation map isn't fully connected
at movement.ShortestPathMapBasedMovement.getPath(ShortestPathMapBasedMovement.java:56)
at core.DTNHost.setNextWaypoint(DTNHost.java:417)
at core.DTNHost.move(DTNHost.java:395)
at core.World.moveHosts(World.java:214)
at core.World.update(World.java:164)
at ui.DTNSimTextUI.runSim(DTNSimTextUI.java:29)
at ui.DTNSimUI.start(DTNSimUI.java:77)
at core.DTNSim.main(DTNSim.java:98)
If removed, then the second one is eventually fired:
Running simulation 'default_scenario'
java.lang.AssertionError: Already contained a connection of t121 and t120
at report.ContactTimesReport.addConnection(ContactTimesReport.java:74)
at report.ContactTimesReport.hostsConnected(ContactTimesReport.java:56)
at core.NetworkInterface.notifyConnectionListeners(NetworkInterface.java:413)
at core.NetworkInterface.connect(NetworkInterface.java:320)
at interfaces.SimpleBroadcastInterface.connect(SimpleBroadcastInterface.java:59)
at interfaces.SimpleBroadcastInterface.update(SimpleBroadcastInterface.java:93)
at core.DTNHost.update(DTNHost.java:343)
at core.World.updateHosts(World.java:198)
at core.World.update(World.java:167)
at ui.DTNSimTextUI.runSim(DTNSimTextUI.java:29)
at ui.DTNSimUI.start(DTNSimUI.java:77)
at core.DTNSim.main(DTNSim.java:85)
Not sure why this happens, but I didn't have time to debug this.
The text was updated successfully, but these errors were encountered:
The method triggering the assertion is the following:
public Path getPath() {
Path p = new Path(generateSpeed());
MapNode to = pois.selectDestination();
List<MapNode> nodePath = pathFinder.getShortestPath(lastMapNode, to);
// this assertion should never fire if the map is checked in read phase
assert nodePath.size() > 0 : "No path from " + lastMapNode + " to " +
to + ". The simulation map isn't fully connected";
for (MapNode node : nodePath) { // create a Path from the shortest path
p.addWaypoint(node.getLocation());
}
lastMapNode = to;
return p;
}
// this assertion should never fire if the map is checked in read phase
Sincerely, I dont know what it means.
When running the default simulation with assertions enabled (
-ea
), two assertions fail:First this:
If removed, then the second one is eventually fired:
Not sure why this happens, but I didn't have time to debug this.
The text was updated successfully, but these errors were encountered: