Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to get a Vehicle Routing Problem to work as a geoprocessing service on one of our servers.

If I call the geoprocessing service via REST url and submit depots, orders and routes WITHOUT time information, output stops are returned. As soon as I also submit time information (TimeWindowStart1 etc.), no output stops are returned.

I have tried different time formats: "10:00:00", "10:00 AM", Unix Timestamp (with and without the "), but no success.

Before I publish the service, the VRP works on my ArcGIS Desktop with times.

Our ArcGIS Server configuration: ArcGIS Server 10.1.1 with Security Patch 1, System: Red Hat Enterprise Linux 6.3, 64 bit

Here's one of the REST commands that I tried. Can anyone spot a mistake?

http://arcgisserver01.cloud.alta4.com:6080/arcgis/rest/services/koop_uni_fh_trier/TrierApp/GPServer/SolveVRP/submitJob?
orders={
 "displayFieldName": "POIs",
 "geometryType": "esriGeometryPoint",
 "spatialReference": {
  "wkid": 3857,
  "latestWkid": 3857
 },
 "features":[
 {
    "attributes":{
        "Name":"POI1", 
        "TimeWindowStart1": 1367820000,
        "TimeWindowEnd1": 1367848800,
        "MaxViolationTime1":0,
        "ServiceTime":10
    },
    "geometry":{"x":739116,"y":6404262.603}
 },
 {
    "attributes":{
        "Name":"POI2",
        "TimeWindowStart1": 1367820000,
        "TimeWindowEnd1": 1367848800,
        "MaxViolationTime1":0,
        "ServiceTime":10
    },
    "geometry":{"x":739216,"y":6404262.603}
 }
 ]
}
&routes={
 "displayFieldName": "Route",
 "features": [
 {
    "attributes":{
        "Name":"myRoute", 
        "StartDepotName":"myStartPoint", 
        "EndDepotName":"myEndPoint",
        "EarliestStartTime": 1367820000,
        "LatestStartTime": 1367820000,
        "MaxOrderCount": 30
    }
 }
 ],
 "exceededTransferLimit": false
}
&depots={
 "displayFieldName": "Start- and Endpoint",
 "geometryType": "esriGeometryPoint",
 "spatialReference": {
  "wkid": 3857,
  "latestWkid": 3857
 },
 "features": [
 {
    "attributes":{
        "Name":"myStartPoint"
    },
    "geometry":{"x":739612,"y":6404755}
 },
  {
    "attributes":{
        "Name":"myEndPoint"
    },
    "geometry":{"x":739612,"y":6404755}
 }
 ]
}
share|improve this question
    
Unless you have records with timestamps between Sat Jan 17 1970 05:57:00 GMT+1000 (EST) and Sat Jan 17 1970 05:57:28 GMT+1000 (EST), I wouldn't expect that you would get any data back. Try the bounds of (-8640000000000000, 8640000000000000) instead. –  nagytech May 12 '13 at 12:16
    
Thanks for your hint. I have tried the values that you have mentioned, but I get the same result as before. I have tried: EarliestStarttime and TimeWindowStart1 with -8640000000000000 and LatestStartTime and TimeWindowEnd1 with 8640000000000000. –  Sven May 13 '13 at 11:28
    
I wouldn't know what to say then, this problem seems fairly localized to your situation. –  nagytech May 20 '13 at 6:18

1 Answer 1

up vote 2 down vote accepted

with the rest interface it doesn't understand time in human form. It has to be in milliseconds, there's more information in the help section in your rest catalog, but specifically:

time Description: The time instant or the time extent to query.

Time instant

Syntax: time= Example: time=1199145600000 (1 Jan 2008 00:00:00 GMT)

Time extent

Syntax: time=, Example: time=1199145600000, 1230768000000 (1 Jan 2008 00:00:00 GMT to 1 Jan 2009 00:00:00 GMT) A null value specified for start time or end time will represent infinity for start or end time respectively.

share|improve this answer
    
The technical word for this is miliseconds in the Unix Epoch. –  Devdatta Tengshe Jun 21 '13 at 5:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.