# Two Scenario-Based Heuristics for Stochastic Shift Design Problem with Task-Based Demand
## 5 Conclusions  
In this paper, an original model is proposed for the shift design problem with task-based demand, and a stochastic version is given, to which a probability constraint is added according to practical needs to describe the probability that the workforce allocated by the shift plan designed can satisfy the workforce required by all tasks. In addition, this paper proposes two methods (OSH and TSH) to solve this stochastic model. OSH is a one-stage heuristic that is commonly used in factories to enhance the robustness of routing. In this paper, we enhance the robustness of the shift plan by increasing the resource occupancy time for each task. The advantage of this method is that the method is simple and easy to implement, but the disadvantage is that the resource occupancy time of all tasks is increased synchronously, which leads to the high cost of the solution. Therefore, we propose a two-stage heuristic (TSH) that combines the optimization model with a simulation method. Firstly, we find an initial shift plan and test the feasibility of the plan by a simulation method. Then, we correct the inputs of the optimization model based on the test results. And iterate the process multiple times to obtain a feasible solution that satisfies the probabilistic constraints (A9). The advantage of this method is that each iteration of the optimization is searching for the solution with the optimal cost, thus slowing down the increase in the cost of the shift plan. Further, the experimental results show that: (1) Only when the scale of scenarios used to simulate the real situation are large enough the reliability of the solution can be high enough; (2) Only when the scale of the scenarios used to calculate the expected performance of the solution reaches a certain level, the calculated performance indexes can be sufficiently accurate and stable; (3) Under relatively better parameter settings in each of the two solution methods, TSH always outperforms OSH in terms of the cost of the solution, and the running time of TSH is more stable; (4) There is a law of diminishing marginal benefit for the robustness solutions found by both methods, i.e., each enhancement in the robustness of the solution requires more additional cost, and the cost of the solution increases dramatically when the risk of pursuing the solution approaches zero. In summary, we recommend that managers use TSH to find robust shift plans and use as many scenarios as possible when finding solutions and calculating the expected metrics. Finally, managers should also be aware that pursuing a solution with an understaffing risk close to zero will significantly increase the cost of the solution. The stochastic problem considered in this paper (the randomness of the task cannot be reduced low enough before the operation date) has no way to find the optimal solution to compare the degree of merit of the solutions found by each method for the time being. The solution derived from the OSH proposed in this paper can be considered a benchmark. In addition, if the randomness of tasks can be reduced sufficiently before the operating day, the TAA proposed in this paper can be replaced by a conventional task assignment model, or even the stochastic model proposed in this paper can be directly converted into a conventional deterministic integer programming model via the sample average approximation method [30], and the corresponding optimal solution can be found by usingcommercial solvers (the sample size of the model for approximating the realistic situation may be relatively so large that the solution time of the model is unacceptable). Furthermore, the TSH proposed in this paper lacks a supervisory means to avoid the designed or modified shifts from encountering the worst-case scenario prematurely in the first stage, which has a certain probability of causing the cost of shifts to rise too fast.