This sounds like you need to create your own version of the Dijkstra algorithm. It works something like this:
- Start by assigning a tentative distance value to every node in the graph. Set the initial node's distance to 0 and all other nodes' distances to infinity. Keep a set of unvisited nodes.
- In each iteration, select the unvisited node with the smallest tentative distance. Initially, this will be the starting node.
- For the current selected node, visit each of its neighbours (nodes directly connected to it) and calculate their tentative distances from the starting node. The tentative distance is the sum of the distance from the starting node to the current node and the weight of the edge connecting the current node to its neighbour. For your version, you would add a step in here to determine whether or not the node has a left turn. In some cases you will find that the route reaches a termination as you encounter a node with no left turn.
- If the newly calculated tentative distance for a node is smaller than its current assigned distance, update the node's distance with the new smaller value. (Note, this is the traditional form of Dijkstra - in your case, I would maintain a collection of all the different node distances, and start removing from them when I encountered routes with no left turns).
- After visiting all neighbours of the current node, mark it as visited, and remove it from the set of unvisited nodes.
- Continue the process by selecting the next unvisited node with the smallest tentative distance, and repeat steps 3 to 5 until all nodes have been visited.
The algorithm terminates when all nodes have been visited, and the shortest distance from the starting node to all other nodes has been determined. At this point, the algorithm will have also computed the shortest path from the starting node to any other node in the graph taking into account your left turn constraint. It is entirely possible that you will not return any possible routes, if there are points where no left turn is possible.