Guest User

Untitled

a guest
Aug 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. // get the number of vehicles driving or waiting on segment 48 and 59
  2. var n = h.getTargetsOn([48, 59], targetList).size();
  3. // get the vehicle that waits without any job at the end of segment 59
  4. var t = h.getTargetWaitingAt(59, targetList);
  5. // create a job with 2 orders for the first vehicle if there are more than 3 vehicles on 48 and 59
  6. if (n > 3) if (t != null) h.addJob(t.id, 10, [55, 0, 0, 17, 0, 0]);
Add Comment
Please, Sign In to add comment