tew (10.10.18) - Transmission tariff calculation for ukraine, using the capac...
AACourier-30m-Industry
1. S I M U L AT I N G A N D O P T I M I S I N G A D E L I V E RY N E T W O R K O F
A U T O N O M O U S C O U R I E R A G E N T S
J A K E C R A C K N E L L – B E N G C O M P U T I N G – 2 0 1 5
S P E C I A L T H A N K S T O D R . K RY S I A B R O D A , P R O F. M A R E K S E R G O T A N D D R . T O N Y F I E L D
S O U R C E C O D E AVA I L A B L E AT G I T H U B . C O M / J A K E C R A C K N E L L
P D F O F T H E S I S AVA I L A B L E AT T I N Y. C C / C O U R I E R
2. M O T I VAT I O N
• Consumers increasingly demand same-day delivery
• Couriers are expensive
• Autonomous cars are on the horizon
• There may exist a gap in the market
3. P R O D U C T P R O P O S A L
• A distributed system of
unmanned, autonomous vehicles
• For businesses and consumers
• Jobs can ‘piggyback’ on others
• Potentially a lot cheaper
4. “I need a 50x50x30cm box picked up from SW7
2AZ and delivered to WC2R 2LS before 5pm”
+ 0 . 0 7 5 M 3
– 0 . 0 7 5 M 3
1 7 : 0 0 : 0 0
C I T Y S P R I N T: £ 1 3 . 9 5 + VAT
5.
6.
7. We have n cars with v m3 capacity
We are allowed to refuse some jobs
In some cases the sender or recipient will not be in
We want to minimise cost and jobs arriving late
8. T H E D E L I V E R A B L E S
• A multi-agent courier network simulation in
large cities with traffic
• New algorithms to efficiently fulfil jobs
(routing, planning and allocation)
• An evaluation of the sensitivity of parameters
• A feasible pricing model
10. G E O G R A P H Y
• OpenStreetMap
• Nodes and Ways
• Hash-based adjacency list
• Spatially indexed array
• Mercator map projection
11. M A P P R U N I N G
• OSM has mapping errors and
omissions
• Agents mustn’t get trapped
• Road network should be
strongly connected
• I adapted Kosarju’s algorithm
Inescapable
Inaccessible
12. R O U T E F I N D I N G
• A* Algorithm
• One can minimise:
• Distance
• Time (with or without traffic)
• Fuel (with or without traffic)
• Routes are cached
• Bounded Relaxation
13. d is the straight-line distance from a node to the destination
max_speed is the speed limit over all roads
86 km/h is the best speed for maximising fuel economy
14. Bounded relaxation speeds up a search by increasing the weight of the
admissible heuristic function.
f(n) = g(n) + (1 + ε)•h(n)
A solution is guaranteed to be no worse than (1+ε) times longer than the
optimal.
18. T R A F F I C F L O W
• HERE Maps provides live traffic
flow data via API
• For one week, samples were taken
every 5 minutes
• Difficult to integrate with OSM
• Greater London, Isle of Wight and
Las Vegas Valley
19.
20. R O A D D E L AY S
• Obstacles that make a vehicle stop
for a period of time.
• They activate at different times. Some
oscillate between time periods,
others activate using a probabilistic
model.
• Some are mapped in OSM, some are
‘unexpected delays’.
21. D I S PAT C H E R
• A centralised component
• Generates B2B, B2C, C2C and
C2C jobs
• OSM mapped businesses
• Generates size and deadline
22. O P T I M I S AT I O N
A L L O C AT I O N
P L A N N I N G
R O U T E F I N D I N G
23. T H E T R AV E L L I N G S A L E S M A N P R O B L E M
24. T H E T R AV E L L I N G S A L E S M A N P R O B L E M
265252859812191058636308480000000 possible solutions
25. T H E C O U R I E R P L A N N I N G P R O B L E M
• The travelling salesman problem with extra constraints
• Precedence – pick-ups must be visited before drop-offs
• Capacity – vehicles cannot overfill
• Deadlines – drop-offs have delivery deadlines
• Fuel – vehicle cannot run out of fuel mid-route
• Some early waypoints may be ‘locked’ in place
• Arc costs can change throughout the day
• n waypoints → n! possible solutions
26. • The goal is to minimise:
• The number of deliveries that arrive late
• The total driving cost
• Solved using
• A greedy algorithm (faster, less optimal)
• A genetic algorithm (slower, more optimal)
T H E C O U R I E R P L A N N I N G P R O B L E M
27. G E N E T I C A L G O R I T H M
1 0 1 2 A B C D E F 1 0 1 2 A B C D E F
1 0 1 4 B A C D E F
1 0 1 5 A B C E D F
1 0 1 9 A B C D F E
1 0 1 9 A C B D E F
1 7 B C A D E F
1 0 1 2 A B C D E F
1 0 1 4 B A C D E F
1 0 1 5 A B C E D F
1 0 1 5 B A D C E F
1 0 1 9 A B C D F E
1 0 1 9 A C B D E F
1 0 2 1 B A C E D F
Return top
solution
from poolx500
A nearest-neighbour route, which might not be on-time
Score
28. A D J A C E N T PA I R W I S E M U TAT I O N S
• Adjacent waypoints wi → wj can be swapped in these cases:
• They are both drop-offs or both pick-ups
• wi is a pick-up, wj is a drop-off and they are not the same job!
• wi is a drop-off, wj is a pick-up and there would be space for wj at i.
T I M E 1 2 3 4 5 6
T Y P E P I C K P I C K D R O P D R O P P I C K D R O P
J O B A B B A C C
✘✔ ✔✘ Depends
29. T H E F I T N E S S F U N C T I O N
• Cost of the route, measured in kilometres, hours or litres of fuel
• A large penalty for each late delivery
• An approximate cost function is used due to time constraints
1000*LateDeliveries + ∑ cost(r)
r ∈ Routes
30. P E R F O R M A N C E
1 1.5 2
m Route Score
0
0.5
1
1.5
2
2.5
3
3.5
4
0 0.5 1 1.5 2
GENETICRouteScore
Optimum Route Score
0
0.5
1
1.5
2
2.5
3
3.5
4
0 0.5 1 1.5 2 2.5 3 3.5 4
GENETICRouteScore
GREEDY Route Score
Greedy
Better
Genetic
Better
• 2500 problems consisting of 4 jobs (8
waypoints) were generated
• Compared to the actual optimum:
• Greedy Algorithm: +43.7% longer
• Genetic Algorithm: +34.1% longer
• Is this good enough?
31. P E R F O R M A N C E
Enumerate all solutions and you’ll typically find it in the top 0.5%.
You want a solution that minimises the number of late deliveries?
32. A L L O C AT I O N
• Jobs are statically allocated to agents using the contract net protocol
• Agents bid extra driving cost. If no agent bids, the job is refused.
• A distributed problem solver. Local optimisation performed in parallel.
33. The black agent is awarded the job, customer charged for 15 minutes
34. C N P VA R I A N T S
• A number of variants were written, which vary in flexibility
35. C N P 5
• Jobs are tentatively allocated to
agents
• If circumstances change for the
worse and 1+ jobs may arrive late:
• Enumerate all unpicked jobs;
order them by their urgency
• In sequence attempt to auction
them off to other agents
36. R E F U E L L I N G
• Agents burn fuel at different
rates, at different speeds
• If their fuel tank drops to 5%,
they postpone jobs and refuel
• Could this be done during off-
peak times?
37. I D L E S T R AT E G I E S
• What should an agent do
when it has no jobs:
• Strategic placement
• Premature refuelling
• Cost overhead of ~6%
• Typically at night
S E
F
F
F
FF
F
F
43. 0
0
10 km
6.2 mi
T H E O P T I C A L N E T W O R K S I Z E
A S S U M I N G ~ 2 0 J O B S P E R H O U R AT P E A K T I M E
2 0
4
5
9
4 7
44. C O S T C O M PA R I S O N F O R G R E AT E R L O N D O N
• Caution: Only fuel costs monitored
• Caution: Very dependent on parameters
• Break even pricing model: £2 + £2.37/hour
• Average customer paid £3.81
• £4 + £5/hour led to £5721.13/week profit
• CitySprint and Shutl prices are £10–100s
£
45. F U T U R E W O R K
• New vehicles, dispatchers and idle strategies
• Progressive planning and route finding
• Handoff/exchange at depots
• Map-specific strategies
S TA G E A * ε G E N S C O S T
I N I T 5
G R E E D Y
O N LY
3 . 2
1 2 5 0 0 2 . 7
2 1 1 0 0 0 2 . 5
3 0 . 5 1 5 0 0 2 . 4
4 0 ∞ 2 . 3
46. S U M M A RY
• Rich simulation with real maps and traffic
• Flexible route finding
• Greedy and genetic planning algorithms
• Routing and allocation strategies, namely CNP
• Idle strategies
• Extensive evaluation suggests very low costs
47. S O U R C E C O D E AVA I L A B L E AT G I T H U B . C O M / J A K E C R A C K N E L L
P D F O F T H E S I S AVA I L A B L E AT T I N Y. C C / C O U R I E R
S I M U L AT I N G A N D O P T I M I S I N G A D E L I V E RY N E T W O R K O F
A U T O N O M O U S C O U R I E R A G E N T S
J A K E C R A C K N E L L – B E N G C O M P U T I N G – 2 0 1 5
S P E C I A L T H A N K S T O D R . K RY S I A B R O D A , P R O F. M A R E K S E R G O T A N D D R . T O N Y F I E L D