Live data from Hacker News

Employee Scheduling

developers.google.com

81–90 of 137 posts

Re: Employee Scheduling

#81
post #59
post #50

I get the point is to show a problem solving technique, but I'm either missing something, or they are missing a constraint. In several solutions, a nurse works shift 2 one day, then shift 0 the next. In fact, Nurse 3 keeps getting stuck with the back to back shifts.

Are you referring to the first model? Only 5/5184 solutions are displayed. There's no objective function and the branching is probably defaulting to a simple systematic search with min domain, min value heuristic. If these are the first 5 solutions in the search tree, it's not surprising that nurse 3 keeps getting stuck with back to back shifts (does not work day 3)

They listed the constraint of no back-back shifts in the text but didn't implement it as a constraint.

Re: Employee Scheduling

#82
I have been building a employee scheduling system in a factory environment. New employees need to be trained on machines, for a certain number of shifts, with a limit of how many employees can train on a machine at a time.

A question becomes "how many new employees could we handle?".

I looked at some solutions, but landed on an Excel spreadsheet with a small macro for spreadsheet setup, conditional formatting to call out an employee being allocated to 2 positions on the same shift, and a visual way to show for each operator, how long it takes to be fully trained. HR or a manager can setup training schedules by manually allocating people to training slots.

There were some constraints the business wanted (train on machine #1 before #2, do 2 days of training if you haven't already trained on _x_ machine). They would have been hard to accommodate in a way the end user could configure, so I have a notes section they can fill in (and they have to manually observe these constraints).

Totally open to other ideas people have on how to approach the proble.

Re: Employee Scheduling

#83
post #82

I have been building a employee scheduling system in a factory environment. New employees need to be trained on machines, for a certain number of shifts, with a limit of how many employees can train on a machine at a time. A question becomes "how many new employees could we handle?". I looked at some solutions, but landed on an Excel spreadsheet with a small macro for spreadsheet setup, conditional formatting to call…

This sounds like a good solution to me. I can imagine some HN readers might comment 'ew Excel!' but it truly is the right tool for something where you have to transparently demonstrate the logic to non-technical stakeholders in a way they can easily edit and adapt.

Of course, you could build or buy a web app that handles this specific scenario more powerfully and scaleably, but if this is a quarterly problem rather than a everyday problem then the additional overhead of the different interface / logins may not be worthwhile.

My only comments would be

1) macros are too hard for nontechnical users in my experience, even just w/r/t setup (excel prompts you a security warning to enable macros that is scary). I think you could maybe do this using the what-if analysis tables, simple ifelse formulas, and conditional formatting.

2) another improvement might be a cloud-based version where there is a link at which others can easily view + collaborate, like Google Sheets or Airtable. I think Excel is supposed to have this feature as part of the 365 subscription but I've never used it.

Re: Employee Scheduling

#84
post #82

I have been building a employee scheduling system in a factory environment. New employees need to be trained on machines, for a certain number of shifts, with a limit of how many employees can train on a machine at a time. A question becomes "how many new employees could we handle?". I looked at some solutions, but landed on an Excel spreadsheet with a small macro for spreadsheet setup, conditional formatting to call…

Using Excel sounds like a pain to maintain but if it works it works.

Your problem sounds like a JSP (job shop scheduling problem). If it is you could use MiniZinc https://www.minizinc.org/ and look at Håkan Kjellstrans MiniZinc page http://www.hakank.org/minizinc/, it has a couple of different JSP models.

Re: Employee Scheduling

#87
post #81
post #59

Earlier quoted context omitted.

Are you referring to the first model? Only 5/5184 solutions are displayed. There's no objective function and the branching is probably defaulting to a simple systematic search with min domain, min value heuristic. If these are the first 5 solutions in the search tree, it's not surprising that nurse 3 keeps getting stuck with back to back shifts (does not work day 3)

They listed the constraint of no back-back shifts in the text but didn't implement it as a constraint.

By back to back, do you mean nurse 3 works shift 2 day 1 and shift 0 day 2? Or that nurse 3 always works two days in a row in the listed solutions?

The example doesn't mention back to back shifts, only that a nurse can at most work one shift a day which in turn implies the constraint that no nurse can work shifts back to back (in the same day).

One could easily add the constraint that a nurse scheduled on shift 2 cannot work shift 0 the next day.

Re: Employee Scheduling

#88
post #54

Technical solution aside: I wrote a schedule for a team of ~20 co-workers for a 24/7 support shop. This required people change shifts / sleep schedules often. The schedule was a point of contention for years. After I volunteered to write the schedules, in 3 months I had everyone happy. It was not hard.....but.... The catch was that I did it manually for a month at a time with a wide ranging amount of changing priorit…

Fascinating. Can you give some examples of the priorities you incorporated that would be hard for off-the-shelf software to digest?

Re: Employee Scheduling

#89

What is this? There's no introduction

It's an example model of how to use the or-tools CP-SAT solver to solve employee scheduling problems. It's part of the or-tools library which is a framework for solving scheduling, routing and other NP-hard discrete optimization problems https://developers.google.com/optimization/introduction/over...

Re: Employee Scheduling

#90
post #69
post #65

Earlier quoted context omitted.

https://forio.com/app/showcase/nurse-scheduling/nurses.html?... Thursday, 02:00 to 08:00 — Emergency Thursday, 08:00 to 12:00 — Oncology Thursday, 12:00 to 18:00 — Oncology Friday, 08:00 to 12:00 — Emergency

Turns out Gloria is an incredibly hard worker.

Oh angry programmers are down voting my post. People driving desks.
Post reply on HN