Network Analyst - Intermediate Times and Distances between stops ?

620
3
11-07-2011 12:56 AM
ThomasBarthes
New Contributor
Hello,

I'm trying to solve a simple route with NAServer API, between 3 stops.

The accumulated attributes are corrects, but I can't manage to fill the intermediate ones : Attr_Minutes and Attr_Meters are always 0.

Is there something to enable on my ArcGIS server to do so ? Or something I forgot to mention in my request to the server ?


Below the response of the API :

   
ObjectID: 1
    Name: Location 1
    RouteName: 
    Sequence: 1
    TimeWindowStart: 
    TimeWindowEnd: 
    ArriveCurbApproach: 
    DepartCurbApproach: 1
    SourceID: 1
    SourceOID: 56476
    PosAlong: 0,771722850755606
    SideOfEdge: 1
    CurbApproach: 0
    Status: 0
    Attr_Minutes: 0
    Attr_Meters: 0
    Cumul_Minutes: 0
    Cumul_Meters: 0
Point:
X: 7,28989141300002
Y: 43,724367312

    ObjectID: 2
    Name: Location 2
    RouteName: 
    Sequence: 2
    TimeWindowStart: 
    TimeWindowEnd: 
    ArriveCurbApproach: 1
    DepartCurbApproach: 1
    SourceID: 1
    SourceOID: 36188
    PosAlong: 0,877433296394306
    SideOfEdge: 1
    CurbApproach: 0
    Status: 0
    Attr_Minutes: 0
    Attr_Meters: 0
    Cumul_Minutes: 0,227563170038551
    Cumul_Meters: 227,563170038551
Point:
X: 7,28773545600006
Y: 43,7256916420001

    ObjectID: 3
    Name: Location 3
    RouteName: 
    Sequence: 3
    TimeWindowStart: 
    TimeWindowEnd: 
    ArriveCurbApproach: 1
    DepartCurbApproach: 
    SourceID: 1
    SourceOID: 56465
    PosAlong: 0,635583198367719
    SideOfEdge: 1
    CurbApproach: 0
    Status: 0
    Attr_Minutes: 0
    Attr_Meters: 0
    Cumul_Minutes: 0,487040356157638
    Cumul_Meters: 487,040356157638
Point:
X: 7,28517525700005
Y: 43,727113316



Many thanks in advance,
Thomas
Tags (2)
0 Kudos
3 Replies
MichaelRice
New Contributor III
I can't manage to fill the intermediate ones : Attr_Minutes and Attr_Meters are always 0.


For clarification, do you literally mean "you" cannot set these values (e.g., during setup of your problem) or do you mean the solver does not set these values after performing your analysis?

If the latter is the case, this is because the Attr_* fields are input field values for your stops and not output field values. The accumulated costs at each stop is represented in your Cumul_Minutes and Cumul_Meters fields (as shown in your post).

Have I misunderstood your question?
0 Kudos
DmitryKudinov
Occasional Contributor
hi Thomas,

Please try specifying the Attr_Minutes and Attr_Meters on your Stop attributes, e.g.:
{
"features"  : [
{
  "geometry" : {"x" : -122.4079, "y" : 37.78356},
  "attributes" : {"Attr_Minutes" : 1, "Attr_Meters" : 2}
},
{
  "geometry" : {"x" : -122.404, "y" : 37.782},
  "attributes" : {"Attr_Minutes" : 1, "Attr_Meters" : 2}
}
]
}

For example (please note, that this particular service has different attribute names - Time and Length):  http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis/ESRI_Route_NA/NAServer/Route/solv...

thanks,
Dmitry
0 Kudos
ThomasBarthes
New Contributor
For clarification, do you literally mean "you" cannot set these values (e.g., during setup of your problem) or do you mean the solver does not set these values after performing your analysis?

If the latter is the case, this is because the Attr_* fields are input field values for your stops and not output field values. The accumulated costs at each stop is represented in your Cumul_Minutes and Cumul_Meters fields (as shown in your post).

Have I misunderstood your question?


You understood well, I meant that the solver didn't set these values. Which makes sense, thanks to your answer !

Let's take a simple example with three stops, and let's assume the solver gave me this :

Stop # 1
Cumul_Minutes : 0
Cumul_Meters : 0

Stop # 2
Cumul_Minutes : 5
Cumul_Meters : 650

Stop # 3
Cumul_Minutes : 12
Cumul_Meters : 1950

Is there any way to get directly from the solver the time and distance between Stops #2 and #3 ? (in this example 7 minutes and 1300 meters)

Or do I have to do the math myself ? (which is what i'm currently doing)


Many thanks, and please excuse my english !

Thomas
0 Kudos