Workload balancing Mikko Malinen and Matti Mononen School of Computing University of Eastern Finland...
-
Upload
brendan-morris -
Category
Documents
-
view
219 -
download
2
Transcript of Workload balancing Mikko Malinen and Matti Mononen School of Computing University of Eastern Finland...
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
OutputPatients of that day assigned to workers
worker 1
worker 2
worker 3
= patient location
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 datarequirements: 000000000000000001000allergies: 0000start time: 14:01end time: 16:00duration: 30coworker required: 0same gender: 0gender: 0student: 0bath: 0cleaning: 0location: latitude: 60.986986184940235 longitude: 25.685073536380834electric_lock: 1force preferred worker: 0preferred_worker: 15954638secondary_preferred: id: 3715345 id: 36541294preferred_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
Type Example cost
Requirements-capabilities 1000 = important
Work shift 1 = less important
Allergies 1
Student 1
Gender 1
Force preferred worker 2
Cost between a worker and a patient
(Example by Wikipedia)
Hungarian algorithm for pairing
Clean bathroom
Sweep floors
Wash windows
Jim $1 $2 $3
Steve $3 $3 $3
Alan $3 $3 $2
Getting minimum violation solution
Patients
Worker 1 Worker 2 Worker 3
000022
2
1000
1000100
0
1000
111
X3 X6 X9
by Hungarian algorithm, which makes a minimum-weight match (pairing) between the upper and lower nodes
2
Injection needed
No injection capability
-by pairing
A feasible, minimum violation solution
feasible = allowed
Path = route traveled by workersPath cost = “time” to travel, we
estimate this
clustersamein
and
2),( cost Path
j
iXX
ji XXtime
Path cost
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
Euclidean distance
1 km 100 m
Street routing2 km 700 m
Travel time estimation
Euclidean:60 km/h 1 min
Routing:60 km/h 2.7 minActual 8.0 min
Options for routing
3rd party API- well-documented interface- no access to algorithms & data
Personal solution- road network in database- algorithms for handling and routing
API vs. Personal solutionProperty API Personal
Setting-up Very easy Pretty difficult
Ease of use Easy Easy (or difficult)
Speed Fast Depends on hardware
Reliability Very high Can be unreliable
Dependency Yes, from the 3rd 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-codingSirkkalantie 2JoensuuFinland
62.60215829.774526
62.59540329.742082
Länsikatu 2JoensuuFinland
Routing
From: Länsikatu 2
JoensuuFinland
To: Sirkkalantie 2JoensuuFinland
Totals:2 km 700 m in 8 min
Turn-by-turn:1. Länsikatu toward Louhelankatu 240 m2. Take the 2nd right onto Papinkatu 800 m3. Continue onto Rantakatu 800 m4. Turn right onto Siltakatu 500 m5. Turn left onto Itäranta 240 m6. Turn left onto Sirkkalantie 60 m
Map tiles
62.59971729.754474
62.59585829.762768
GoogleMapsData:Proprietary (different sources)
Free version:Max queries: 25k / dayCommercial usage: NO
Paid version:Max queries: 100k / dayPrice: $10k+ / year
MapQuest 1Data:OpenStreetMap
Free version:Max queries: unlimitedCommercial usage: OK
Paid version:Max queries: -Price: -
MapQuest 2Data:Proprietary (different sources)
Free version:Max queries: 5k / dayCommercial usage: NO
Paid version:Max queries: unlimitedPrice: $2.5k+ / year
Nokia MapsData:Proprietary (different sources)
Free version:Max queries: 2.5k / dayCommercial usage: NO
Paid version:Max queries: 100k / dayPrice: $18k / year
Bing MapsData:Proprietary (different sources)
Free version:Max queries: 125k / yearCommercial usage: NO
Paid version:Max queries: ???Price: ???
CloudMadeData:OpenStreetMap
Free version:Max queries: 25k / monthCommercial usage: OK?
Paid version:Max queries: unlimitedPrice: $400 / 10M queries
3rd party APIs
FREE PAIDData Max.
queriesCommercial usage
Max. queries
Price
MapQuest 1 OSM Unlimited
OK - -
Google Maps
proprietary
25k / day NOT 100k / day
$10k+ / year
MapQuest 2 proprietary
5k / day NOT unlimited $2.5k+ / year
Nokia Maps proprietary
2.5k / day
NOT 100k / day
$18k / year
CloudMade OSM 25k / month
OK? unlimited $400 / 10M
queriesBing Maps proprietar
y125k / year
NOT ? ?
Yahoo! Maps1
– – – – –1merging with Nokia Maps
OpenStreetMap
Global dataset
Wiki-type, getting better all the time
Varying quality
- as good as GoogleMaps 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
OpenStreetMap
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
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 (TomTom, Garmin)
Licensing prices not known