galojix / roster-wizard

An automatic rostering system that can handle skill mix requirements, staff requests and shift sequence rules
MIT License
37 stars 10 forks source link

Solution is INFEASIBLE #23

Closed sathyajackson closed 9 months ago

sathyajackson commented 9 months ago

Hi,

I tried exactly what you have mentioned on your video and try to generate a roster. I am ending up with the following messag.

2023-12-29 17:23:34 [2023-12-29 11:53:34,218: INFO/ForkPoolWorker-8] Solution is INFEASIBLE
2023-12-29 17:23:34 [2023-12-29 11:53:34,218: INFO/ForkPoolWorker-8] No feasible solution, raising exception...
2023-12-29 17:23:34 [2023-12-29 11:53:34,220: ERROR/ForkPoolWorker-8] Task rosters.tasks.generate_roster[fa7beb2f-e82c-4482-a513-82b1acc271f3] raised unexpected: SolutionNotFeasible('No feasible solutions.')
2023-12-29 17:23:34 Traceback (most recent call last):
2023-12-29 17:23:34   File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
2023-12-29 17:23:34     R = retval = fun(*args, **kwargs)
2023-12-29 17:23:34                  ^^^^^^^^^^^^^^^^^^^^
2023-12-29 17:23:34   File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 760, in __protected_call__
2023-12-29 17:23:34     return self.run(*args, **kwargs)
2023-12-29 17:23:34            ^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-29 17:23:34   File "/roster/rosters/tasks.py", line 15, in generate_roster
2023-12-29 17:23:34     roster.create()
2023-12-29 17:23:34   File "/roster/rosters/logic.py", line 637, in create
2023-12-29 17:23:34     self._solve_roster()
2023-12-29 17:23:34   File "/roster/rosters/logic.py", line 591, in _solve_roster
2023-12-29 17:23:34     raise SolutionNotFeasible("No feasible solutions.")
2023-12-29 17:23:34 rosters.logic.SolutionNotFeasible: No feasible solutions.

I infact tried some combination still its failing. I am trying to prepare the roster for a 24/7 shift planner with 3 routine ( morning, afternoon,night) with 3 -4 enginners per shift.

Please help.

gregcowell commented 9 months ago

First make sure you can prepare the roster manually. If you can do that successfully, then make sure you have specified the rules as intended. There are many possible reasons for there being no feasible solutions. The simplest one is having more staff available for shifts than there are actual shifts to fill in the roster. Start with a simple roster and make sure you understand what skill mix rules and shift sequences are. There are tips in the user guide about how to create a successful roster. No feasible solutions is usually a consequence of asking for a roster using criteria that make it impossible. Make sure you follow the user guide carefully. The video is just a demonstration and does not tell you everything you need to know.