algorithm - Scheduling / Queuing jobs with multiple different workers -


i have stream of jobs (so don't know upfront how many jobs). , have n workers in system.

now want schedule / queue job 1 worker (a worker can have multiple jobs in queue).

however, it's not case workers can equally jobs (think delivery -- delivery people closer pickup can job better further away). there 2 costs. first cost assign job x worker y (which varies each worker -- example time worker's location pickup point) , second cost of doing job (for eg. time pickup customer location).

it's alright re assign jobs 1 worker long have not started processing job (so jobs queued can "shuffled" amongst workers).

what's away assignment of jobs workers reduce cost (or in our example, time delivery) across jobs? doesn't have optimal.

one simple solution job comes in find worker can finish job fastest (it worker working on another, initial cost little -- eg. delivering item customer , pickup next item close by). not optimal.

then periodically, try , re assign queued orders swapping jobs between pairs of workers result in faster delivery (or rather least waiting time) of jobs. how this?


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -