Teaching assistance method and system for optimizing nurse scheduling
By using the OpenSolver plug-in in Excel software, the teaching problem of nurse scheduling optimization is solved, and rapid solution and teaching assistance of nurse scheduling are achieved. It is suitable for students with non-computer background and simplifies the teaching process.
Patent Information
- Application Number
- CN202010842614.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-20
- Publication Date
- 2024-10-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing technology, it is difficult to effectively teach the nurse scheduling optimization problem in a classroom environment because students need to use complex and expensive software platforms and have a foundation in high-level programming languages, resulting in inconvenient teaching.
The OpenSolver plug-in of Excel software is used to obtain nurse scheduling demand data, set decision variables and constraints, and use the plug-in to solve the objective function to obtain the optimal solution and realize the optimization of nurse scheduling.
It realizes rapid solution and teaching assistance for nurse scheduling, helps students understand integer programming models, reduces dependence on high-level language programming, is suitable for students with non-computer backgrounds, and simplifies teaching activities.
Smart Images

Figure CN112016741B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of teaching assistance technology, and in particular to a teaching assistance method and system for optimizing nurse scheduling. Background Art
[0002] The statements in this section merely mention background technology related to the present application and do not necessarily constitute prior art.
[0003] The nurse scheduling problem is an important, common and relatively complex optimization problem. This type of problem has attracted the attention of the academic community in recent years. From the perspective of teaching operations research and optimization-related courses, the nurse scheduling problem is also a representative optimization problem. Through the teaching of this type of problem, students can understand the modeling process for practical problems, master the common methods of establishing integer programming constraints, and further learn the methods of solving optimization problems.
[0004] As a complex optimization problem, solving it requires a combination of multiple software platforms and tools, such as high-level language integrated development environments, optimization solvers, modeling toolkits, and other related tools. In a classroom teaching environment, using these software combinations to teach optimization problems is somewhat inconvenient. First, most of the software is not free, and students cannot easily apply for educational versions of some software. Secondly, most of these software are based on high-level programming languages, so students need to have certain code reading and programming skills before they can solve and understand the problem. This creates certain obstacles for beginners or students without a high-level language background. In addition, the installation and configuration of related software combinations is relatively complicated, and students and teachers need to spend more energy in the configuration process, which makes it impossible to focus on the description and understanding of the problem. Summary of the invention
[0005] In order to address the deficiencies of the prior art, the present application provides a teaching auxiliary method and system for optimizing nurse scheduling; independent and lightweight teaching auxiliary tools are more suitable for use in a classroom environment.
[0006] In the first aspect, the present application provides a teaching auxiliary method for optimizing nurse scheduling;
[0007] Teaching aids for optimizing nurse scheduling include:
[0008] Obtain nurse scheduling demand data; set decision variables that need to be met for nurse scheduling based on the nurse scheduling demand data;
[0009] According to the nurse scheduling demand data, set the constraints and objective functions that need to be met for nurse scheduling;
[0010] The OpenSolver plug-in of Excel software is used to solve the objective function and obtain the optimal solution, which is the optimized nurse scheduling result.
[0011] In the second aspect, this application provides a teaching assistance system for optimizing nurse scheduling;
[0012] Nurse scheduling optimization teaching auxiliary system, including:
[0013] An acquisition module is configured to: acquire nurse scheduling demand data; and set decision variables that need to be satisfied for nurse scheduling according to the nurse scheduling demand data;
[0014] A setting module, which is configured to: set the constraints and objective functions that need to be met for nurse scheduling according to the nurse scheduling demand data;
[0015] The output module is configured to solve the objective function using the OpenSolver plug-in of Excel software to obtain the optimal solution, which is the optimized nurse scheduling result.
[0016] In a third aspect, the present application also provides an electronic device, comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory, and when the electronic device is running, the processor executes the one or more computer programs stored in the memory so that the electronic device executes the method described in the first aspect above.
[0017] In a fourth aspect, the present application further provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, completes the method described in the first aspect.
[0018] In a fifth aspect, the present application also provides a computer program (product), including a computer program, which is used to implement any method of the aforementioned first aspect when running on one or more processors.
[0019] Compared with the prior art, the beneficial effects of this application are:
[0020] This application can realize the rapid solution of the objective function of nurse scheduling and realize the rapid scheduling of personnel; at the same time, it can also assist teaching and assist teachers in realizing the teaching work of optimizing nurse scheduling.
[0021] This application can reasonably solve the balance among the number of personnel, nursing work quality and staff needs, maximize benefits and realize intelligent scheduling.
[0022] The auxiliary tool established in this application provides an idea and method for using spreadsheets to present and solve integer programming models in a teaching environment. With the free Excel plug-in OpenSolver, this tool can not only present the modeling process more clearly, but also be used as a solver to solve actual-scale problem instances. From the feedback results, it can be seen that students can accept and affirm its related teaching methods. This method does not rely on complex optimization software platforms and software packages, and does not require high-level language programming skills. Therefore, it is conducive to the development of teaching activities and the teaching of relevant knowledge for students without computer backgrounds or beginners who do not yet have high-level language programming. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings in the specification, which constitute a part of the present application, are used to provide further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.
[0024] Figure 1 The OpenSolver operation interface of the first embodiment;
[0025] Figure 2 It is the main interface of the teaching auxiliary tool of the first embodiment;
[0026] Figure 3 This is an example of constructing the shift demand constraint of the first embodiment;
[0027] Figure 4 This is an example of a personnel demand constraint area of the first embodiment;
[0028] Figure 5 The model of the first embodiment is highlighted after it is built. DETAILED DESCRIPTION
[0029] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0030] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0032] Embodiment 1
[0033] This embodiment provides a teaching auxiliary method for optimizing nurse scheduling;
[0034] Teaching aids for optimizing nurse scheduling include:
[0035] S101: Obtain nurse scheduling demand data; set decision variables that need to be met for nurse scheduling according to the nurse scheduling demand data;
[0036] S102: according to the nurse scheduling demand data, set the constraints and objective function that the nurse scheduling needs to meet;
[0037] S103: Using the OpenSolver plug-in of Excel software, the objective function is solved to obtain an optimal solution, which is the optimized nurse scheduling result.
[0038] As one or more embodiments, the S101: obtaining nurse scheduling demand data; wherein the nurse scheduling demand data includes: the number of different shifts required each day, for example, 3 day shift staff, 1 evening shift staff, and 1 night shift staff are required on a certain day. jk The specific number of
[0039] As one or more embodiments, the S101: setting decision variables that need to be satisfied for nurse scheduling according to nurse scheduling demand data; the specific steps include:
[0040] Assume that a time period includes several days, and the work unit assigns different shifts to different nurses within a day; I = {1, 2, ..., |I|} represents the set of nurses; K = {1, 2, ..., |K|} represents the set of shifts; J = {1, 2, ..., |J|} represents the set of days; then the decision variable x ijk The definition is as follows:
[0041]
[0042] As one or more embodiments, the S102: setting the constraints and objective function that need to be satisfied by nurse scheduling according to the nurse scheduling demand data; the specific steps include:
[0043] Objective Function
[0044] Constraints
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051] Among them, constraints (2)-(4) are hard constraints, and (5)-(6) are soft constraints; constraint (2) requires that for a certain day in the total time period, the shifts assigned to all nurses must meet the shift requirements of the day. Constraint (3) ensures that a nurse can only be assigned one shift on a certain day. Constraint (4) describes that when a nurse is assigned to the night shift, she needs to be assigned to rest on the next day. Constraint (5) ensures that the number of working days of a nurse in the total time period cannot exceed the upper limit of work. The constraint is constructed into a soft constraint using slack variables. The principle of constraint (6) is the same as (5), ensuring that the number of night shift days does not exceed the upper limit as much as possible. Constraint (7) is the domain of the decision variable, and (8) is the domain of the slack variable.
[0052] I represents the subscript set of nurses: I = {1, 2, ..., 5}, |I| = 5; the subscript of a nurse is represented by i;
[0053] K represents the subscript set of shifts: K = {1 (day shift), 2 (evening shift), 3 (night shift), 4 (rest)}; the subscript of a shift is represented by k;
[0054] J represents a set of time subscript units; here the time unit is day, and the total time period is two weeks: J = {1,2,…,14}, |J| = 14; the subscript of a certain day is represented by j.
[0055] d jk It represents the number of shifts k required on day j, i.e. the shift demand on a certain day;
[0056] w max Indicates the upper limit of the total number of working days for a nurse in the total time period: w max =10;
[0057] n max Indicates the upper limit of the total number of night shifts for a nurse in the total time period: n max =3;
[0058] s i Indicates that nurse i exceeds the total number of nurse working days w max number of working days;
[0059] t i Indicates that nurse i exceeds the total number of night shift days for nurses w max Number of night shifts;
[0060] x ij3 represents the decision variable of nurse i working night shift at time j. If it is 1, it means the nurse is working, otherwise it means the nurse is not working. i(j+1)4 The decision variable representing whether nurse i takes a rest at time j+1. If it is 1, it means he is taking a rest; otherwise, it means he is not taking a rest. It means that if x ij3 is 1, that is, if you work the night shift at time j, you must rest the next day, that is, x i(j+1)4 must also be 1. If x ij3 is 0, then x i(j+1)4 It doesn't matter.
[0061] As one or more embodiments, the step S103: using the OpenSolver plug-in of Excel software to solve the objective function and obtain the optimal solution, which is the optimized nurse scheduling result; the specific steps include:
[0062] In the OpenSolver plug-in of Excel software, set the decision variables, objective function and constraints;
[0063] In the OpenSolver toolbar of Excel software, use the Solve unit to solve the objective function and obtain the optimal solution, which is the optimized nurse scheduling result.
[0064] The Choose function and Match function are used in combination with the judgment of decision variables to fill in the shift schedule.
[0065] Schedule in Figure 2 (or Figure 5 ) is the place to display the results. For example, in cell E40, fill in the function "=CHOOSE(MATCH(1,E6:E9,0),"D","L","N","")" to check E6:E9 (where the decision variable x is placed). ijk If the first of these three cells is 1, then through the choose function, D will be displayed in E40, the cell where the formula is entered. In this way, the decision variable can be converted into the name of the shift. The same applies to other cells.
[0066] In order to establish a simple and independent teaching auxiliary tool in the teaching environment, this study established a model display and solution tool for the nurse scheduling problem based on the Excel platform and OpenSolver plug-in. The tool mainly includes the display interface of the problem modeling and solution. Teachers can use this tool to show students the structure and modeling process of the problem more clearly. Students can use the ideas and methods provided by the tool to build their own models. The tool contains a specific scheduling problem from real life and can solve large-scale problem examples. The tool has been used in the optimization-related courses of this unit. Feedback results show that the tool can help students better learn and understand the knowledge related to scheduling optimization.
[0067] As a commonly used spreadsheet calculation and statistical software, Microsoft Excel can not only be used as a multifunctional table presentation and calculation tool, but also has begun to play an important role in classroom teaching environments in recent years. More and more educators use spreadsheet software as a lightweight computing platform to assist in teaching. There are few related studies in China, mainly including Ding Yizhong's exploration of the advantages of Spreadsheet teaching method using the problem of rushing work as an example. As a supplement to this field and to solve the problem of teaching assistance in this unit, this study designed a software tool for nurse scheduling optimization based on spreadsheets. This tool can be used as a solver for practical problems, and can also display the model and modeling process of optimization problems. This tool is implemented using Microsoft Excel 2016 and OpenSolver 2.9.0.
[0068] Description and decision variables of the scheduling problem:
[0069] There are many forms of scheduling problems, and they vary according to different situations. As a teaching tool, considering the generality and specificity of the problem, this tool uses a relatively simple but highly extensible problem to demonstrate. When students are familiar with the model, they can use similar models to describe more complex problems.
[0070] Assume that a time period includes multiple days, and the work unit needs to assign different shifts to different nurses within a day. This problem can be used to describe a large class of problems, such as nurse scheduling problems, call center scheduling problems, or other types of multi-shift scheduling problems.
[0071] Let I = {1,2,…,|I|} represent the set of nurses; K = {1,2,…,|K|} represent the set of shifts; J = {1,2,…,|J|} represents the set of days (other time units can also be used in other problems, such as hours or weeks). Then the decision variable xijk can be defined as follows:
[0072]
[0073] Most nurse scheduling problems have soft constraints and hard constraints. In the optimization process, soft constraints include some preferences from the unit and the nurses, which need to be satisfied as much as possible; while hard constraints come from some resource limitations and hard requirements, which must be satisfied, otherwise the solution is infeasible. The modeling of nurse scheduling problems is based on different soft and hard constraints.
[0074] The specific model of this problem is introduced below, including constraints and objective function.
[0075] Since specific problem examples are usually required in class, the parameters of the problem use fixed values; teachers and students can make corresponding changes to teach the problem examples they need. The symbols used in the model are as follows:
[0076] The subscript set of nurse I: I = {1, 2, ..., 5}, |I| = 5;
[0077] The subscript set of K shifts: K = {1 (day shift), 2 (evening shift), 3 (night shift), 4 (rest)};
[0078] J is a set of time subscript units; here the time unit is day, and the total time period is two weeks: J = {1, 2, ..., 14}, |J| = 14;
[0079] d ji The number of shifts k required on day j, i.e. the number of shifts required on a particular day (the specific value is set in the table);
[0080] w max The upper limit of the total number of working days for a nurse in the total time period: w max =10;
[0081] n max The upper limit of the total number of night shifts for a nurse in the total time period: n max =3;
[0082] The mathematical optimization model of the problem is defined as follows:
[0083] Objective Function
[0084] Constraints
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091] Constraints (2-4) in the model are hard constraints, and (5-6) are soft constraints. Constraint (2) requires that for a certain day in the total time period, the shifts assigned to all nurses must meet the shift requirements of the day. Constraint (3) ensures that a nurse can only be assigned one shift on a certain day. Constraint (4) describes that when a nurse is assigned to the night shift, she needs to be assigned to rest on the next day. Constraint (5) ensures that the number of working days for a nurse in the total time period cannot exceed the upper limit of work. Here, slack variables are used to construct this constraint into a soft constraint. The principle of constraint (6) is the same as (5), ensuring that the number of night shift days does not exceed the upper limit as much as possible. Constraints (7-8) are the domains of decision variables and slack variables.
[0092] Note that the slack variable s i (and t i ) describes the difference between the actual number of working days (night shift) of a nurse and the upper limit of the stipulated number of working days (night shift). Therefore, the objective function of the model is defined as minimizing the values of these two variables, that is, the definition of objective function (1).
[0093] Although Excel has a built-in linear programming solver, the full version of the solver is not free. The trial version has variable restrictions (no more than 200 variable cells), which cannot solve slightly larger problems or problems with exponential constraints. For the problem described in the previous section, the number of main decision variables xijk alone is 280, so it is impossible to use the built-in linear optimization solver to solve it.
[0094] This software uses the OpenSolver toolbox to replace the default solver to model and solve the scheduling problem. This tool is an Excel third-party plug-in based on an open source solver engine. The plug-in is open source, free and easy to install, so it is more suitable for displaying and solving optimization problems based on Excel. Since the solver engine it uses is also free, there is no limit on variables in theory. Figure 1 This is the main operation interface of the plug-in. The structure of this interface is similar to the default solver structure of Excel. In the box indicated by the diagram, you can add the corresponding cell address to set the objective function, decision variables and constraints of the model. Any student with basic knowledge of linear programming can quickly become familiar with the use of this plug-in interface.
[0095] The auxiliary tool interface established in this study is as follows Figure 2 shown.
[0096] In order to facilitate the construction of constraints, in this area ( Figure 2 The upper right part, that is, the cell set with borders below the title "Upper limit of working days and night shift days", needs to store the corresponding expression cells. Figure 2 In the region, the row where sum(k) is located is the row where x is when j takes a certain value. ijk The variable is based on the sum of the subscript k, that is, the sum of all the shifts of a nurse on a certain day. This expression can be expressed by the function formula provided by Excel. This cell is used to construct constraint (3) in the model, that is, a nurse can only be assigned to one shift on a certain day. Figure 3 An example of this constraint construction is shown.
[0097] Figure 3 In the example, cells "D3" to "D6" are the values of the decision variables when j=1. When constructing a model, OpenSolver can highlight the added area. The content of cell "D7" is "=SUM(D3:D6)", that is, the value of the blue box cell is the sum of the pink cell values. In the OpenSolver interface, you can set cell "D7" equal to 1.
[0098] Other constraints are similar and are described using expression cells. For example Figure 2 Below the decision variables is the personnel demand area. Figure 4 is a partial screenshot of this area. In the figure, rows 23, 34, and 36 are the demand values for a certain shift k on a certain day, marked with req. Here we use D to represent the day shift, L to represent the evening shift, and N to represent the night shift. Figure 4 As shown in column E, the staff requirement for the day shift is 2. Rows 33, 35, and 37 calculate the sum of the corresponding decision variables. This area can be used to describe the constraint (2) in the model. Figure 4 The highlighted border cells in the figure are the state after adding "E32" equal to "E33".
[0099] exist Figure 2 Below is the solution display area. Here we use the corresponding symbols to fill in the values of the shift schedule. This area can also be implemented through Excel functions. Here we use the Choose function and the Match function combined with the judgment of the decision variable to fill in the shift schedule. The overall table is established to align the relevant dimensions as much as possible to facilitate observation and function assignment.
[0100] Figure 5 This is an example of a cell after adding all decision variables, constraints, and objective function values. It can be seen that through the highlighting function of OpenSolver, the relationship between the added variables, constraints, and parameters can be observed more clearly.
[0101] Although the problem scale is small due to teaching considerations, users can arbitrarily expand the number of cells according to the structure and add corresponding variables and constraints to solve larger problems. In addition, since the expression of the problem is not unique, when using this tool, we encourage students to use their own way to arrange and model the cells of the problem after understanding the method. In addition, the table does not use any VBA (Visual Basic for Applications) code, which further reduces the background knowledge required to use the tool. For this problem, the solver takes about 0.1 seconds to solve.
[0102] This tool has been applied to the teaching of optimization-related chapters in "Introduction to Big Data". The main purpose of this chapter is to introduce the theories and algorithms in the field of basic and some advanced optimization. In the section on integer programming, the teacher used this tool when explaining some real-life integer programming examples, namely the nurse scheduling optimization problem provided here. Most students in this course have a knowledge background in linear programming, but do not have the knowledge of building complex integer programming models, and are not familiar with general optimization software platforms. Another consideration is that at this stage, using medium-sized problems as a transition can reduce the learning curve of students in contact with more complex problems. The main teaching method is that after the teacher has finished teaching the mathematical model in the textbook, he or she can use this tool to assist in model building and solving.
[0103] In order to get students' feedback on the tool and the corresponding teaching method, we conducted a questionnaire survey after class. The questionnaire included ten evaluation items; the score range was 1 to 5. Thirty-two students participated and responded to the questionnaire. Since the tool was also used by students in the experimental class, the evaluation items also included the evaluation of the use of the tool. The evaluation averages of the items are given in Table 1.
[0104] Table 1 Software evaluation feedback results
[0105]
[0106]
[0107] The overall average score of the ten items in the questionnaire was 4.20, which shows the ease of use and applicability of the tool as an optimization model auxiliary tool. The highest score of all items was item 8, which means that students believed that the tool could help them understand and learn the nurse scheduling problem. The lowest score was item 4. The main reason was that some students had not used Excel's own linear solver and were not familiar with the interface of OpenSolver. Then, during the classroom and after-class experiments, after a simple explanation, most students were able to quickly master the method, and all students were able to use the software to complete the experimental tasks.
[0108] More specifically, items 1 to 3 are about the interface design of the tool; the scores of these items are all higher than 4 points, proving that the interface of the tool is reasonably arranged and easy to use. Item 5 is about the modeling operation of the tool, and the score of this item is higher than 4 points. It proves that the modeling operation steps using the tool are easy to understand. Item 7 is about the constraint adding method, and the score of this item is relatively low. The main reason is that some students use Excel expressions to characterize the constraints for the first time, and they are not familiar with some Excel expressions. In addition, the model involves certain 0-1 programming modeling knowledge, while students only have background knowledge of general linear programming models. Items 8 to 10 are about the evaluation of the overall teaching effect of the tool. The scores of the items are all greater than 4.30, proving that the software, as an auxiliary teaching tool in the classroom environment, can help students learn and understand the nurse scheduling problem, that is, the general integer programming model.
[0109] As a software tool that is familiar and easy to obtain for students and teachers, spreadsheets play an increasingly important role in industrial applications and teaching environments due to their powerful calculation and visualization capabilities.
[0110] Embodiment 2
[0111] This embodiment provides a teaching auxiliary system for optimizing nurse scheduling;
[0112] Nurse scheduling optimization teaching auxiliary system, including:
[0113] An acquisition module is configured to: acquire nurse scheduling demand data; and set decision variables that need to be satisfied for nurse scheduling according to the nurse scheduling demand data;
[0114] A setting module, which is configured to: set the constraints and objective functions that need to be met for nurse scheduling according to the nurse scheduling demand data;
[0115] The output module is configured to solve the objective function using the OpenSolver plug-in of Excel software to obtain the optimal solution, which is the optimized nurse scheduling result.
[0116] It should be noted that the acquisition module, setting module and output module described above correspond to steps S101 to S103 in Embodiment 1, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the modules described above as part of the system can be executed in a computer system such as a set of computer executable instructions.
[0117] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0118] The proposed system can be implemented in other ways. For example, the system embodiments described above are only illustrative, and the division of the modules described above is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0119] Embodiment 3
[0120] This embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory so that the electronic device executes the method described in the above embodiment one.
[0121] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0122] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0123] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.
[0124] The method in the first embodiment can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0125] Those skilled in the art will appreciate that the units, i.e., algorithm steps, of the various examples described in conjunction with this embodiment can be implemented in electronic hardware or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0126] Embodiment 4
[0127] This embodiment further provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the method described in the first embodiment is completed.
[0128] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An electronic device, characterized in that: include: One or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, the one or more computer programs are stored in the memory, and when the electronic device is running, the processor executes the one or more computer programs stored in the memory to enable the electronic device to perform the following process: Obtain nurse scheduling demand data; set decision variables that need to be met for nurse scheduling based on the nurse scheduling demand data; According to the nurse scheduling demand data, set the constraints and objective functions that need to be met for nurse scheduling; According to the nurse scheduling demand data, set the constraints and objective functions that nurse scheduling needs to meet; the specific steps include: Objective Function Constraints Among them, I represents the subscript set of nurses: I = {1, 2, ..., 5}, |I| = 5; the subscript of a nurse is represented by i; K represents the subscript set of shifts: K = {1 (day shift), 2 (evening shift), 3 (night shift), 4 (rest)}; the subscript of a shift is represented by k; J represents the subscript unit set of time; the time unit here is day, and the total time period is two weeks: J = {1, 2, ..., 14}, |J| = 14; the subscript of a day is represented by j; d jk represents the number of shifts k required on day j, i.e. the shift demand on a certain day; w max Indicates the upper limit of the total number of working days for a nurse in the total time period: w max =10; n max Indicates the upper limit of the total number of night shifts for a nurse in the total time period: n max =3;s i Indicates that nurse i exceeds the total number of nurse working days w max Number of working days; i Indicates that nurse i exceeds the total number of night shift days for nurses w max Number of night shifts; x ij3 represents the decision variable of nurse i working night shift at time j. If it is 1, it means the nurse is working, otherwise it means the nurse is not working; x i(j+1)4 The decision variable representing whether nurse i takes a rest at time j+1. If it is 1, it means taking a rest, otherwise it means not taking a rest. It means that if x ij3 is 1, that is, if you work the night shift at time j, you must rest the next day, that is, x i(j+1)4 must also be 1; if x ij3 is 0, then x i(j+1)4 It doesn’t matter; The OpenSolver plug-in of Excel software is used to solve the objective function and obtain the optimal solution, which is the optimized nurse scheduling result; The OpenSolver plug-in of Excel software is used to solve the objective function and obtain the optimal solution, which is the optimized nurse scheduling result; the specific steps include: setting decision variables, objective functions and constraints in the OpenSolver plug-in of Excel software; solving the objective function through the Solve unit in the OpenSolver toolbar of Excel software to obtain the optimal solution, which is the optimized nurse scheduling result; using the Choose function and the Match function combined with the judgment of the decision variables to fill in the scheduling table.
2. The electronic device according to claim 1, characterized in that: Obtain nurse scheduling demand data; wherein the nurse scheduling demand data includes: the number of different shifts required each day.
3. The electronic device according to claim 1, characterized in that: According to the nurse scheduling demand data, set the decision variables that need to be met for nurse scheduling; the specific steps include: Assume that a time period includes several days, and the work unit assigns different shifts to different nurses within a day; I = {1, 2, ..., |I|} represents the set of nurses; K = {1, 2, ..., |K|} represents the set of shifts; J = {1, 2, ..., |J|} represents the set of days; then the decision variable x ijk The definition is as follows:
4. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the following process: Obtain nurse scheduling demand data; set decision variables that need to be met for nurse scheduling based on the nurse scheduling demand data; According to the nurse scheduling demand data, set the constraints and objective functions that need to be met for nurse scheduling; According to the nurse scheduling demand data, set the constraints and objective functions that nurse scheduling needs to meet; the specific steps include: Objective Function Constraints Among them, I represents the subscript set of nurses: I = {1, 2, ..., 5}, |I| = 5; the subscript of a nurse is represented by i; K represents the subscript set of shifts: K = {1 (day shift), 2 (evening shift), 3 (night shift), 4 (rest)}; the subscript of a shift is represented by k; J represents the subscript unit set of time; the time unit here is day, and the total time period is two weeks: J = {1, 2, ..., 14}, |J| = 14; the subscript of a day is represented by j; d jk represents the number of shifts k required on day j, i.e. the shift demand on a certain day; w max Indicates the upper limit of the total number of working days for a nurse in the total time period: w max =10; n max Indicates the upper limit of the total number of night shifts for a nurse in the total time period: n max =3;s i Indicates that nurse i exceeds the total number of nurse working days w max Number of working days; i Indicates that nurse i exceeds the total number of night shift days for nurses w max Number of night shifts; x ij3 represents the decision variable of nurse i working night shift at time j. If it is 1, it means the nurse is working, otherwise it means the nurse is not working; x i(j+1)4 The decision variable representing whether nurse i takes a rest at time j+1. If it is 1, it means taking a rest, otherwise it means not taking a rest. It means that if x ij3 is 1, that is, if you work the night shift at time j, you must rest the next day, that is, x i(j+1)4 must also be 1; if x ij3 is 0, then x i(j+1)4 It doesn’t matter; The OpenSolver plug-in of Excel software is used to solve the objective function and obtain the optimal solution, which is the optimized nurse scheduling result; The OpenSolver plug-in of Excel software is used to solve the objective function and obtain the optimal solution, which is the optimized nurse scheduling result; the specific steps include: setting decision variables, objective function and constraints in the OpenSolver plug-in of Excel software; solving the objective function through the Solve unit in the OpenSolver toolbar of Excel software to obtain the optimal solution, which is the optimized nurse scheduling result; the Choose function and the Match function are used in combination with the judgment of decision variables to fill in the scheduling table.
5. The computer-readable storage medium of claim 4, wherein: Obtain nurse scheduling demand data; wherein the nurse scheduling demand data includes: the number of different shifts required each day.
6. The computer-readable storage medium of claim 4, wherein: According to the nurse scheduling demand data, set the decision variables that need to be met for nurse scheduling; the specific steps include: Assume that a time period includes several days, and the work unit assigns different shifts to different nurses within a day; I = {1, 2, ..., |I|} represents the set of nurses; K = {1, 2, ..., |K|} represents the set of shifts; J = {1, 2, ..., |J|} represents the set of days; then the decision variable x ijk The definition is as follows:
Citation Information
Patent Citations
Scheduling method, server, and computer readable storage medium
CN108764699A
