title: Gremlin: Shortest logistical route between A and B while respecting schedules + other constraints
body: <h2><strong>Preface</strong></h2>
  <ul>
  <li>I'm new to Gremlin and working through <a href="https://github.com/krlawrence/graph" rel="nofollow noreferrer">Kelvin Lawrence's awesome eBook on the topic</a> in order to solve a specific use-case.</li>
  <li>Due to the sheer amount to learn, I'm asking this question to get recommendations on how I might approach the challenge so that, as I read the eBook, I'll better know the sections to which to pay extra attention.</li>
  <li>I intend to use AWS Neptune in the pursuit of solving this, so I tagged that topic as well.</li>
  </ul>
  <p><strong>Question</strong></p>
  <blockquote>
  <p>Respecting departure/arrival times of legs + other constraints, can the shortest path (the real-world, logistical meaning
  of &quot;path&quot;) between origin and destination be &quot;queried&quot; (i.e., can I
  use the Gremlin console with a single statement)?  <em><strong>Or</strong></em> is the
  use-case of such complexity that I will effectively need to write a
  program to accomplish it?</p>
  </blockquote>
  <hr />
  <h2><strong>Use-Case / Detail</strong></h2>
  <p><strong>I hope to answer the question</strong>:</p>
  <blockquote>
  <p>Starting at <code>ORIGIN</code> on <code>DAY</code>, can I get to <code>DESTINATION</code> <em>while
  respecting</em> <code>[CONDITIONS]</code>?</p>
  </blockquote>
  <p>The good news is that I only need a true/false response (so <code>limit(1)</code>?) and a lack of a result (e.g., <code>[]</code>) suffices for &quot;no&quot;.</p>
  <p><strong>What are the conditions?</strong></p>
  <ul>
  <li><strong>Flight schedules need to be respected.</strong>  Instead of simple flight routes (i.e., a connection exists between <strong>BOS</strong>ton and <strong>DAL</strong>las), I have actual flight <em><strong>schedules</strong></em> (i.e., on Wednesday, 9 Nov 2022 at 08:40, flight XYZ will depart <strong>BOS</strong>ton and then arrive <strong>DAL</strong>las at 13:15) ... consequently, if/when there are connections, I need to respect arrival and departure times + some sort of buffer (i.e., a path for which a Traveler would arrive at 13:05 and depart on another leg at 13:06 isn't actually a valid path);</li>
  <li><strong>Aggregate travel time / cost limits.</strong>  The answer to the question needs to be &quot;No&quot; if a path's aggregate travel time or aggregate cost exceeds specified limits.  (Here, I believe I'll need to use <code>sack()</code> to track the cost - financial and time - of each leg and bail out of the <code>repeat() until</code> loop when either is hit?)</li>
  </ul>
  <p>I apologize b/c I know this isn't a good StackOverflow question, since it's not technically specific -- my hope is that, at least, some specific technical recommendations might result.</p>
  <p>The use-case seems like the varsity / pro version of the flight routes example presented in the eBook, which is perfect for someone brand-new to Gremlin ... </p>