Throughout a highway journey we mentioned how this device was attention-grabbing however not essentially helpful. My buddy may plug in numbers and see what occurred, however that didn’t assist make staffing selections any simpler, because it was mainly educated trial and error. What could be extra useful was a system the place you might set a goal SLA for all through the day and the system would provide the finest agent schedule to match that focus on, given variable incoming name parameters and agent deal with instances. That may be a third nice pillar of OR: optimization.
The difficulty was that with optimization you wanted a system to optimize, and we had a simulation. Nonetheless, it dawned on me that there was no motive we couldn’t use the simulation as the target perform for an optimization downside. It takes a set of inputs, and with sufficient runs of the simulation, provides you a assured output. Fortunately, 30 years in the past researchers had the identical thought and have been learning the sector of Simulation Optimization ever since. These sensible folks had achieved all of the arduous work for me. [3, 4]
So, once more, I set to work. Now the core of Simulation Optimization is making a set of inputs, working it in your simulation, and selecting the following set of inputs in an clever approach till you attain your goal. My optimization downside appeared one thing like this:
My goal is to construct a schedule. Schedules are made out of shifts. Shifts are set instances all through the simulation “day” (say 9am — 5pm, 10am — 4pm) throughout which an agent can work. A schedule is the set of all shifts, with what number of brokers are engaged on every shift. An excellent schedule is one which retains the SLA hovering proper across the goal and minimizes the entire variety of employee hours (variety of staff * size of their shifts). Sure shifts have a cap with how many individuals can work (ex. solely 10 folks can work the half day morning shift) and every shift has a sure break schedule. The SLA ought to by no means cross a tough ceiling above the goal (ex. our goal is an SLA of three min however nobody ought to ever wait greater than 10 min).
I arrange the framework so all of those constraints had been accounted for, and now I used to be able to optimize. Some issues talked about in Simulation Optimization analysis are tough as a result of their simulations are black containers, which means you don’t get any helpful alerts in addition to the simulation reply. Fortunately, this simulation is completely different. We’re measuring the time-in-queue all through the simulation “day” so we will see how sure shifts do as compared to one another.
For instance, if the morning shift has extra brokers than the late shift however the late shift has extra incoming calls, we’ll probably see that the late shift is extra off track than the morning shift. In our subsequent try we should always in all probability improve the variety of folks on the late shift.
It’s not so simple as this — with sophisticated overlapping shifts and different parameters there can be interdependency, however we will plug any schedule into the simulation and see what occurs.
These alerts that we get from the simulation led me to a transparent technique, gradients.
Gradient Primarily based Search might be understood as a ball rolling down a hill, the place with each step you are attempting to get the ball to a decrease state till it reaches the underside. That is sophisticated by the truth that it’s not an excellent hill. There can be false bottoms the place any course you decide goes again up the hill, however the true backside requires you to begin rolling from a unique location. In apply, we’ll by no means know if we now have reached the true backside, however there are sensible methods to verify we do sufficient checks to know that we’re fairly shut. In our case the ball is a schedule, and the underside of the hill is the right line the place all incoming calls look forward to precisely the goal SLA.
So, what’s the most pure gradient step? Take the worst schedule (the one on common farthest away from the goal) and add an agent to the shift if the typical is above your goal, or take away an agent if the typical is beneath the goal. If you’re caught the place all shift modifications make the schedule worse however the SLA isn’t near the goal, return to a beforehand good schedule and begin from there once more. I attempted different strategies of selecting a subsequent schedule however this was probably the most constant. How are you aware when to cease? Set a tolerance to say that if each shift is on common lower than 30 seconds (for instance) from the goal, think about this solved. Cease if too many steps have been taken, and decide the perfect schedule from those simulated.
In a really perfect world we’d run this program eternally, making an attempt each single schedule till we discover the perfect, however we wanted this program to select a schedule in underneath 5 min. Essentially the most attention-grabbing a part of this mission was testing optimization algorithms to seek out the one that may get a very good answer the quickest.
The answer with the perfect outcomes used the truth that you may management the variety of instances you run a simulation, the commerce off being that the less instances you run a simulation, the much less assured you’re in its outcomes. Right here’s what I discovered to work:
Begin off with fewer simulations when starting to run the optimization algorithm, and because the goal approaches, improve the quantity. This works as a result of to start with many shift modifications will put the schedule within the course of the target, so it’s not as essential to be as assured within the course you selected. As a very good answer inches nearer, it issues extra the place the schedule goes. Mix this with layered runs all ranging from the identical null level to make sure a wider breadth of explored options.
What’s nice about this method is that I’m able to management how lengthy the algorithm runs. I can see how lengthy simulation runs take, and regulate the variety of iterations accordingly, I can even decide what number of instances I start from the beginning spot. Each machine you run this algorithm on will function a bit of in another way, and constant algorithm run time is of paramount significance to verify this mission is helpful in the actual world.
#schedule is {(start_time, end_time): num_agents}
{‘Schedule’: {(0, 540): 5,(30, 570): 2,(60, 600): 1,(90, 630): 1,(120, 660): 4,(150, 690): 1,(180, 720): 0,(210, 750): 1,(240, 780): 18,(0, 660): 0,(30, 690): 0,(60, 720): 0,(90, 750): 0,(120, 780): 3}’Common Wait’: 0.5738814985851588’Employee Models’: 660.0’Worst Shift Time In Queue, Relative to Goal’: 0.5965600329117189}