Workload balancing Mikko Malinen and Matti Mononen School
Workload balancing Mikko Malinen and Matti Mononen School of Computing University of Eastern Finland 13. 5. 2013
Aim To minimize traveling time of home care workers with modest constraint violations.
Input Workers on duty that day - Capabilities for the tasks (bathing, blood pressure, etc. ) - Transportation (walk, bicycle, or car) - Workshift Patients in need of caretaking that day - Requirement of a task (bathing, blood pressure, etc. ) - Time window - Location
Output Patients of that day assigned to workers worker 1 = patient location worker 3 worker 2
Example of worker data Capabilities: 011000111100000011101 workshift start time: 07: 00 workshift end time: 12: 00 work load: 100 allergies: 0000 student: 0 transport method: 2 driving_licence: 1 gender: 1
Example of visit data requirements: 0000000001000 allergies: 0000 start time: 14: 01 end time: 16: 00 duration: 30 coworker required: 0 same gender: 0 student: 0 bath: 0 cleaning: 0 location: latitude: 60. 986986184940235 longitude: 25. 685073536380834 electric_lock: 1 force preferred worker: 0 preferred_worker: 15954638 secondary_preferred: id: 3715345 id: 36541294 preferred_team_id: 3451717
Outline of the algorithm 1) Find a minimum violation solution Input: constraint violation costs constraints Output: assignment of tasks to workers 2) Decrease path time by local search, allowing some more constraint violations Input: constraint violation costs, constraints, previous solution, task locations Output: assignment of tasks to workers
Setting constraint violation cost Cost between a worker and a patient Type Example cost Requirements-capabilities 1000 = important Work shift 1 = less important Allergies 1 Student 1 Gender 1 Force preferred worker 2
Hungarian algorithm for pairing Clean bathroom Sweep floors Wash windows Jim $1 $2 $3 Steve $3 $3 $3 Alan $3 $3 $2 (Example by Wikipedia)
Getting minimum violation solution -by pairing No injection capability Worker 1 Worker 2 1000 1 Patients 1 1 X 3 1000 2 2 X 6 Worker 3 0 0 X 9 Injection needed by Hungarian algorithm, which makes a minimumweight match (pairing) between the upper and lower nodes
A feasible, minimum violation solution feasible = allowed
Path cost Path = route traveled by workers Path cost = “time” to travel, we estimate this
Local search to minimize the cost function Cost function = total violation costs + a×(path cost) User sets parameter a. Local search = making allowed swaps between points (patients) in different clusters (workers)
The optimization may be run on web http: //cs. uef. fi/o-mopsi/points/
Path cost Distance - Currently, we consider Euclidean distances - Roads are not taken into account Traveling time - Currently, we use fixed speeds for different modes of transport - Type of road is not taken into account
Distance: Euclidean vs. Street e nc a t is d an 00 m e lid m 1 c Eu 1 k Street routing 2 km 700 m
Travel time estimation Euclidean: 60 km/h 1 min Routing: 60 km/h 2. 7 min Actual 8. 0 min
Options for routing 3 rd party API - well-documented interface - no access to algorithms & data Personal solution - road network in database - algorithms for handling and routing
API vs. Personal solution Property API Personal Setting-up Very easy Pretty difficult Ease of use Easy (or difficult) Speed Fast Depends on hardware Reliability Very high Can be unreliable Dependency Yes, from the 3 rd party No Price of setting-up None Some? (working hours) Price of usage High* None Updating the data Automatic Needs to be taken care of Quality of the data High Varies Customizability None Excellent *commercial usage
API services Geocoding - Address ↔ coordinates Routing (Point A → Point B) - Distance - Traveling time - Turn-By-Turn directions Map tiles - Visual representation
Geo-coding 62. 602158 29. 774526 62. 595403 29. 742082 Länsikatu 2 Joensuu Finland Sirkkalantie 2 Joensuu Finland
Routing To: From: Länsikatu 2 Joensuu Finland Sirkkalantie 2 Joensuu Finland Totals: 2 km 700 m in 8 min Turn-by-turn: 1. Länsikatu toward Louhelankatu 240 m 2. Take the 2 nd right onto Papinkatu 800 m 3. Continue onto Rantakatu 800 m 4. Turn right onto Siltakatu 500 m 5. Turn left onto Itäranta 240 m 6. Turn left onto Sirkkalantie 60 m
Map tiles 62. 599717 29. 754474 62. 595858 29. 762768
Google. Maps Data: Proprietary (different sources) Free version: Max queries: 25 k / day Commercial usage: NO Paid version: Max queries: 100 k / day Price: $10 k+ / year
Map. Quest 1 Data: Open. Street. Map Free version: Max queries: unlimited Commercial usage: OK Paid version: Max queries: Price: -
Map. Quest 2 Data: Proprietary (different sources) Free version: Max queries: 5 k / day Commercial usage: NO Paid version: Max queries: unlimited Price: $2. 5 k+ / year
Nokia Maps Data: Proprietary (different sources) Free version: Max queries: 2. 5 k / day Commercial usage: NO Paid version: Max queries: 100 k / day Price: $18 k / year
Bing Maps Data: Proprietary (different sources) Free version: Max queries: 125 k / year Commercial usage: NO Paid version: Max queries: ? ? ? Price: ? ? ?
Cloud. Made Data: Open. Street. Map Free version: Max queries: 25 k / month Commercial usage: OK? Paid version: Max queries: unlimited Price: $400 / 10 M queries
3 rd party APIs FREE PAID Data Max. queries Commercial usage Max. queries Price Map. Quest 1 OSM Unlimited OK - - Google Maps proprietary 25 k / day NOT 100 k / day $10 k+ / year Map. Quest 2 proprietary 5 k / day NOT unlimited $2. 5 k+ / year Nokia Maps proprietary 2. 5 k / day NOT 100 k / day $18 k / year Cloud. Made OSM 25 k / month OK? unlimited $400 / 10 M queries Bing Maps proprietary 125 k / year NOT ? ? – – – 1 merging with Nokia Maps Yahoo! Maps 1
Open. Street. Map Global dataset Wiki-type, getting better all the time Varying quality - as good as Google. Maps in larger cities (Helsinki) - only main roads in country side Well-known, relatively well documented Can be used for routing Lots of mapping components implemented
Open. Street. Map Helsinki Juankoski
National Land Survey of Finland Local dataset (Finland) Data freely available and can be used without restrictions High-quality, consistent material Documentation does not exist Not good for routing
National Land Survey of Finland Helsinki Juankoski
Digiroad Local dataset (Finland) Uses NLS material but enriches it - turn restrictions - speed limits - road types Excellent for routing Price: approx. 200 €
Digiroad material
Navteq & Tele Atlas Global datasets High quality, commercial products Used by navigator manufacturers (Tom. Tom, Garmin) Licensing prices not known
- Slides: 37