private void renderRoute(Graph g, VehicleRoute route, int routeId, long renderDelay_in_ms, Label label) {
int vehicle_edgeId = 1;
String prevIdentifier = makeId(route.getVehicle().getId(),route.getVehicle().getStartLocationId());
if(label.equals(Label.ACTIVITY) || label.equals(Label.JOB_NAME)){
Node n = g.getNode(prevIdentifier);
n.addAttribute("ui.label", "start");
}
for(TourActivity act : route.getActivities()){
Job job = ((JobActivity) act).getJob();
String currIdentifier = makeId(job.getId(),act.getLocationId());
if(label.equals(Label.ACTIVITY)){
Node actNode = g.getNode(currIdentifier);
actNode.addAttribute("ui.label", act.getName());
}
else if(label.equals(Label.JOB_NAME)){
Node actNode = g.getNode(currIdentifier);
actNode.addAttribute("ui.label", job.getName());
}
else if(label.equals(Label.ARRIVAL_TIME)){
Node actNode = g.getNode(currIdentifier);
actNode.addAttribute("ui.label", Time.parseSecondsToTime(act.getArrTime()));
}
else if(label.equals(Label.DEPARTURE_TIME)){
Node actNode = g.getNode(currIdentifier);
actNode.addAttribute("ui.label", Time.parseSecondsToTime(act.getEndTime()));
}
g.addEdge(makeEdgeId(routeId,vehicle_edgeId), prevIdentifier, currIdentifier, true);
if(act instanceof PickupActivity) g.getNode(currIdentifier).addAttribute("ui.class", "pickupInRoute");
else if (act instanceof DeliveryActivity) g.getNode(currIdentifier).addAttribute("ui.class", "deliveryInRoute");
prevIdentifier = currIdentifier;