Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // get the number of vehicles driving or waiting on segment 48 and 59
- var n = h.getTargetsOn([48, 59], targetList).size();
- // get the vehicle that waits without any job at the end of segment 59
- var t = h.getTargetWaitingAt(59, targetList);
- // create a job with 2 orders for the first vehicle if there are more than 3 vehicles on 48 and 59
- 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