Method and device for scheduling resource-constrained projects considering decision preferences
By combining a pre-trained resource-constrained project scheduling model with decision preference evaluation and scoring, and then applying reinforcement learning, the problem that existing scheduling methods fail to consider engineering realities and managerial experience is solved, thus realizing a personalized and highly feasible scheduling solution.
Patent Information
- Application Number
- CN202410166697.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2044-02-06
AI Technical Summary
Existing resource-constrained project scheduling methods fail to effectively consider actual engineering factors and the experience and knowledge of project managers, resulting in overly idealistic solutions that reduce their feasibility.
An initial scheduling scheme is generated using a pre-trained resource-constrained project scheduling model. This scheme is then evaluated and scored based on decision preferences. A new scheduling model embedded with decision preferences is obtained through reinforcement learning training until a satisfactory scheduling scheme is output.
It enables personalized scheduling schemes while ensuring the project proceeds quickly and orderly, improving the feasibility of scheduling schemes, integrating management decision-making preferences, and adapting to actual engineering needs.
Smart Images

Figure CN117952376B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of project scheduling, and in particular to a resource-constrained project scheduling method considering decision bias, a corresponding device, an electronic device and a computer readable storage medium. BACKGROUND
[0002] The resource-constrained project scheduling problem (RCPSP) is an important combinatorial optimization problem, which is widely used in custom product design and manufacturing, construction engineering, drug research and development, etc. The RCPSP belongs to the strong NP-hard problem, and a high-quality and efficient solution algorithm has important value for solving engineering problems, which can help enterprises improve resource utilization, reduce costs and meet project duration requirements.
[0003] The core of the RCPSP problem is to reasonably allocate the start time and end time of a group of tasks with tight before and after constraint relationships under limited resources, so as to minimize the total duration of the project, etc. In engineering practice, enterprises often undertake multiple projects at the same time, and the operation process of the enterprise can be regarded as a dynamic process of new projects continuously arriving and old projects continuously completing. When a new project arrives, the project manager needs to make a reasonable scheduling plan. In this process, the project manager will consider various uncertain factors that may be faced in engineering practice according to his own management experience, and the project scheduling scheme made will not only pursue the minimization of the total duration of the project, but also may have special requirements for the start time of some tasks. However, the existing scheduling method focuses on optimizing the scheduling scheme, and does not consider the engineering practical factors or the experience and knowledge of the project manager, so the obtained scheme is too idealistic, resulting in low feasibility of the scheme.
[0004] In summary, the existing resource-constrained project scheduling method considering decision bias does not consider engineering practical factors or the experience and knowledge of the project manager, and the obtained scheme is too idealistic, resulting in problems such as low feasibility of the scheme. The present applicant makes corresponding exploration to solve the problem. SUMMARY
[0005] The present application aims to solve the above problems and provide a resource-constrained project scheduling method considering decision bias, a corresponding device, an electronic device and a computer readable storage medium.
[0006] To achieve the various purposes of the present application, the present application adopts the following technical solutions:
[0007] A resource-constrained project scheduling method considering decision bias is proposed to adapt to one of the purposes of the present application, comprising:
[0008] In response to the resource-constrained project scheduling instruction, obtain a current to-be-scheduled project and a corresponding project task information set of the to-be-scheduled project;
[0009] An initial scheduling scheme of the to-be-scheduled project is generated by using a pre-trained first resource-constrained project scheduling model, and a score result is determined by evaluating and scoring a project task completion time, a project task start time relaxation, and an available resource amount at a task start time corresponding to each project task in the initial scheduling scheme according to the decision preference;
[0010] The score result is converted into an execution reward corresponding to each project task based on a preset reward model, and a second resource-constrained project scheduling model is obtained by training the first resource-constrained project scheduling model based on the execution reward;
[0011] The to-be-scheduled project is input into the second resource-constrained project scheduling model to generate a new scheduling scheme with embedded decision preference, and the above steps are repeated until a satisfactory scheduling scheme is output, so as to complete the scheduling of the resource-constrained project.
[0012] Optionally, the step of generating the initial scheduling scheme of the to-be-scheduled project by using the pre-trained first resource-constrained project scheduling model comprises:
[0013] Determine the ratio between the resource amount required by each project task information and the total resource amount and the time required by the project task;
[0014] Based on the ratio between the resource amount required by each project task information and the total resource amount and the time required by the project task, determine the project task information set, decode the project task information set, and determine the initial scheduling scheme corresponding to the to-be-scheduled project.
[0015] Optionally, the step of decoding the project task information set to determine the initial scheduling scheme corresponding to the to-be-scheduled project comprises:
[0016] In the encoder of the first resource-constrained project scheduling model, the mask information and the current key state information corresponding to the to-be-scheduled project are determined according to the ratio between the resource amount required by each project task information and the total resource amount and the time required by the project task;
[0017] In the decoder of the first resource-constrained project scheduling model, a special text node is used to store the information of the decoding context, the attention mechanism is used to calculate the probability of selection of all nodes at the current decision step in combination with the graph feature and the current key state information, and the initial scheduling scheme corresponding to the to-be-scheduled project is determined according to the probability of selection of all nodes at the current decision step.
[0018] Optionally, the step of training the first resource-constrained project scheduling model comprises:
[0019] The initial environment reward of the first resource-constrained project scheduling model is a critical path-based reward mechanism, which is:
[0020]
[0021] wherein R (a t ,s t ) is the reward of performing action a t in state s t at time t, is the maximum completion time estimated according to the critical path at time t, is the increase of C max at time t+1, is the length of the critical path.
[0022] Optionally, the step of training the first resource-constrained project scheduling model comprises:
[0023] The PPO-clip algorithm is used to clip the target loss function of the first resource-constrained project scheduling model to limit the difference between the new policy and the old policy, so as to control the update step;
[0024] The gradient definition formula of the target loss function is:
[0025]
[0026] The gradient update formula is:
[0027]
[0028] wherein γ is an adjustable learning rate.
[0029] Optionally, the step of training the second resource-constrained project scheduling model based on the first resource-constrained project scheduling model according to the execution reward comprises:
[0030] The execution reward of each project task is:
[0031]
[0032] wherein R cpm is a critical path-based reward, is a user feedback reward based on project task i, which is represented as:
[0033]
[0034] wherein, respectively, are the task completion time reward, the task start time slack reward and the task start time resource availability reward, and the calculation formula is:
[0035]
[0036]
[0037]
[0038] wherein, is the completion time of the task i in the Gantt chart shown to the project manager for evaluation, is the completion time of the task i calculated by the first resource-constrained project scheduling model, is the satisfaction score of the project manager's evaluation of the completion time of the task i, is the start time slack of the task i shown to the project manager for evaluation, is the start time slack of the task i calculated by the first resource-constrained project scheduling model, is the satisfaction score of the project manager's evaluation of the start time slack of the task i, is the resource availability at the task start time of the task i shown to the project manager for evaluation, is the resource availability at the task start time of the task i calculated by the first resource-constrained project scheduling model, is the satisfaction score of the project manager's evaluation of the resource availability at the task start time of the task i, and α1, α2 and α3 are weight coefficients of each feedback, used to adjust the balance between the reward mechanism based on the critical path and various feedback rewards.
[0039] Optionally, the step of obtaining the current project to be scheduled and the corresponding project task information set comprises:
[0040] Each project task information in the project task information set comprises one or any number of the following: the ratio between the resource amount required by the project task and the total resource amount, the time required by the project task, and the adjacency matrix of the relationship between each task in the project task.
[0041] Another object of the present application is to provide a resource-constrained project scheduling considering decision bias, which comprises:
[0042] A task information acquisition module is arranged to obtain the current project to be scheduled and the corresponding project task information set in response to the resource-constrained project scheduling instruction.
[0043] The evaluation scoring module is configured to generate an initial scheduling scheme of the to-be-scheduled project by using a pre-trained first resource-constrained project scheduling model, and evaluate and score a project task completion time, a start time relaxation amount and an available resource amount at a task start time corresponding to each project task in the initial scheduling scheme according to the decision preference to determine a scoring result;
[0044] The reward updating module is configured to convert the scoring result into an execution reward corresponding to each project task based on a preset reward model, and train a second resource-constrained project scheduling model based on the first resource-constrained project scheduling model according to the execution reward;
[0045] The scheduling scheme determining module is configured to input the to-be-scheduled project into the second resource-constrained project scheduling model to generate a new scheduling scheme with embedded decision preference, and repeat the above steps until a satisfactory scheduling scheme is output, so as to complete the scheduling of the resource-constrained project.
[0046] Another object of the present application is to provide an electronic device comprising a central processing unit and a memory, wherein the central processing unit is configured to invoke a computer program stored in the memory to execute the steps of the resource-constrained project scheduling method considering decision preference.
[0047] Another object of the present application is to provide a computer readable storage medium storing a computer program implemented according to the resource-constrained project scheduling method considering decision preference in the form of computer readable instructions, wherein the computer program is invoked and run by a computer to execute the steps included in the corresponding method.
[0048] Compared with the prior art, the resource-constrained project scheduling method considering decision preference of the present application does not consider the actual engineering factors or the experience and knowledge of project managers, and the obtained scheme is too idealistic, which leads to the problems of low feasibility of the scheme and the like. The present application includes but is not limited to the following beneficial effects:
[0049] Firstly, the resource-constrained project scheduling method considering decision preference of the present application can effectively integrate resource-constrained project scheduling scheme optimization and manager decision preference, so that a project manager or a customer acceptance party without optimization knowledge background can adjust the project scheduling scheme according to their own experience, which realizes the individual customization of the scheduling scheme by non-technical personnel while ensuring the rapid and orderly progress of project tasks, and significantly improves the feasibility of the scheduling scheme.
[0050] Secondly, the resource-constrained project scheduling method considering decision preference of the present application can establish a project scheduling algorithm integrated with the decision preference of the project manager, which realizes efficient, easily adjustable and generalizable resource-constrained project scheduling.
[0051] Third, the resource-constrained scheduling method of this application can obtain results that meet the project leader's preferences with only a small amount of evaluation time, and subsequent adjustments are convenient. Through the resource-constrained scheduling method of this application, expert experience or the preferences of non-technical personnel can be introduced into the scheduling process, which can better solve the scheduling problem of resource-constrained projects.
[0052] Furthermore, the resource-constrained project scheduling method of this application, which considers decision-making preferences, can introduce expert experience or the preferences of non-technical personnel into the scheduling process while ensuring the minimum project duration, thus better solving the scheduling problem of resource-constrained projects. Attached Figure Description
[0053] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0054] Figure 1 This is a flowchart illustrating the resource-constrained project scheduling method that considers decision preferences in the embodiments of this application;
[0055] Figure 2 This is a flowchart illustrating the process of generating an initial scheduling scheme for the project to be scheduled in an embodiment of this application;
[0056] Figure 3 This is a flowchart illustrating the process of decoding the project task information set and determining the initial scheduling scheme corresponding to the project to be scheduled in this embodiment of the application.
[0057] Figure 4 This is a schematic diagram of the solution of the first resource-constrained scheduling model in the embodiments of this application;
[0058] Figure 5 This is a schematic diagram illustrating the evaluation feedback experiment results of the resource-constrained project scheduling method that considers decision preferences in the embodiments of this application;
[0059] Figure 6 This is a schematic diagram of the resource-constrained project scheduling device in the embodiments of this application;
[0060] Figure 7 This is a schematic diagram of the structure of the computer device in the embodiments of this application. Detailed Implementation
[0061] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0062] It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. As used herein, "connected," "coupled," and / or "coupling," can include both direct connections and / or indirect connections (i.e., via one or more other elements). As used herein, "connection" or "coupling" can include a wireless connection or a wireless coupling. As used herein, the term "and / or" comprises all of the associated listed items, one or more of the associated listed items, and all combinations of the associated listed items.
[0063] It will be further understood that, as used herein, the terms "comprises" and / or "comprising," while they can be used in the context of compositions of matter, preferably, are not used in a restrictive sense, for example, to denote the presence of stated features, integers, steps or components thereof, but to denote the presence at least the stated features, integers, steps or components thereof. As used herein, unless otherwise stated, the term "or" includes both exclusive and inclusive or. As used herein, unless otherwise stated, the term "and / or" includes all of the associated listed items, one or more of the associated listed items, and all combinations of the associated listed items.
[0064] Those skilled in the art will understand that, as used herein, the terms "client," "terminal," and "terminal device" include both devices that are solely wireless signal receivers and devices that have both receiving and transmitting hardware that can communicate bi-directionally over a bi-directional communication link. Such devices can include cellular or other communication devices with single-line or multiple-line displays, or no display, Personal Communications Service (PCS) devices that can combine a voice and / or data processor, a PDA that can include a radio frequency receiver and a pager, Internet and / or Intranet access, a Web browser, a calendar, and / or a GPS receiver, a conventional laptop and / or palmtop computer and / or other devices that have a radio frequency receiver. As used herein, the terms "client," "terminal," and "terminal device" can be portable, transportable, mounted in a vehicle (aeronautical, maritime, and / or land), or adapted and / or configured for local and / or distributed operation on Earth and / or any other location in space. As used herein, the terms "client," "terminal," and "terminal device" can also be a communication terminal, an Internet terminal, a music / video playing terminal, such as a PDA, a Mobile Internet Device (MID), and / or a mobile phone with music / video playing function, a smart television, a set-top box, and / or the like.
[0065] As used herein, the terms "server," "client," "service node," and the like refer to hardware that has the equivalent capability of a personal computer, i.e., an electronic device having a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device, and the like necessary components disclosed by the Von Neumann principle. A computer program is stored in the memory, the central processing unit loads the program stored in the external memory into the memory and runs it, executes the instructions in the program, and interacts with the input and output devices, thereby completing a specific function.
[0066] It should be noted that the concept of "server" in the present application can also be extended to the case of a server cluster. According to the principle of network deployment understood by those skilled in the art, the servers should be logically divided, and in physical space, these servers can be independent of each other but can be called through an interface, or can be integrated into a physical computer or a computer cluster. Those skilled in the art should understand this variation and should not be restricted by the implementation of the network deployment of the present application.
[0067] One or more technical features of the present application, unless explicitly specified, can be deployed on a server for implementation and accessed by a client remotely calling an online service interface provided by the server, or can be directly deployed and run on a client for implementation.
[0068] The neural network model referred to or possibly referred to in the present application, unless explicitly specified, can be deployed on a remote server and remotely called by a client, or can be deployed on a client with sufficient device capability for direct calling. In some embodiments, when it is run on a client, its corresponding intelligence can be obtained through transfer learning, so as to reduce the requirement for client hardware running resources and avoid excessive occupation of client hardware running resources.
[0069] The various data involved in the present application, unless explicitly specified, can be remotely stored on a server or stored on a local terminal device, as long as it is suitable for being called by the technical solutions of the present application.
[0070] Those skilled in the art should know that the various methods of the present application, although based on the same concept and described to present commonality among them, are independently executable unless otherwise specified. Similarly, for each embodiment disclosed in the present application, it is based on the same inventive concept, so the same concept is understood to be equivalent, and although the concept is expressed differently, it is only a suitable transformation for convenience.
[0071] Unless it is explicitly stated that the embodiments disclosed in the present application are mutually exclusive, the technical features involved in each embodiment can be combined flexibly to construct new embodiments, as long as such combination does not deviate from the spirit of the present application and can meet the needs of the prior art or solve some aspects of the deficiencies in the prior art. For this variation, those skilled in the art should know.
[0072] Resource-constrained project scheduling problem (RCPSP) is an important combinatorial optimization problem, which is widely used in custom product design and manufacturing, construction engineering, drug research and development, etc. RCPSP is a strong NP-hard problem, and high-quality and efficient solution algorithm has important value for solving engineering problems, which can help enterprises improve resource utilization, reduce costs and meet project time requirements.
[0073] The core of RCPSP problem is to reasonably allocate the start time and end time of a group of tasks with tight before and after constraints under limited resources, so as to minimize the total duration of the project, etc. In engineering practice, enterprises often undertake multiple projects at the same time, and the operation process of the enterprise can be regarded as a dynamic process of new projects arriving and old projects completing. When a new project arrives, the project manager needs to make a reasonable scheduling plan. In this process, the project manager will consider various uncertain factors that may be faced in engineering practice according to his own management experience, and the project scheduling scheme made will not only pursue the minimization of the total duration of the project, but also may have special requirements for the start time of some tasks. However, the existing scheduling methods focus on optimizing the scheduling scheme, and do not consider the engineering practical factors or the experience and knowledge of the project manager, so the obtained scheme is too idealistic, resulting in low feasibility of the scheme.
[0074] Based on the above exemplary scenarios, please refer to Figure 1 The resource-constrained project scheduling method considering decision preferences of the present application includes, in one embodiment thereof:
[0075] Step S10, in response to a resource-constrained project scheduling instruction, obtaining a current project to be scheduled and a corresponding set of project task information of the project to be scheduled;
[0076] The computer terminal device can respond to the resource-constrained project scheduling instruction, obtain the current project to be scheduled, obtain the current project to be scheduled and the corresponding set of project task information of the project to be scheduled, and each project task information in the set of project task information contains one or any number of items of the adjacent matrix of the required resource amount and the total resource amount of the project task, the required time of the project task, and the tight before and after relationship of each task in the project task.
[0077] Step S20, using a pre-trained first resource-constrained project scheduling model to generate an initial scheduling scheme of the project to be scheduled, and evaluating and scoring the project task completion time, start time relaxation amount and available resource amount of each project task corresponding to the initial scheduling scheme according to the decision preferences to determine a scoring result.
[0078] After obtaining the current to-be-scheduled project and the corresponding project task information set, the pre-trained first resource-constrained project scheduling model is used to generate an initial scheduling scheme of the to-be-scheduled project according to the ratio of the resource amount required by each project task information to the total resource amount, the time required by the project task, and the adjacency matrix of the relationship between the tasks in the project task, and to evaluate and score the project task completion time, the project task start time relaxation amount, and the available resource amount at the task start time corresponding to each project task in the initial scheduling scheme according to the decision preference to determine the scoring result.
[0079] Referring to Figure 2 The step of generating the initial scheduling scheme of the to-be-scheduled project by using the pre-trained first resource-constrained project scheduling model includes:
[0080] Step S201, determining the ratio of the resource amount required by each project task information to the total resource amount and the time required by the project task;
[0081] Step S203, based on the ratio of the resource amount required by each project task information to the total resource amount and the time required by the project task, determining the project task information set, decoding the project task information set, and determining the initial scheduling scheme corresponding to the to-be-scheduled project.
[0082] Specifically, after extracting the project task information in the to-be-scheduled project based on the pre-trained first resource-constrained project scheduling model to determine the project task information set, the ratio of the resource amount required by each project task information to the total resource amount and the time required by the project task are determined, the initial reward project task information set is decoded to determine the initial scheduling scheme corresponding to the to-be-scheduled project, and the initial scheduling scheme represents the scheduling scheme with the minimum duration.
[0083] Further, referring to Figure 3 The step of decoding the project task information set to determine the initial scheduling scheme corresponding to the to-be-scheduled project includes:
[0084] Step S2031, in the encoder of the first resource-constrained project scheduling model, determining the mask information and the current key state information corresponding to the to-be-scheduled project according to the ratio of the resource amount required by the project task to the total resource amount and the time required by the project task;
[0085] Step S2033, in the decoder of the first resource-constrained project scheduling model, a special text node is used to store the decoding context information, combined with the graph features and the current key state information, the attention mechanism is used to calculate the probability of selection of all nodes at the current decision step, and the initial scheduling scheme corresponding to the to-be-scheduled project is determined according to the probability of selection of all nodes at the current decision step.
[0086] Specifically, the attention model in the first resource-constrained project scheduling model is composed of an encoder (Encoder) and a decoder (Decoder). At each decision step, the encoder is used to process the input features to increase the expressiveness of the input features. Then the decoder calculates the probability of selection under the current state of each task, and then selects the task start-up by sampling or greedy method, that is, the agent makes an action, and then updates the state information. The decision process is repeated until all tasks are scheduled. When all tasks are scheduled, the reinforcement learning updates the network parameters in the encoder and the decoder by obtaining the reward.
[0087] The encoder is mainly responsible for processing the input features, converting low-dimensional features into high-dimensional features, and improving the expressiveness of the input features. Specifically, the encoder first performs embedding calculation on the input features, considering information in three aspects of resources, time and network. For resources, we take r ik / R k (task resource demand / total amount of resources) as a feature, which considers both resource information and has a normalization effect; for time, we take the task required duration d i as a feature; for network, we take the adjacency matrix representing the close relationship as a feature. Then, after processing by multiple attention layers, including multi-head attention layers and feedforward layers, and batch normalization, the graph embedding is finally output.
[0088] The decoder is responsible for calculating the probability of each scheduling task according to the output information of the encoder, Mask information and current key state information. Specifically, the decoder first uses a special text node to store the decoding context information, combines the graph features and the key state information to calculate the corresponding query, and then calculates the probability of all nodes at the current decision step by attention. The decoder uses Mask technology to process the current unselectable task nodes, and finally uses the softmax function to calculate the output probability p to obtain the probability of selection of all nodes at the current decision step.
[0089] Further, the model parameter matrix used by the encoder (Encoder) and the decoder (Decoder) can be represented by parameter θ, and the role of the reinforcement learning algorithm is to adjust the parameter θ according to the reward of the current scheduling strategy, and update the optimal parameter θ *The optimal scheduling sequence pi is output * The reinforcement learning algorithm adopts a PPO-clip algorithm to clip the target loss function of the first resource-constrained project scheduling model to limit the difference between the new policy and the old policy, so as to control the update step.
[0090] The gradient definition formula of the target loss function is:
[0091]
[0092] The gradient update formula is:
[0093]
[0094] Wherein, γ is an adjustable learning rate.
[0095] The step of training the first resource-constrained project scheduling model comprises:
[0096] The initial environment reward of the first resource-constrained project scheduling model is a reward mechanism based on the critical path, and the reward mechanism based on the critical path is:
[0097]
[0098] Wherein, R(a t ,s t ) is the reward of action a t in state s t at time t, is the maximum completion time estimated according to the critical path at time t, is the increase of C max at time t+1, is the length of the critical path.
[0099] The first resource-constrained project scheduling model is pre-trained to output the corresponding optimal solution (or better solution), and the trained model (referred to as the first resource-constrained project scheduling model) is saved. When the project to be scheduled arrives, the pre-trained first resource-constrained project scheduling model will calculate the initial scheduling scheme corresponding to the project to be scheduled according to the user's input of the RCPSP problem.
[0100] Step S30, convert the score result into the execution reward corresponding to each project task based on the preset reward model, and train a second resource-constrained project scheduling model based on the first resource-constrained project scheduling model according to the execution reward;
[0101] After the project task completion time, the task start time slack, and the available resource amount at the task start time corresponding to each project task in the initial scheduling scheme are evaluated and scored according to the decision preference to determine a scoring result, the scoring result is converted into an execution reward corresponding to each project task based on a preset reward model, and a second resource-constrained project scheduling model is obtained by training based on the first resource-constrained project scheduling model according to the execution reward.
[0102] The first resource-constrained project scheduling model can embed a decision preference feedback mechanism. According to a feedback process, when the pre-trained first resource-constrained project scheduling model gives an initial scheduling scheme, the project manager can evaluate and score it. Three types of preference feedback are set: the task completion time, the task start time slack considering the duration fluctuation, and the available resource amount at the task start time considering the resource fluctuation. The project manager can be shown in the form of a Gantt chart, a task start time slack chart, and an available resource amount chart at the task start time to evaluate and score. The decision preference feedback result will change the reward mechanism of the first resource-constrained project scheduling model.
[0103] Specifically, considering that the premise of embedding the decision preference is still to make the project completion time C max as small as possible, we retain the CPM-based environment reward R cpm On this basis, the feedback reward of the human being for the task i is added, which is intended to give a human reinforcement. After the project manager scores the result, the reinforcement learning reward mechanism will change accordingly, becoming a multi-objective reinforcement learning problem. The reward processing method is linear weighting, and the execution reward of each project task is:
[0104]
[0105] where R cpm is the reward based on the critical path, is the user feedback reward based on the task i, which is represented as:
[0106]
[0107] where, are the task completion time reward, the task start time slack reward, and the available resource amount reward at the task start time, respectively, and the calculation formula is:
[0108]
[0109]
[0110]
[0111] where, the completion time of task i in the Gantt chart for the project manager to evaluate, the completion time of task i calculated by the first resource-constrained project scheduling model, the satisfaction score of the completion time of task i evaluated by the project manager, the start time slack of task i in the Gantt chart for the project manager to evaluate, the start time slack of task i calculated by the first resource-constrained project scheduling model, the satisfaction score of the start time slack of task i evaluated by the project manager, the available resource amount at the task start time of task i for the project manager to evaluate, the available resource amount at the task start time of task i calculated by the first resource-constrained project scheduling model, the satisfaction score of the available resource amount at the task start time of task i evaluated by the project manager, and a1, a2 and a3 are weight coefficients of each feedback, used to adjust the balance between the CPM reward mechanism and various feedback rewards.
[0112] As long as a is properly controlled, the balance between the CPM reward and the various human feedback rewards can be well adjusted, so that the output of the strategy network can meet the needs of human feedback while making the C max Small, through experiments, a1, a2 and a3 are set to 0.2, 0.4 and 0.8 respectively, which is better, and those skilled in the art can determine a1, a2 and a3 according to the actual situation of the project, and their corresponding values are not limited here.
[0113] In addition, considering that the feedback will change the state of the task that the project manager originally thought was good, resulting in dissatisfaction, the feedback is designed to be continuous, and each feedback can be mixed. Continuous feedback will still consider the previous evaluation of the user, and still calculate the reward according to the results of the previous evaluation, and the subsequent feedback will calculate the reward according to the current user evaluation.
[0114] Step S40, input the project to be scheduled into the second resource-constrained project scheduling model to generate a new scheduling scheme with embedded decision preferences, repeat the above steps until a satisfactory scheduling scheme is output, to complete the scheduling of the resource-constrained project.
[0115] The target loss function of the first resource-constrained project scheduling model can be used to train the second resource-constrained project scheduling model. When the second resource-constrained project scheduling model is trained to a convergent state, the to-be-scheduled project is input into the second resource-constrained project scheduling model to generate a new scheduling scheme with embedded decision preferences. The above steps are repeated until a satisfactory scheduling scheme is output, so as to complete the scheduling of the resource-constrained project.
[0116] In some embodiments, the resource-constrained scheduling based on artificial evaluation feedback designs a new artificial feedback mechanism and a feedback workflow for the RCPSP problem. The designed feedback mechanism enables non-professionals to participate in scheduling decisions through less feedback, realizes personalized scheduling, and meets user preference requirements. The constructed feedback workflow facilitates subsequent adjustment of the scheduling results by non-technical personnel, and efficiently realizes the autonomous adjustment of the scheduling results by the user.
[0117] According to the technical solution, a deep reinforcement learning algorithm based on artificial evaluation feedback is constructed using the python language and the pytorch framework to implement resource-constrained project scheduling, so as to verify the effectiveness of the resource-constrained project scheduling of the present application.
[0118] Firstly, the J30 example in PSPLIB can be given, the deep reinforcement learning network is pre-trained using the CPM reward formula, so that it can output the corresponding optimal solution (or better solution), and the first resource-constrained project scheduling model is saved. When the project arrives, the first resource-constrained project scheduling model will immediately calculate the optimal solution according to the user input of the RCPSP problem. We show it to the project manager in the form of a Gantt chart, a task duration reservation chart, and a task resource reservation chart. Taking example j301_1, the solution of the first resource-constrained project scheduling model shown to the project manager is as shown in the following figure. Figure 4 The project manager can feed back according to the solution of the first resource-constrained project scheduling model, and then retrain after modifying the reinforcement learning reward mechanism. Considering that the first resource-constrained project scheduling model requires training costs, and its selection probability of a task under each condition has a relatively large value, which is not conducive to the early sampling of reinforcement learning, we do not train on the basis of the first resource-constrained project scheduling model, but load a new model and retrain. Experiments prove that this operation makes the model converge faster.
[0119] Then we test the effectiveness of the three kinds of feedback respectively, and the alpha is set to the recommended value obtained by the experiment. For the task completion time feedback, we select task 4, the duration reservation feedback, select task 10, the resource reservation feedback, select task 12, and the satisfaction is 2. The three experimental results are as follows. Figure 5shown (each row represents a feedback result). It can be seen that after the feedback of the task 4 completion time, the completion time is obviously shortened. After the feedback of the time reservation, the time reservation of the task 10 is greatly extended, and after the feedback of the resource reservation, the resource reservation during the execution of the task 12 is extended. Correspondingly, the C max of the time are all extended, and the C max obtained by the three kinds of feedback are 51, 53 and 51 respectively. Our a is fixed, so the shortening of the completion time and the extension of the time reservation and the resource reservation are determined by the user satisfaction score (there are cases where the results are the same although the satisfaction is different). In the three experimental cases, the total reward of the model iteration basically converges, and the reinforcement learning loss value also basically converges.
[0120] In addition, considering that the feedback will change the state of the task that the project manager originally considered to be good, thereby causing dissatisfaction, our feedback is designed to be continuous, and each feedback can be mixed. The continuous feedback still considers the previous evaluation of the user and still calculates the reward according to the result of the previous evaluation. The subsequent feedback calculates the reward according to the current user evaluation. We first give the tasks 4 and 24 a time reservation feedback of 3 points and 2 points, and obtain the result as shown in Figure 5 (the first row), and then give the task 10 a time reservation feedback of 3 points and the task 13 a resource reservation feedback of 1 point. The result after the second feedback is as shown in Figure 5 (the second row). After the first feedback, the completion times of the tasks 4 and 24 are greatly reduced, and after the second feedback, the time relaxation of the task 10 is greatly increased, and the resource reservation during the execution of the task 13 is also increased. In order to meet these feedbacks, the corresponding C max is also increased. The convergence of the first feedback model is good, the total reward converges quickly in the second feedback (update times = 200), the loss value of the model converges slowly, but shows a downward trend, and a large number of update times can also converge to around 0.
[0121] Through experimental verification, the resource-constrained scheduling method of the application can obtain a result that meets the preference requirements of the project manager on the basis of only a small amount of evaluation time of the project manager, and subsequent adjustment is convenient. Through the resource-constrained scheduling method of the application, the preferences of experts or non-technical personnel can be introduced into the scheduling process, and the resource-constrained project scheduling problem is better solved.
[0122] Compared with the prior art, the existing resource-constrained project scheduling method considering decision preferences does not consider engineering practical factors or the experience and knowledge of project managers, and the obtained scheme is too idealized, resulting in problems such as low feasibility of the scheme. The application includes but is not limited to the following beneficial effects:
[0123] Firstly, the resource-constrained project scheduling method considering decision preferences can effectively integrate resource-constrained project scheduling scheme optimization and manager decision preferences, can enable project managers or customer acceptance parties without optimization knowledge background to adjust the project scheduling scheme according to their own experience, realize the individual customization of the scheduling scheme by non-technical personnel while ensuring the rapid and orderly progress of the project task, and significantly improve the feasibility of the scheduling scheme.
[0124] Secondly, the resource-constrained project scheduling method considering decision preferences can establish a project scheduling algorithm integrating project manager decision preferences, realize efficient, easily adjustable and generalizable resource-constrained project scheduling.
[0125] Thirdly, the resource-constrained scheduling method can obtain results meeting the preference requirements of the project leader with only a small amount of evaluation time, and subsequent adjustment is convenient. Through the resource-constrained scheduling method, expert experience or the preferences of non-technical personnel can be introduced into the scheduling process, and the resource-constrained project scheduling problem can be better solved.
[0126] Further, the resource-constrained project scheduling method considering decision preferences can introduce expert experience or the preferences of non-technical personnel into the scheduling process while ensuring the minimum project duration, and better solve the resource-constrained project scheduling problem.
[0127] Please refer to Figure 6 , a resource-constrained project scheduling considering decision preferences is provided for one of the purposes of the present application, which includes a task information acquisition module 1100, an evaluation scoring module 1200, a reward updating module 1300, and a scheduling scheme determination module 1400. The task information acquisition module 1100 is configured to acquire the current project to be scheduled and its corresponding project task information set in response to a resource-constrained project scheduling instruction. The evaluation scoring module 1200 is configured to generate an initial scheduling scheme for the project to be scheduled using a pre-trained first resource-constrained project scheduling model, and to evaluate and score the project task completion time, the project task start time relaxation, and the available resource amount at the task start time corresponding to each project task in the initial scheduling scheme according to the decision preferences to determine a scoring result. The reward updating module 1300 is configured to convert the scoring result into an execution reward corresponding to each project task based on a preset reward model, and to train a second resource-constrained project scheduling model based on the first resource-constrained project scheduling model according to the execution reward. The scheduling scheme determination module 1400 is configured to input the project to be scheduled into the second resource-constrained project scheduling model to generate a new scheduling scheme embedding decision preferences, and to repeat the above steps until a satisfactory scheduling scheme is output, so as to complete the scheduling of the resource-constrained project.
[0128] On the basis of any embodiment of the present application, please refer to Figure 7 Another embodiment of the present application also provides an electronic device, which can be implemented by a computer device, as shown in Figure 7 The internal structure diagram of the computer device. The computer device includes a processor, a computer readable storage medium, a memory and a network interface connected by a system bus. Among them, the computer readable storage medium of the computer device stores an operating system, a database and computer readable instructions, the database can store control information sequence, and the computer readable instructions are executed by the processor to enable the processor to implement a resource-constrained project scheduling method considering decision preference. The processor of the computer device is used to provide computing and control capability to support the operation of the whole computer device. The memory of the computer device can store computer readable instructions, and the computer readable instructions are executed by the processor to enable the processor to execute the resource-constrained project scheduling method considering decision preference of the present application. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art can understand that Figure 7 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or less components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0129] The processor in the embodiment is used to execute the specific functions of each module and its sub-modules in Figure 6 The memory stores the program codes and various data required for executing the above-mentioned modules or sub-modules. The network interface is used for data transmission between user terminals or servers. The memory in the embodiment of the present application stores the program codes and data required for executing all modules / sub-modules in the resource-constrained project scheduling device of the present application, and the server can call the program codes and data of the server to execute the functions of all sub-modules.
[0130] The present application also provides a storage medium storing computer readable instructions, which are executed by one or more processors to enable the one or more processors to execute the steps of the resource-constrained project scheduling method considering decision preference described in any embodiment of the present application.
[0131] The present application also provides a computer program product including computer programs / instructions, which are executed by one or more processors to implement the steps of the resource-constrained project scheduling method considering decision preference described in any embodiment of the present application.
[0132] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the method of the present application can be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of the method. The storage medium can be a computer readable storage medium such as a magnetic disc, an optical disc, a read-only memory (ROM), or a random access memory (RAM).
[0133] The above only describes some embodiments of the present application. It should be pointed out that those skilled in the art can make some improvements and refinements without departing from the principles of the present application. These improvements and refinements should also be considered as the protection scope of the present application.
[0134] In summary, the resource-constrained project scheduling method considering decision preferences of the present application can introduce expert experience or non-technical personnel preferences into the scheduling process while ensuring the minimum project duration, and better solves the resource-constrained project scheduling problem.
Claims
1. A resource-constrained project scheduling method considering decision preferences, characterized in that, include: In response to a resource-constrained project scheduling instruction, obtain the current project to be scheduled and its corresponding project task information set. Each project task information set contains one or more of the following: the ratio between the resource amount required by the project task and the total resource amount, the time required by the project task, and the adjacency matrix of the immediate preceding and immediate following relationships of each task in the project task. An initial scheduling scheme for the projects to be scheduled is generated using a pre-trained first resource-constrained project scheduling model. This includes: determining the ratio between the resource requirement of each project task and the total resource quantity, as well as the time required for each project task; determining a set of project task information based on the ratio between the resource requirement of each project task and the total resource quantity, and the time required for each project task; decoding the set of project task information to determine the initial scheduling scheme corresponding to the projects to be scheduled; and evaluating and scoring the project task completion time, start time slack, and available resource quantity at the start time for each project task in the initial scheduling scheme according to decision preferences to determine the scoring result. Based on a preset reward model, the scoring results are converted into execution rewards corresponding to each project task. Based on the first resource-constrained project scheduling model, a second resource-constrained project scheduling model is trained according to the execution rewards. The project to be scheduled is input into the second resource-constrained project scheduling model to generate a new scheduling scheme with embedded decision preferences. This process is repeated until a satisfactory scheduling scheme is output, thereby completing the scheduling of the resource-constrained project. 2.The method of claim 1, wherein, The steps of decoding the project task information set to determine the initial scheduling scheme corresponding to the project to be scheduled include: In the encoder of the first resource-constrained project scheduling model, the mask information and current key status information corresponding to the project to be scheduled are determined based on the ratio between the resource amount required by the project task and the total resource amount, as well as the time required by the project task. In the decoder of the first resource-constrained project scheduling model, a special text node is used to store the decoding context information. Combining graph features and current key state information, an attention mechanism is used to calculate the probability of all nodes being selected in the current decision step. Based on the probability of all nodes being selected in the current decision step, the initial scheduling scheme corresponding to the project to be scheduled is determined. 3.The method of claim 1, wherein, The steps for training a first-level resource-constrained project scheduling model include: The initial environmental reward of the first resource-constrained project scheduling model is a critical path-based reward mechanism, which is as follows: , in, At time t, in state In the case of performing an action The reward Let t be the maximum completion time estimated based on the critical path. At time t+1 The increase.
4. The resource-constrained project scheduling method considering decision preferences according to claim 1, characterized in that, The steps for training a first-level resource-constrained project scheduling model include: The PPO-clip algorithm is used to clip the objective loss function of the first resource-constrained project scheduling model to limit the difference between the new and old strategies, thereby controlling the update step size.
5. The resource-constrained project scheduling method considering decision preferences according to claim 1, characterized in that, The steps of converting the scoring results into execution rewards corresponding to each project task based on a preset reward model, and training a second resource-constrained project scheduling model based on the execution rewards from the first resource-constrained project scheduling model, include: The reward for completing each project task is: , in, For critical path-based rewards, The reward for user feedback based on project task i is represented as: , in, , , These are the task completion time reward, the start time slack reward, and the available resources reward at the start of the task. The calculation formula is as follows: , , , in, To show the completion time of task i in the Gantt chart for evaluation by the project manager. The completion time of task i is calculated for the first resource-constrained project scheduling model. Assess the project manager's satisfaction score regarding the completion time of task i. To demonstrate the start-up time slack for task i to the project manager for evaluation. The start time slack is calculated for task i in the first resource-constrained project scheduling model. Assess the project manager's satisfaction score for the start-up slack of task i. To demonstrate to the project manager the amount of available resources at the start time of task i, which is being evaluated. The available resources at the start time of task i, calculated for the first resource-constrained project scheduling model. Assess the project manager's satisfaction score regarding the availability of resources at the start time of task i. , as well as This is the weighting coefficient for each type of feedback, used to adjust the critical path-based reward mechanism and the balance between various feedback rewards.
6. A resource-constrained project scheduling device that considers decision-making preferences, characterized in that, include: The task information acquisition module is configured to respond to resource-constrained project scheduling instructions and acquire the current project to be scheduled and its corresponding project task information set. Each project task information set contains one or any combination of the following: the ratio between the resource amount required by the project task and the total resource amount, the time required by the project task, and the adjacency matrix of the immediate preceding and following relationships of each task in the project task. The evaluation and scoring module is configured to generate an initial scheduling scheme for the projects to be scheduled using a pre-trained first resource-constrained project scheduling model. This includes: determining the ratio between the resource requirement of each project task and the total resource quantity, as well as the time required for each project task; determining the project task information set based on the ratio of the resource requirement to the total resource quantity and the time required for each project task; decoding the project task information set to determine the initial scheduling scheme corresponding to the projects to be scheduled; and evaluating and scoring the project task completion time, start time slack, and available resource quantity at the start time for each project task in the initial scheduling scheme according to decision preferences to determine the scoring result. The reward update module is configured to convert the scoring results into execution rewards corresponding to each project task based on a preset reward model, and to train a second resource-constrained project scheduling model based on the execution rewards from the first resource-constrained project scheduling model. The scheduling scheme determination module is configured to input the project to be scheduled into the second resource-constrained project scheduling model to generate a new scheduling scheme embedded with decision preferences, and repeat the process until a satisfactory scheduling scheme is output to complete the scheduling of the resource-constrained project.
7. An electronic device comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 5, which, when invoked by a computer, executes the steps included in the corresponding method.
Citation Information
Patent Citations
A multi-skill personnel scheduling method in a research and development project combination
CN109636205A
Load aggregator optimal scheduling method considering user multivariate response characteristics
CN113554354A