AnsweredAssumed Answered

Manipulating turn waiting times with script evaluators

Question asked by RRG03CS on Aug 8, 2018
Latest reply on Aug 8, 2018 by RRG03CS

I am adding waiting times at turns by means of script evaluators (using Python), as a function of the arrival time of a fromEdge, and the departure time of a toEdge. This works fine as long as the turn is a 'real' turn, i.e. if the turn is traversed as part of a longer route. Now it happens that a turn can also be a starting point of a trip. In this case, the script evaluators  also calculate and add a 'turn waiting time' to the total route waiting time, which of course shouldn´t happen. I assume this happens because the solver considers a 'virtual' access link from the real start node to the first network node (which is the turn), so that turn waiting times are added.

My question now is the following: how can I identify in the script evaluator whether or not the turn is a starting point of a trip? If so, the waiting time shouldn´t be added.

As I have a large number of origins and destinations, a turn may serve as a start or end point of multiple routes, or just as a real turn along the shortest route between other o-d-pairs..