This is the shortest path problem. I've used a model where we can find the shortest path between the source and a specified destination.
The idea behind this model is that we assign a flow of 1 for the source and -1 for the destination and every other node has a flow of 0 because they're acting as transfer only.
However, I want to find the shortest path for every node in the graph from the source. It's similar to what the Dijkstra algorithm does however I want to use linear programming.
How can I adapt the model to give me the shortest path for every node in the graph from the source? Here's how the original model I used looks like.
[![graph][1]][1]
Where x12 is the arc from edge 1 to edge 2.
The basic idea would be to have all edges with a flow of -1 however when I try this it doesn't work. Any help would be appreciated. the graph used : [1]: https://i.stack.imgur.com/x8yuT.png