public Route shortestPath(Node src)
	{
		PriorityQueue<Node> priorityQueue = new PriorityQueue<Node>();
		Route r = new Route();
		r.setDelayAtSrc(0);
		r.getArrivalTime().add(0);
		r.getRouteNodeList().add(src);
		r.setRouteTravelTime(0);
		src.setRouteUptoNode(r);
		priorityQueue.add(src);
		Node u = src;
		while(u.getNodeType() != Node.DESTINATION)
		{
			//for all adjacent vertices of u
			boolean reset = false;
			for(int index = 0;index<u.getAdjacencies().size();index++)
			{
				Node v;
				Edge edge = u.getAdjacencies().get(index);
				if(edge.getSource() == u)
				{
					//forward along the edge
					v = edge.getTarget();
					if(!v.isScanned())
					{
						if(!simpleDijkstra1(u, v, edge, priorityQueue))
						{
							reset = true;
							break;
						}
					}
				}
				else
				{
					v = edge.getSource();
					if(!v.isScanned())
					{
						if(!simpleDijkstra2(u, v, edge, priorityQueue))
						{
							reset = true;
							break;
						}
					}
				}
			}
			if(!reset)
				u.setScanned(true);
			u = priorityQueue.poll();
		}
		//got a destination node, trace the path back up to form the route.
		return u.getRouteUptoNode();
	}