[VRP Bug] Does not detect TimeWindow of breaks

428
1
Jump to solution
07-10-2018 03:58 AM
MaartenHemmes
New Contributor
Dear support,
JobID: j7293e006b447483c894073b7c8eb7ed9
The error message for this job request is
{
"type": "esriJobMessageTypeWarning",
"description": "Breaks (RouteName = \"Driver 1\", Precedence = 1) does not have a time window, MaxTravelTimeBetweenBreaks value, or a MaxCumulWorkTime value specified.\nWARNING 030088: Solve returned an error, but errors were converted to warnings.\nWARNING 030092: VRP Solver failed due to invalid input.\n"
}
However, the input endpoint “/input/breaks” clearly states that we did set the time window for the breaks:
{
"paramName": "breaks",
"dataType": "GPRecordSet",
"value": {
"features": [
{
"attributes": {
"RouteName": "Driver 1",
"Precedence": 1,
"ServiceTime": 60,
"TimeWindowStart": 1530964800000,
"TimeWindowEnd": 1530964920000,
"OBJECTID": 1
}
}
],
"objectIdFieldName": "OBJECTID",
"fields": [
{
"name": "RouteName",
"alias": "RouteName",
"type": "esriFieldTypeString",
"sqlType": "sqlTypeOther"
},
{
"name": "Precedence",
"alias": "Precedence",
"type": "esriFieldTypeInteger",
"sqlType": "sqlTypeOther"
},
{
"name": "ServiceTime",
"alias": "ServiceTime",
"type": "esriFieldTypeInteger",
"sqlType": "sqlTypeOther"
},
{
"name": "TimeWindowStart",
"alias": "TimeWindowStart",
"type": "esriFieldTypeDouble",
"sqlType": "sqlTypeOther"
},
{
"name": "TimeWindowEnd",
"alias": "TimeWindowEnd",
"type": "esriFieldTypeDouble",
"sqlType": "sqlTypeOther"
},
{
"name": "OBJECTID",
"type": "esriFieldTypeOID",
"alias": "OBJECTID",
"sqlType": "sqlTypeOther"
}
]
}
}
Please kindly provide your support.
INPUT
//Orders
{"features": [{"geometry": {"x": 103.9237255, "y": 1.3123804}, "attributes": {"Name": "Deliver Order 1", "TimeWindowStart1": "1530946800000", "TimeWindowEnd1": "1530982800000", "ServiceTime": 30, "DeliveryQuantities": "0", "OBJECTID": 1}}, {"geometry": {"x": 103.8875534, "y": 1.3627151}, "attributes": {"Name": "Deliver Order 2", "TimeWindowStart1": "1530946800000", "TimeWindowEnd1": "1530982800000", "ServiceTime": 30, "DeliveryQuantities": "0", "OBJECTID": 2}}], "objectIdFieldName": "OBJECTID", "geometryType": "esriGeometryPoint", "fields": [{"name": "Name", "alias": "Name", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "TimeWindowStart1", "alias": "TimeWindowStart1", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "TimeWindowEnd1", "alias": "TimeWindowEnd1", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "ServiceTime", "alias": "ServiceTime", "type": "esriFieldTypeInteger", "sqlType": "sqlTypeOther"}, {"name": "DeliveryQuantities", "alias": "DeliveryQuantities", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "OBJECTID", "type": "esriFieldTypeOID", "alias": "OBJECTID", "sqlType": "sqlTypeOther"}]}
//Depots
{"features": [{"geometry": {"x":103.893879, "y": 1.35284}, "attributes": {"Name": "Warehouse1", "TimeWindowStart1": null, "TimeWindowEnd1": null, "OBJECTID": 1}}], "objectIdFieldName": "OBJECTID", "geometryType": "esriGeometryPoint", "fields": [{"name": "Name", "alias": "Name", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "TimeWindowStart1", "alias": "TimeWindowStart1", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "TimeWindowEnd1", "alias": "TimeWindowEnd1", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "OBJECTID", "type": "esriFieldTypeOID", "alias": "OBJECTID", "sqlType": "sqlTypeOther"}]}
//routes
{"features": [{"attributes": {"Name": "Driver 1", "Capacities": "0", "StartDepotName": "Warehouse1", "EndDepotName": "Warehouse1", "EarliestStartTime": "1530945000000", "LatestStartTime": "1530945000000", "MaxTotalTime": 750, "OBJECTID": 1}}, {"attributes": {"Name": "Driver 2", "Capacities": "0", "StartDepotName": "Warehouse1", "EndDepotName": "Warehouse1", "EarliestStartTime": "1530945000000", "LatestStartTime": "1530945000000", "MaxTotalTime": 750, "OBJECTID": 2}}, {"attributes": {"Name": "Driver 3", "Capacities": "0", "StartDepotName": "Warehouse1", "EndDepotName": "Warehouse1", "EarliestStartTime": "1530945000000", "LatestStartTime": "1530945000000", "MaxTotalTime": 750, "OBJECTID": 3}}], "objectIdFieldName": "OBJECTID", "fields": [{"name": "Name", "alias": "Name", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "Capacities", "alias": "Capacities", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "StartDepotName", "alias": "StartDepotName", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "EndDepotName", "alias": "EndDepotName", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "EarliestStartTime", "alias": "EarliestStartTime", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "LatestStartTime", "alias": "LatestStartTime", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "MaxTotalTime", "alias": "MaxTotalTime", "type": "esriFieldTypeInteger", "sqlType": "sqlTypeOther"}, {"name": "OBJECTID", "type": "esriFieldTypeOID", "alias": "OBJECTID", "sqlType": "sqlTypeOther"}]}
//default_date
1530950400000
//breaks
{"features": [{"attributes": {"RouteName": "Driver 1", "Precedence": 1, "ServiceTime": 60, "TimeWindowStart": 1530964800000.0, "TimeWindowEnd": 1530964920000.0, "OBJECTID": 1}}], "objectIdFieldName": "OBJECTID", "fields": [{"name": "RouteName", "alias": "RouteName", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "Precedence", "alias": "Precedence", "type": "esriFieldTypeInteger", "sqlType": "sqlTypeOther"}, {"name": "ServiceTime", "alias": "ServiceTime", "type": "esriFieldTypeInteger", "sqlType": "sqlTypeOther"}, {"name": "TimeWindowStart", "alias": "TimeWindowStart", "type": "esriFieldTypeDouble", "sqlType": "sqlTypeOther"}, {"name": "TimeWindowEnd", "alias": "TimeWindowEnd", "type": "esriFieldTypeDouble", "sqlType": "sqlTypeOther"}, {"name": "OBJECTID", "type": "esriFieldTypeOID", "alias": "OBJECTID", "sqlType": "sqlTypeOther"}]}
 
//excess_transit_factor
Low
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ShubhadaKshirsagar
New Contributor III

Hello Maarten,

The type of TImeWindowStart should be "esriFieldTypeDate" instead of "esriFieldTypeDouble". I was able to solve this successfully by changing the same. Please try the following JSON string for breaks.

 Do let me know if this doesn't work.

//breaks:

{"features": [{"attributes": {"RouteName": "Driver 1", "Precedence": 1, "ServiceTime": 60, "TimeWindowStart": 1530964800000.0, "TimeWindowEnd": 1530964920000.0, "OBJECTID": 1}}], "objectIdFieldName": "OBJECTID", "fields": [{"name": "RouteName", "alias": "RouteName", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "Precedence", "alias": "Precedence", "type": "esriFieldTypeInteger", "sqlType": "sqlTypeOther"}, {"name": "ServiceTime", "alias": "ServiceTime", "type": "esriFieldTypeInteger", "sqlType": "sqlTypeOther"}, {"name": "TimeWindowStart", "alias": "TimeWindowStart", "type": "esriFieldTypeDate", "sqlType": "sqlTypeOther"}, {"name": "TimeWindowEnd", "alias": "TimeWindowEnd", "type": "esriFieldTypeDate", "sqlType": "sqlTypeOther"}, {"name": "OBJECTID", "type": "esriFieldTypeOID", "alias": "OBJECTID", "sqlType": "sqlTypeOther"}]}

Thanks,

Shubhada 

View solution in original post

0 Kudos
1 Reply
ShubhadaKshirsagar
New Contributor III

Hello Maarten,

The type of TImeWindowStart should be "esriFieldTypeDate" instead of "esriFieldTypeDouble". I was able to solve this successfully by changing the same. Please try the following JSON string for breaks.

 Do let me know if this doesn't work.

//breaks:

{"features": [{"attributes": {"RouteName": "Driver 1", "Precedence": 1, "ServiceTime": 60, "TimeWindowStart": 1530964800000.0, "TimeWindowEnd": 1530964920000.0, "OBJECTID": 1}}], "objectIdFieldName": "OBJECTID", "fields": [{"name": "RouteName", "alias": "RouteName", "type": "esriFieldTypeString", "sqlType": "sqlTypeOther"}, {"name": "Precedence", "alias": "Precedence", "type": "esriFieldTypeInteger", "sqlType": "sqlTypeOther"}, {"name": "ServiceTime", "alias": "ServiceTime", "type": "esriFieldTypeInteger", "sqlType": "sqlTypeOther"}, {"name": "TimeWindowStart", "alias": "TimeWindowStart", "type": "esriFieldTypeDate", "sqlType": "sqlTypeOther"}, {"name": "TimeWindowEnd", "alias": "TimeWindowEnd", "type": "esriFieldTypeDate", "sqlType": "sqlTypeOther"}, {"name": "OBJECTID", "type": "esriFieldTypeOID", "alias": "OBJECTID", "sqlType": "sqlTypeOther"}]}

Thanks,

Shubhada 

0 Kudos