 Hi, welcome to another OptiPlaner video. In this one, I'll be talking about employee rostering and specifically about our OptiWeb employee rostering web application. So in this application, we're going to assign shifts to employees and we're going to deal with constraints such as making sure that every employee is available when he wants to do his or her shifts and also making sure that every employee has necessary skills for the department that they're assigned to, right? So let's get started. So first of all, let's take a look at the skills, right? So here we've defined two skills, ambulatory care and critical care. Now, in this example, we actually have tenants. So this means for every department, we can have a separate or for every business, we can have a separate tenant. And you can see here in the tenants, we actually have data sets, generated data sets for a hospital but also for a factory assembly line or when you're assigning guards to shifts or when you're assigning people in the help centers to shifts, right? So in this case, we're dealing with the hospital. So let's assign these nurses and these doctors to these shifts, right? So here we have two skills already. Let me just add one skill more, which is the public relations and we'll use that in a second, public relations. So this was not in the database yet, right? So now let's take a look at the employees. Now you can see we have 98 employees and they're all named Amy in the first page but they have different last names, of course. And this is because this is generated data but you can see that depending on the employee, they have different skills. So for example, some employees like Beth Cole here has ambulatory care, others might have both skills. Here, Beth Rye has none of the skills, right? So let's look for an employee. Let's look for Flo Jones, right? So here's Flo Jones. And you see he has no skills. So what we're going to do is we're going to assign this new skill, which we just created public relationships to Flo Jones. So he's the only one who has that skill right now and that will come into account in a minute. So let's take a look at these spots or basically the locations where we need to assign these employees to, right? So we have the anesthetics departments, the cardiology department, the cardiology care and so forth. And each of these departments requires specific skills. So again, this is generated data and you can actually see that here a little bit. The anesthetics department needs the ambulatory care skill, right? So what we're going to do is we're going to create a new skill. I'm going to call it the media center, right? And I'm going to assign it the public relations skill, which is the skill we just created earlier, right? So now we have the media center, as you can see here with the public relations skill. Okay, great. So let's take a look at the shift roster, right? And these are actually the ones that were already assigned. These were already published, right? So actually, so next week, the week of two December is published as well as the week after that, which you can see here the week of ninth December, but the week after that is no longer, is not yet published. So this first, the next two weeks are actually published. We can still make changes there, but we should do those in a non-disruptive manner, right? But it's really the week after that, the week of the, let me just show you, the week of the 16th December, that we need to schedule, right? You can see here, we have created the shifts already. We just haven't assigned them yet to people. We can still create and remove shifts here. So for example, I can say, oh, the anesthetics department is going to be closed on Monday, so I can actually go here, I can click on the shift and I can actually just delete the shift, right? So now we don't have the shift here. I can create new shifts. For example, I can say on Monday, on Tuesday, because we closed the anesthetics department during the night, I expect us to have more people during the day. So let's create a shift there, and you can see I've just created a shift there, right? We'll of course need to assign these to people. So for example, to Hugh Watt or Hugh Ry, J Watt and so forth. Earlier, you saw me create the media center. So let's look for the media center here. Of course, this is a new spot, has no shifts yet. So let me create a shift here on Wednesday. Let's say the clock, all right, okay. And you can probably already guess who's going to have to do that shift because there's only one person who has the skill to work in the media center and that's Flo Jones, if you remember, right? So let's see what happens if we now tell Optopolar, please assign these. Before we, let me just do that first. I'll see that it starts assigning these, right? So right now, all of the shifts are assigned, no hard constraints are broken, no medium constraints are broken and it's still improving the soft constraints. You're probably wondering at this point, so what does hard, medium and soft constraints are? Well, the medium ones are quite simple. That's the number of undersigned shifts. So all of the shifts are assigned, which is exactly what we want, right? The hard constraints are more important is to make sure that we don't assign two people at the same spot at the same time, for example, right? So, or even at a different spot at the same time. We just want to make sure that each employee has only one shifted at the same time. Of course, you have a couple of other hard constraints, so one of them is that skill thing. So for example, you see here, Flo Jones is assigned to that media center. That's a good thing because it is Flo Jones who has the only one has the skill to actually do that job, right? But there's more hard constraints. For example, if you look at the availability roster, we can see here that we have the employees here on the left, we can see that Amy Green is not available on Thursday. You can also see she has no skill on Thursday, so that's a good thing, right? So she has no shift on Thursday, so that's a good thing. We can see that Amy Fox did not want to work on Thursday. She was available, but she didn't prefer not to work on that day. Unfortunately, we really needed somebody in the cardiology department at the time, and the best option was to assign it to Amy nonetheless, right? So you can see if we go through these and assign it during the unavailable periods, we don't assign, the shifts do not get assigned to these people. During the yellow periods, we try to avoid that, but as you can see, it sometimes does happen because it needs to be. Now you might wonder why don't we assign these anesthetic shifts to Amy Green? Probably she doesn't have the skill to do that shift, so we needed to assign it to Amy Cole nonetheless, right? Besides this, there's also another constraint going on here, and that's the fact that we cannot have two shifts on the same day. Well, in fact, we cannot have two shifts where between those two shifts, there's not a 10-hour break, right? So even if you, so if you end up with a late shift, you cannot do the morning shift the next day, and we see that here in happening, for example, between this shift and that shift, there's enough hours for this person, for Amy Cole to go home, get some sleep, and come back to work, right? So there's at least 10 hours of difference between that. Okay, so let's see how we can mess with the system, right? So let's say Amy Jones is not available on Monday, right? So now we're breaking here a hard constraint. I've just added this, all right? Now, interestingly enough, let's also see what happens, what that does to two things, because we had Amy Jones Sunday, Monday, and Tuesday working in the ear-nose department, right? So let's see what happens if you schedule this. Here we go. Currently, there's a hard constraint broken. So Optoplaner actually has to figure out how to deal with that. It might be that one hard constraint, which we saw earlier. So let's see how it deals with that. Try to move that away. And it was apparently pretty hard one because it took him longer than just a few seconds. And the interesting thing is because it moved at one shift, it probably had to move the other shift, and it's really a snowball effect that's going on in the middle of the schedule, right? We see that here too. If we now jump back to Amy Jones here, she was unavailable. She still has that ear-nose shift on Sunday, but she no longer has it on Monday, of course, but she also no longer has it on Tuesday, right? So there's a side effect there. Why is that? Probably this is now her weekend, and when she has a weekend, you need at least 48 hours off. So then you cannot say, I'm going to have a work one day, one day not, and then work another day, right? Basically, because then you don't have a 48-hour rest period. So there's a number of constraints here that play into account, and we can add more, of course, based on the business needs. Okay, so let's jump back to the shift roster. Let me show you one more thing. Here we see, for example, let's take this one. Here we see Gus Watt. Oh, yeah, of course we can move shifts, right? We can make them longer. So let me just make this shift a little bit longer, all right? No problem. I've already shown we can add shifts like here. Let's add one, all right? Okay, but what we can also do is we can pin shift. So here we see Gus Watt and Amy Poe doing these two shifts, right? Now, if you actually take the first shift and assign that to Amy Poe, let's look where Amy Poe is. Here we go. And if you actually pin that, we'll see that this happens, right? So because we do that now, Amy Poe has two shifts in a row. There's no 10 hour break between those two shifts. Of course, we are breaking hard constraints here. You can actually see that in the score to minus 22 points lost. So what we'll do right now is we'll have to figure this out. But we're telling him, okay, Optoplaner really wanted to have Amy Poe in the second shift, but we're saying we want to have her in the morning shift and we're forcing that, right? And we have control. So Optoplaner has to listen to us. So now, if we start scheduling this, you'll see that Optoplaner leaves Amy Poe in the morning shift, right? As we ordered him and he figures out to do something with the other shift to make sure that Amy Poe has those 10 hours that she needs. You can see this is now happening. We now have a schedule where all of the shifters are, there's no hard constraints broken. We still have a couple of shifts that are not assigned. As we give it a few more seconds, it finds a solution for that. And here we go. We no longer have any assigned shifts. Perfect. Okay. And if we scroll through, as you can see that, and if we go over any of these shifts, we can also see if we lose any soft points, where do we lose them? So for example, this one, we lose a couple of soft points because normally Dan Cole is not working day shifts. By default, he's working another type of shifts. Okay. Now, the next thing is, of course, okay, we're ready to publish. We have a great, perfect schedule, right? How much do we publish? Well, we publish usually per week, right? You can actually configure this, but by default, we will publish one week. So if you go back one week, right? You will see that these are all published. This week is published. This week is published. But starting from this week, we don't have, not everything is published. So the Sunday is published, but the Monday is not published yet, right? So Monday 17 is the first day that is not yet published. So now we're going to publish this, give this to the employees. They'll work out our social lives based on this information, whether or not they need to work or not. So let's do that. One thing I also want to show is that we only have two weeks of these where and then there's the proverbial end of time, right? So you can see Monday the 31st of December, there are no more shifts. When we publish, we're going to publish one week and we're also going to add one week to the end of the schedule. So we can start scheduling that, right? So let's do that right now. So let me just publish, okay? So what you see is we've now created shifts here at the end of the schedule based upon the rotation. The rotation is basically the template which we put in here. And as you can see, the rotation is that we have day, evening, night and morning shift for each of the departments, right? And we can change that per department. You can also see now if we go back to that 17th of December, let me just switch back to the 17th of December, it is now published, right? So this is the schedule which we now published. Okay, that's it. You can see we use the GAPI which created the extra shift that we added. If you go to the second part, you can see. And then of course, the second week is not yet published, right? So we published one week, the second week even though we scheduled it to make sure we did not paint ourselves in a corner in the first week, we did not publish it yet. So we can still make changes here. We can still remove, for example, the shifts, let's leave this shift. We can still create new shifts and so forth. And if you would schedule, if you put the schedule button, we'll schedule those. Okay, so this is the example. Thank you for watching. If you want to know more about this, please go to the website, optoplanner.org. And this is open source so you can download this and play with this yourself. Thanks for watching.