AnsweredAssumed Answered

[VRP] Assigning an order to a depot?

Question asked by kenson_92 on Jun 15, 2018
Latest reply on Jun 19, 2018 by HMoe-esristaff

Below is my input:

orderlat/longpickup_location_addresspickup_datepickup_time_windowdelivery_datedelivery_time_windowlat/longdelivery_addresscapacity
11.314898, 103.7643043155 Commonwealth Avenue West, Singapore07-07-201809:00-10:0007-07-201811:00-12:001.347001, 103.872794404 Serangoon Avenue 1, Singapore3
21.314898, 103.7643043155 Commonwealth Avenue West, Singapore07-07-201809:00-10:0007-07-201812:30-14:301.379894, 103.9321643 PASIR RIS DRIVE 12, Singapore2
31.314898, 103.7643043155 Commonwealth Avenue West, Singapore07-07-201809:30-10:3007-07-201815:00-17:001.326698, 103.879546629 ALJUNIED ROAD, Singapore3
41.313737, 103.90159654 Joo Chiat Place, Singapore07-07-201809:30-10:3007-07-201811:00-13:001.282814, 103.85347570 Collyer Quay, Singapore3
51.313737, 103.90159654 Joo Chiat Place, Singapore07-07-201809:30-10:3007-07-201813:00-15:001.333385, 103.839171510 Thomson Rd, Singapore 2981352
61.313737, 103.90159654 Joo Chiat Place, Singapore07-07-201809:30-10:3007-07-201815:00-17:001.373910, 103.879204941 Hougang Street 92, Singapore

3

 

 

 

How can I tell Vehicle Routing Problem that 3 orders are coming from warehouse1(1.314898, 103.764304) and another 3 orders are from warehouse2(1.313737, 103.901596). There seems to be no way to bind an order to a warehouse unless we make use of the order_pairs. Right now VRP is assuming all order is presence at warehouse2. Any other options if we wish to use multiple Depots?

 

Thanks.

 

--INPUT------------------------------------------------------------------------

// Orders
{
"features": [
{
"geometry": {
"x": 103.872794,
"y": 1.347001
},
"attributes": {
"Name": "Deliver Order 1",
"TimeWindowStart1": "1530961200000",
"TimeWindowEnd1": "1530964800000",
"MaxViolationTime1": 0,
"DeliveryQuantities": "3"
}
},
{
"geometry": {
"x": 103.932164,
"y": 1.379894
},
"attributes": {
"Name": "Deliver Order 2",
"TimeWindowStart1": "1530966600000",
"TimeWindowEnd1": "1530973800000",
"MaxViolationTime1": 0,
"DeliveryQuantities": "2"
}
},
{
"geometry": {
"x": 103.879546,
"y": 1.326698
},
"attributes": {
"Name": "Deliver Order 3",
"TimeWindowStart1": "1530975600000",
"TimeWindowEnd1": "1530982800000",
"MaxViolationTime1": 0,
"DeliveryQuantities": "3"
}
},
{
"geometry": {
"x": 103.853475,
"y": 1.282814
},
"attributes": {
"Name": "Deliver Order 4",
"TimeWindowStart1": "1530961200000",
"TimeWindowEnd1": "1530968400000",
"MaxViolationTime1": 0,
"DeliveryQuantities": "3"
}
},
{
"geometry": {
"x": 103.839171,
"y": 1.333385
},
"attributes": {
"Name": "Deliver Order 5",
"TimeWindowStart1": "1530968400000",
"TimeWindowEnd1": "1530975600000",
"MaxViolationTime1": 0,
"DeliveryQuantities": "2"
}
},
{
"geometry": {
"x": 103.879204,
"y": 1.373910
},
"attributes": {
"Name": "Deliver Order 6",
"TimeWindowStart1": "1530975600000",
"TimeWindowEnd1": "1530982800000",
"MaxViolationTime1": 0,
"DeliveryQuantities": "3"
}
}

]
}
// Depots
{
"features": [
{
"geometry": {
"x": 103.764304,
"y": 1.314898
},
"attributes": {
"Name": "Warehouse1",
"TimeWindowStart1": "1530923400000",
"TimeWindowEnd1": "1531007700000"
}
},
{
"geometry": {
"x": 103.901596,
"y": 1.313737
},
"attributes": {
"Name": "Warehouse2",
"TimeWindowStart1": "1530923400000",
"TimeWindowEnd1": "1531007700000"
}
}
]
}
// Routes
{
"features": [
{
"attributes": {
"Name": "Driver 1",
"Capacities": "10",
"StartDepotName": "Warehouse1",
"EndDepotName": "Warehouse1",
"SpecialtyNames": "Foo Test",
"EarliestStartTime": "1530954000000",
"LatestStartTime": "1530954060000",
"MaxTotalTime": 540
}
},
{
"attributes": {
"Name": "Driver 2",
"Capacities": "10",
"StartDepotName": "Warehouse1",
"EndDepotName": "Warehouse1",
"SpecialtyNames": "Foo Test",
"EarliestStartTime": "1530954000000",
"LatestStartTime": "1530954060000",
"MaxTotalTime": 540
}
},
{
"attributes": {
"Name": "Driver 3",
"Capacities": "10",
"StartDepotName": "Warehouse1",
"EndDepotName": "Warehouse1",
"SpecialtyNames": "Foo Test",
"EarliestStartTime": "1530954000000",
"LatestStartTime": "1530954060000",
"MaxTotalTime": 540
}
},
{
"attributes": {
"Name": "Driver 4",
"Capacities": "10",
"StartDepotName": "Warehouse2",
"EndDepotName": "Warehouse2",
"SpecialtyNames": "Foo Test",
"EarliestStartTime": "1530954000000",
"LatestStartTime": "1530954060000",
"MaxTotalTime": 540
}
},
{
"attributes": {
"Name": "Driver 5",
"Capacities": "10",
"StartDepotName": "Warehouse2",
"EndDepotName": "Warehouse2",
"SpecialtyNames": "Foo Test",
"EarliestStartTime": "1530954000000",
"LatestStartTime": "1530954060000",
"MaxTotalTime": 540
}
}
]
}

//Route renewals
{
"features": [
{
"attributes": {
"RouteName": "Driver 1",
"DepotName": "Warehouse1",
"ServiceTime": 15
}
},
{
"attributes": {
"RouteName": "Driver 2",
"DepotName": "Warehouse1",
"ServiceTime": 15
}
},
{
"attributes": {
"RouteName": "Driver 3",
"DepotName": "Warehouse1",
"ServiceTime": 15
}
},
{
"attributes": {
"RouteName": "Driver 4",
"DepotName": "Warehouse2",
"ServiceTime": 15
}
},
{
"attributes": {
"RouteName": "Driver 5",
"DepotName": "Warehouse2",
"ServiceTime": 15
}
}
]
}

 

 

---OUTPUT--------------------------------------------------------------------------------------
"features": [
{
"attributes": {
"ObjectID": 1,
"Name": "Deliver Order 1",
"PickupQuantities": "",
"DeliveryQuantities": "3",
"StopType": 0,
"RouteName": "Driver 4",
"Sequence": 3,
"FromPrevTravelTime": 14.568498218432069,
"FromPrevDistance": 7.5999960895595287,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1530962074110,
"DepartTime": 1530962074110,
"ArriveTimeUTC": 1530933274110,
"DepartTimeUTC": 1530933274110,
"WaitTime": 0,
"ViolationTime": 0
}
},
{
"attributes": {
"ObjectID": 2,
"Name": "Deliver Order 2",
"PickupQuantities": "",
"DeliveryQuantities": "2",
"StopType": 0,
"RouteName": "Driver 4",
"Sequence": 4,
"FromPrevTravelTime": 13.064347792416811,
"FromPrevDistance": 6.8808205874669905,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1530962857971,
"DepartTime": 1530966600000,
"ArriveTimeUTC": 1530934057971,
"DepartTimeUTC": 1530937800000,
"WaitTime": 62.36715398915112,
"ViolationTime": 0
}
},
{
"attributes": {
"ObjectID": 3,
"Name": "Deliver Order 3",
"PickupQuantities": "",
"DeliveryQuantities": "3",
"StopType": 0,
"RouteName": "Driver 4",
"Sequence": 8,
"FromPrevTravelTime": 12.730662224814296,
"FromPrevDistance": 4.5926895059833823,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1530976363840,
"DepartTime": 1530976363840,
"ArriveTimeUTC": 1530947563840,
"DepartTimeUTC": 1530947563840,
"WaitTime": 0,
"ViolationTime": 0
}
},
{
"attributes": {
"ObjectID": 4,
"Name": "Deliver Order 4",
"PickupQuantities": "",
"DeliveryQuantities": "3",
"StopType": 0,
"RouteName": "Driver 4",
"Sequence": 2,
"FromPrevTravelTime": 11.475185578688979,
"FromPrevDistance": 4.749702059431125,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1530954748511,
"DepartTime": 1530961200000,
"ArriveTimeUTC": 1530925948511,
"DepartTimeUTC": 1530932400000,
"WaitTime": 107.52481442131102,
"ViolationTime": 0
}
},
{
"attributes": {
"ObjectID": 5,
"Name": "Deliver Order 5",
"PickupQuantities": "",
"DeliveryQuantities": "2",
"StopType": 0,
"RouteName": "Driver 4",
"Sequence": 5,
"FromPrevTravelTime": 19.972407326102257,
"FromPrevDistance": 11.379289689279743,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1530967798344,
"DepartTime": 1530968400000,
"ArriveTimeUTC": 1530938998344,
"DepartTimeUTC": 1530939600000,
"WaitTime": 10.027592673897743,
"ViolationTime": 0
}
},
{
"attributes": {
"ObjectID": 6,
"Name": "Deliver Order 6",
"PickupQuantities": "",
"DeliveryQuantities": "3",
"StopType": 0,
"RouteName": "Driver 4",
"Sequence": 7,
"FromPrevTravelTime": 16.051344607025385,
"FromPrevDistance": 5.9227465212197998,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1530971041335,
"DepartTime": 1530975600000,
"ArriveTimeUTC": 1530942241335,
"DepartTimeUTC": 1530946800000,
"WaitTime": 75.977754762396216,
"ViolationTime": 0
}
},
{
"attributes": {
"ObjectID": 7,
"Name": "Warehouse2",
"PickupQuantities": "10.000000",
"DeliveryQuantities": "0.000000",
"StopType": 1,
"RouteName": "Driver 4",
"Sequence": 1,
"FromPrevTravelTime": 0,
"FromPrevDistance": 0,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1530954060000,
"DepartTime": 1530954060000,
"ArriveTimeUTC": 1530925260000,
"DepartTimeUTC": 1530925260000,
"WaitTime": 0,
"ViolationTime": 0
}
},
{
"attributes": {
"ObjectID": 8,
"Name": "Warehouse2",
"PickupQuantities": "6.000000",
"DeliveryQuantities": "0.000000",
"StopType": 1,
"RouteName": "Driver 4",
"Sequence": 6,
"FromPrevTravelTime": 12.970900630578399,
"FromPrevDistance": 5.5322542714797294,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1530969178254,
"DepartTime": 1530970078254,
"ArriveTimeUTC": 1530940378254,
"DepartTimeUTC": 1530941278254,
"WaitTime": 0,
"ViolationTime": 0
}
},
{
"attributes": {
"ObjectID": 9,
"Name": "Warehouse2",
"PickupQuantities": "0.000000",
"DeliveryQuantities": "0.000000",
"StopType": 1,
"RouteName": "Driver 4",
"Sequence": 9,
"FromPrevTravelTime": 8.8413176070898771,
"FromPrevDistance": 2.6554258066698684,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1530976894319,
"DepartTime": 1530976894319,
"ArriveTimeUTC": 1530948094319,
"DepartTimeUTC": 1530948094319,
"WaitTime": 0,
"ViolationTime": 0
}
}
],

Outcomes