scheduling problems with Deap

278 views
Skip to first unread message

il...@forefrontanalytics.com.au

unread,
Aug 23, 2017, 7:05:01 AM8/23/17
to deap-users
I am wondering if there are any scheduling examples for DEAP?

I want to use a genetic algorithm to search for an optimal schedule for in-home care giving services, where there are 
- M nurses, providing 
- N patient-services, over 
- L time-slots (or shifts). 

My first issue is with representation:
I thought of creating an individual type based on a numpy array with shape (N,2).   
For example: np.array( [4,8],  [5,4] ) , represents two patient-services, where the first is performed by nurse_id "4"' in shift_id "8", and the second patient_service is performed by nurse_id "5" in shift_id "4".

There are quite a lot of hard-constraints, 
For example, 
a) a nurse can only perform one patient-service during a shift,  ( any one nurse-shift pairing [4,8] can occur only once in the individuals)
b)  each nurse must be "qualified" to perform the assigned patient service. we could maintain a 2d array "qualified", where q[i,j] =1,  means nurse i is qualified to take on patient-service j. 

And some soft constraints:
a) each patient has preferences - e.g. pref[i,j] means patient j has a preference for nurse i (3 is highest preference, 0 is lowest preference) 

To implement the  hard-constraints, I can use tools.DeltaPenalty to wrap a feasibility check over the individuals. 

However, if the individual is no good, I want to either repair it, or return the closest feasible individual. What is the most straightforward way to "repair" such a complex individual? It seems non-trivial to find a good "close" individual.
Also, would you suggest a different representation?


Thanks
 Ilana

Bobby Renecker

unread,
Jul 10, 2018, 1:49:28 AM7/10/18
to deap-users
I am wondering about this as well. Seems no one ever got around to answering/helping you.

François-Michel De Rainville

unread,
Jul 10, 2018, 5:33:06 AM7/10/18
to deap-users
There are no such example yet. The closest examine is the travelling salesman problem.

--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dženan Softić

unread,
Apr 9, 2019, 5:53:58 AM4/9/19
to deap-users
Hi Ilana,

Have you continued working on scheduling problem? It would be very helpful if you could share your learnings or examples.

Rachel

unread,
Aug 14, 2019, 1:59:11 PM8/14/19
to deap-users
Hello Ilana,

Could you find a way to represent your individual? 
I am working with similar problem, if you can show some advice it will be very helpful. 

Thanks,
Rachel
Reply all
Reply to author
Forward
0 new messages