title: Dijkstra's algorithm with Time Tables and varying missing edges
body: <p>I know Dijkstra's algorithm is a popular solution for the "shortest path" problem, however it seems to be backfiring when implementing time tables.</p>
  
  <p>Say I have this graph with the following weights (time to get from one point to another):</p>
  
  <pre><code>A-----C     A-&gt;C: 10
  \--B--/     A-&gt;B: 5
              B-&gt;C: 5
  </code></pre>
  
  <p>If you throw it into Dijkstra, it'll  return route A->C. That's fine until you refer to a timetable that says route A->C only exists within a certain time frame. You could easily remove the A->C edge if the requested time frame falls outside the range when that edge is used. But obviously the data set I'm working with has a bunch of other ways to get from A->C with other, higher, costs. Not to mention what if you want to get from Z->Y which requires going from A->C in the middle. It doesn't seem like an ideal solution.</p>
  
  <p>Is there a better way, other than Dijkstra, to create a shortest path while also keeping a timetable in mind? Or should the algorithm be modified to consider two weights when finding the optimal path?</p>
  
  <p>If it matters, I'm using python.</p>
  
  <p>[edit]</p>
  
  <p>The time table is a basic table that says a train (in my case) leaves from point A at (say) 12:00 and leaves from station B at 12:05 then leaves from C at 12:10. When it doesn't stop at B, its column is empty and A will have 08:00 and C will have 08:10 </p>
  
  <pre><code>A       B        C
  800            8:10
  12:00  12:05  12:10 
  </code></pre>