I am doing a transit accessibility research project that finds the shortest-time path between an origin and destination point using a bus network. The basic network dataset configuration is similar ESRI's Paris Multimodal network tutorial, but there's a twist: it is necessary to include waiting times at a stop for the next bus in the solver's calculations. The individual's arrival time at the stop is determined by their departure time and the distance they travel, so that arrival time is a variable that must be used to calculate the wait until the next available bus by comparing it to either a fixed headway or a list of stopping times (if the times are irregular).
I attempted at first to include this constraint while building the dataset using an attribute with a VBScript evaluator, but got stuck: I can't find any command in the expression builder that will query the solver for the elapsed time at a node (the current label) in the midst of the solve.
Have I missed a way to set such a constraint up using the dataset wizard, or does the network solver function as a "black box" object with a tally that can't be queried mid-solve by any method contained in the dataset wizard or solver options? Is this a job for ArcObjects? I haven't yet located an object in the SDK help that can return the current state of the solver...Or is there a way to put this behavior together using one of the other solvers, such as the VRP, out of the box? Expert help would be appreciated here.
I am currently working on a C# custom evaluator that will reference a CSV of departure times and add a wait time, depending on the time you arrive at the location.
The way it is set up is by applying schedules to digitized turn features. When a turn is traversed, the evaluator's QueryValueAtTime method is called. The wait time until the next available departure time is returned as the cost to traverse the turn.
Unfortunately, creating this evaluator exposed a bug in 10.0, where QueryValueAtTime was never called for Turn Evaluators. We have already fixed it and it'll be in 10.0 SP3 (as well as 10.1 Beta2).
If you need something immediately, I can send you the code (email me at pstevens at esri.com). You can adapt it to work on Junctions or Edges. We feel that Turns are the best choice, but the other element types can suffice in the meantime.