private Map<Vehicle, Node> getNodes(Position position, Set<Vehicle> set) throws IllegalArgumentException {
		if (position == null || set == null) {
			throw new IllegalArgumentException();
		}
		
		// Create a HashMap if it doesn't exist.
		if (nodes.get(position) == null) {
			nodes.put(position, new HashMap<Vehicle, Node>());
		}
		
		// Get the Map and add Nodes if necessary (Map is passed by reference, so we can edit it).
		Map<Vehicle, Node> map = nodes.get(position);
		for (Vehicle v : set) {
			if (map.get(v) == null) {
				// Create the Node and store the associated Position.
				Node n = new Node();
				n.setData(position);
				map.put(v, n);
				
				// Connect this Node to all other Nodes at this Position.
				for (Map.Entry<Vehicle, Node> entry : map.entrySet()) {
					// Don't connect a Node to itself.
					if (entry.getKey() == v) {
						continue;
					}
					
					// Connect the Node both ways.
					graph.addEdge(n, entry.getValue(), entry.getKey().getCost());
					graph.addEdge(entry.getValue(), n, v.getCost());
				}
			}
			
		}
		
		return map;
	}