I want to generate a route between origin and destination location using NetworKX and OSMnx.
The origin is the green dot and the black one is the destination.
My constraints are the blue circle which are locations I must pass throw their areas.
My idea was to find the shortest path between the origin to the first blue circle, from the first to the second, etc. But I don't know how to make the program decide which one will be the first blue circle.
I thought to calculate the route between each blue circle to the origin but in the case of a lot of blue circles it could be a lot of computation. Any ideas about how to choose the first one or to reconstruct the trajectory between the origin and the destination?