简体   繁体   中英

Do you know a shortest path algorithm for weighted graphs with hard time windows on the edges and waiting allowed?

I have a weighted Graph G={V,E,ETW} where V is the node set, E the edge set and ETW is a set of edge time windows. A edge time window is a 3-Tuple (edge, starttime, endtime) with the meaning that in the intervall [starttime, endtime] the given edge is not available. The problem now is to find a shortest path from a start node to an end node in which it is allowed to wait at the nodes (to use a edge after it´s time window).

Does anybody know a algorithm for this problem? (and in the best case the paper in which the algorithm was published)

Assuming the edge values are non-negative, this is still dijkstra's algorithm. You simply have to modify it a little bit.

You have to do the following modification - if the current node v you are looking at has an outgoing edge e, that is not allowed due to the edge's time window, add the time required to get to the end of the time window form the current moment(the moment you reached node v) to the weight of the edge. otherwise the algorithm remains unchanged.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM