I am dealing with an algorithmic problem. I have a known graph algorithm with a single central node. The aim is to deliver goods from this central node to some other, specified nodes by TWO transporters. Every transporter can carry max. one unit of goods at the time, so that after each node visit they come back to the central node for the next. I should calculate the shortest time possible to do this.
My approach was to use dijkstra algorithm for central node to find the shortest paths to all other nodes considering different distances between nodes. Then for all nodes where the transporters should go (sometimes even more than once to the particular node), I doubled values, because of the distance back and forth. I divided values into two groups with the sums as close as possible each to other, because there are two transporters, and printed bigger one.
The solution, however, doesn't seem to be perfect. I need an another thing to build into it. If the first transporter knows he ends work let's say 8 units sooner, he can somewhen during delivery prepare a good for the second transporter on the way, so that he doesn't have to come for it until central node but bit less. Then their total times will be equal, but considering both shorter. This is, unfortunately, not always possible (for example only one delivery to one node etc.). I need to add this aspect to my program.