timnon / pyschedule

pyschedule - resource scheduling in python
Apache License 2.0
291 stars 61 forks source link

Restrict resources end time #89

Open lbhtran opened 4 years ago

lbhtran commented 4 years ago

Hi, I'm using your library to solve a shift scheduling problem. I have a few resources who work in shifts. During each shift, each resource will complete a numbers of tasks. However, I can't seem to set the problem so that if the length of the task is longer than the time remaining on the shift then the resource shouldn't start it. Right now, the bound on the resource only account for the start time. Would you able to help me on how I could simulate the following scenarios:

  1. The resources will only perform tasks within their shift. If the length of the task is longer than the remaining time on the shift, then the resource wouldn't pick it up
  2. The resources will perform tasks longer than their shift but there will be a cost associate.
snow-abstraction commented 4 years ago

To address question 1. it seems that using "Restricting Periods" or "Bounds" features explained in the README.md should do this. Probably the former feature, if I understand your problem correctly. Does this this solve 1.) for you? If not could you, create a minimal working example so there is concrete example of the issue?