[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Algorithm for assignment of people to shifts? A suitableapplication?



> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I am not sure if it helps but take a look at:
> http://phpsched.sourceforge.net/. Let me know if you find it useful,
> 
> Leonid
> On Mon, 26 Feb 2001, Shaul Karl wrote:
> 


It is only complements what I was looking for. If I got it correctly your app 
expects the admin to assign people to the shifts by some way and only then 
your app goes into the scene and let people view their assignment and get rid 
of the shifts they are not interested in. Actually, the admin is probably able 
to use your app too when he assign the shifts but that still not what I was 
looking for. What I was looking for is an algorithm to help the admin assign 
the shifts in the first place so that the number of interactions between the 
users after his assignment will be minimal (provided they will not change 
their requirements during the time for which the admin had determine the 
assignments).

I had no time to further look at the pointers I got but the replies I got said 
that the problem is a truly difficult one.
It probably involves what is known in operation research as `Integer 
Programming' (which is a special case of Dynamic Programming?).
For example, suppose you have to assign 2 people into 4 shifts. Then you can 
define the 8 variables x[i,j], where i and j are integers, i denotes the 
person index (1 or 2) and j denote the shift (1 to 4). Now you can define 
x[i,j] = 1 if, and only if, person i is assigned to shift j; and 0 otherwise. 
Note that those 8 variables values are initially unknown and are only allowed 
to have integral values (actually, boolean values in this case), hence the 
Integer in the `Integer Programming'. (Programming is actually for Design or 
plan.)
You can now continue by writing the 4 equations
	x[1,1] + x[2,1] = 1  
which forces only one person to be assigned to the 1st shift,
	x[1,2] + x[2,2] = 1
to enforce only one person to the 2nd shift, and so on.
You can further write more inequalities to represent some more constraints 
(like person 1 does not interested in the 1st shift, no allocation with 2 
consecutive shifts for the same person is acceptable, fair allocation of the 
shifts and so on).
If you realize that 
	1. the number of inequalities gets tremendously large even for a small 
	   period of time and a relatively small number of people, and, more
	   important, that the number of points that one has to consider if he
	   tries a naive trial and error method gets tremendously large.      
and
	2. that continuous number methods for solving inequalities are not 
	   applicable here unless one can show that his private case can use
	   it
then you'll see that this is a difficult problem.



> > Are you able to provide pointers to where I can find an algorithm for an 
> > assignment of people to shifts? Can you point some general method in operation 
> > research that this problem fells under? Are there suitable mailing lists / 
> > news groups for this sort of question?
> > What about a suitable application?
> > 
> > The problem is what you can think of:
> > 
> > 1. There is a fixed number of people.
> > 2. They have to be assigned to shifts.
> > 3. The assignment should be as fair as possible.
> > 4. The process is a continuous one and has memory: that is, it is to be 
> > repeated after a while and the assignment for a specific period can be unfair, 
> > provided that it will be compensated during the following periods.
> > 5. There are constraints about who can be assigned to a specific shift. These 
> > constraints are not fixed. They change between the periods the algorithm is 
> > applied to. Each constraint has a severity rank, by which I mean that when 
> > there is no other choice the less severe constraints should be not full filed 
> > before the more severe ones.
> > 
> > 
> 
> - -- 
> 
> Leonid Igolnik.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.2 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQE6mtjMRrKFtN3cJpMRAqXVAKDidFEH8Ix/1UaUTCezUOCmPUoi5gCg9aFT
> 1WpPuuIK0hstrYdVI/1iZwk=
> =cSdo
> -----END PGP SIGNATURE-----
> 

-- 
	
	Shaul Karl <shaulka@bezeqint.net>



=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il