A MRP parallel operation method, device and medium based on parameter decoupling
By adopting a parallel operation method based on parameter decoupling and a parallel BOM structure in MRP operations, the time-consuming and labor-consuming problem caused by serial computing in traditional MRP operations is solved, and efficient calculations are achieved and the total amount of operations is reduced.
Patent Information
- Application Number
- CN202411204196.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-08-30
AI Technical Summary
Traditional MRP operations adopt serial computing, which causes time-consuming and labor-consuming and reduces production efficiency.
A MRP parallel computing method based on parameter decoupling is proposed. By constructing a parallel BOM structure, the computing tasks of the child layer are split and parallel computing are performed, and tasks are allocated and executed using a multi-core processor.
Decoupling of constant parameters and variable parameters is achieved, avoiding operation redundancy, reducing the total amount of MRP operations, improving the computing efficiency, and making the end time of all threads as the same as possible.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method, device and medium for parallel operation of MRP based on parameter decoupling. Background Art
[0002] Material Requirement Planning (MRP) is a method of preparing production operation plans using electronic computers, which is suitable for batch production. It formulates material requirement plans based on information such as the master production schedule (MPS), inventory plan, and bill of materials (BOM).
[0003] Material Requirements Planning is referred to as MRP operation. It is the core functional module of production management business in ERP system. It is based on the master production plan and receives production orders and purchase orders. MRP operation follows certain operation methods (operation logic and algorithm rules). Operation logic and algorithm rules are key factors that directly affect the total amount and operation time of MRP operation.
[0004] However, traditional MRP operations all use serial calculations, and the calculation logic is encapsulated in one package. Whenever there is a new MRP calculation task, a single-threaded method is used to perform the entire calculation process from beginning to end without distinguishing variables, which is time-consuming and labor-intensive, and reduces production efficiency. Summary of the invention
[0005] In order to solve the above problems, this application proposes an MRP parallel operation method based on parameter decoupling, including:
[0006] For MRP operation, determine the operation modes included therein and the operation parameters included in each operation mode; wherein the operation modes include period operation and quantity operation; the operation parameters include constant parameters and variable parameters;
[0007] Constructing a parallel BOM structure, determining a plurality of parent components contained in the parallel BOM structure, and a plurality of child components contained in each parent component, so as to allocate independent computing tasks to a single child component in a single computing phase, thereby executing the computing tasks in the child component in parallel;
[0008] Based on the first constant parameter that has been obtained, a constant operation phase is executed to generate multiple operation tasks, and the required second constant parameter is calculated and stored in a database to achieve decoupling of the constant parameter and the variable parameter;
[0009] Executing a variable operation phase based on the first variable parameter that has been acquired and the second constant parameter in the database, generating a plurality of operation tasks, and calculating and obtaining the required second variable parameter;
[0010] A post-processing operation phase is performed based on the second variable parameters corresponding to the period operation and the quantity operation, and a plurality of operation tasks are generated to implement the MRP operation.
[0011] On the other hand, the present application also proposes an MRP parallel computing device based on parameter decoupling, comprising:
[0012] at least one processor; and,
[0013] a memory communicatively connected to the at least one processor; wherein,
[0014] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: the MRP parallel operation method based on parameter decoupling described in the above example.
[0015] On the other hand, the present application also proposes a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as: the MRP parallel operation method based on parameter decoupling described in the above example.
[0016] The MRP parallel operation method based on parameter decoupling proposed in this application can bring the following beneficial effects:
[0017] In the MRP operation process, the constant parameters are decoupled from the variable parameters, and the constant operation stage adopts the step-by-step expansion formula to calculate the absolute lead time in the operation result. And material unit quota The data is stored in the database. If the BOM does not change, it can be directly called multiple times by subsequent MRP operations without repeated operations, thus avoiding redundant operations and reducing the total amount of MRP operations. And material unit quota After that, the demand date of all materials can be obtained in one step without the need to expand step by step. and gross demand , the operation logic is simple and the amount of calculation is small.
[0018] The total number of computing tasks at the sub-component layer is split and parallelized to improve computing efficiency. Taking a multi-core processor as an example, its computing task allocation adopts a relatively even distribution and random grouping method, and reserves processing cores as free items to correct the shortcomings of other threads, so that the end time of all threads is as similar as possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part 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 an improper limitation on the present application. In the drawings:
[0020] Figure 1 It is a flowchart of the MRP parallel operation method based on parameter decoupling in an embodiment of the present application;
[0021] Figure 2 This is a schematic diagram of a traditional step-by-step expansion MRP calculation method in one embodiment of the present application;
[0022] Figure 3 This is a schematic diagram of a parallel BOM structure in one case of an embodiment of the present application;
[0023] Figure 4 This is a schematic diagram of a process of splitting a computing task in one scenario of an embodiment of the present application;
[0024] Figure 5 This is a schematic diagram of each stage of the MRP parallel operation method based on parameter decoupling in one embodiment of the present application;
[0025] Figure 6 This is an overall flow chart of MRP operation in one embodiment of the present application;
[0026] Figure 7 Schematic diagram of an MRP parallel computing device based on parameter decoupling in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0028] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0029] like Figure 1 As shown, the embodiment of the present application provides an MRP parallel operation method based on parameter decoupling, including:
[0030] S101: For MRP operation, determine the operation modes included therein and the operation parameters included in each operation mode; wherein the operation modes include period operation and quantity operation; and the operation parameters include constant parameters and variable parameters.
[0031] Period calculations are mainly used to calculate dates (including start date, completion date, material requirement date, etc.), while quantity calculations are mainly used to calculate quantities (including planned quantity, available material inventory, etc.).
[0032] like Figure 2 As shown in the figure, the input of period operation is the tree BOM structure, material requirement lead time (Lead Time, LT), master production plan start date and completion date, and the output is material requirement date (Material Requirement Date, MRD). The input of quantity operation is the tree BOM structure, the corresponding proportional relationship between parent parts and child parts (referred to as the proportional relationship or proportional relationship between parent and child parts), the planned quantity of the master production plan, available stock of material (Available Stock of Material, ASM), logistics batch rules (Lot-sizing Rules, LSR), stock rules (Stock Rules, SR), and the output is gross material requirement (Gross Quantity of Material Required, GQMR), theoretical net material requirement (Theoretical Net Quantity of Material Required, TNQMR), actual net material requirement (Actual Net Quantity of Material Required, ANQMR).
[0033] like Figure 2 As shown, in traditional MRP operations, the operation logic is packaged in one package, and the operation process does not distinguish between constant operations and variable operations.
[0034] Specifically, for period calculation, it solves the material requirement date of each layer in the BOM structure. From the perspective of material production organization, the material requirement lead time LT mainly includes the time of production, testing, transportation, in / out of warehouse, etc. It is the time difference between the material requirement date MRD and the material commissioning date CD (Commissioning Date).
[0035] Parent material requirement date Equal to the parent item's production date Lead time with parent item The sum of is shown in formula (1):
[0036] Formula (1).
[0037] Parent part production date Equal to the component material requirement date , as shown in formula (2):
[0038] Formula (2).
[0039] Combining formula (1) and formula (2), we can get the relationship between the material demand date of the parent part and the child part, and the lead time of the parent part, as shown in formula (3):
[0040] Formula (3)
[0041] Formula (3) is transformed by shifting terms to obtain formula (4):
[0042] Formula (4).
[0043] Therefore, when the requirement date of the first-level material in the BOM structure is determined After the completion date of the master production plan is obtained, according to the traditional step-by-step expansion method, the material demand lead time LT of each level in the BOM structure is calculated step by step using formula (4) to obtain the demand date MRD of each level of materials. The calculation logic is shown in formula (5):
[0044] ;
[0045] ;
[0046] ;
[0047] …
[0048] ;
[0049] ...Formula (5).
[0050] In formula (5), i is determined by the level of the material. , They respectively represent the demand date and parent item lead time of the material at the i-th level.
[0051] For quantity calculation, it solves the demand quantity of each layer of materials in the BOM structure by calculating the material gross demand in sequence under the constraints of batch rule LSR and inventory rule SR. , Theoretical Net Material Requirement , Actual Net Material Requirement .
[0052] Among them, the material gross demand GQMR is determined by the proportional relationship between the parent and child parts. Determine, as shown in formula (6):
[0053] Formula (6).
[0054] in, and The material gross requirements for the sub-items and parent items are , recorded as the gross demand for the first-level material in the BOM structure, that is, the planned quantity of the master production plan. It is the quantity ratio of the i-th level component material to the i-1-th level parent component material.
[0055] Theoretical Net Material Requirement Available inventory of materials Determine, as shown in formula (7):
[0056] Formula (7).
[0057] Available stock is determined by the stock quantity (Stock of Material), expected receipts Expected to Receiving (Expect to Shipping) decision, as shown in formula (8):
[0058] Formula (8).
[0059] Expected revenue Including the quantity of materials involved in the purchase plan, purchase orders in transit, purchases received and waiting for quality inspection and storage, master production plan quantity, production orders in process, and production orders completed and waiting for quality inspection and storage, etc., and the expected delivery time It includes the quantity of materials involved in production plan gross demand, production order gross demand, sales plan quantity, sales order quantity not yet shipped, etc.
[0060] Actual net material demand Derived from theoretical net material demand , but is subject to the constraints of batch rule LSR and inventory rule SR, that is, the net material demand is the theoretical net material requirement The solution under the dual constraints of LSR and SR is shown in formula (9):
[0061] Formula (9).
[0062] Based on this, we can know that the traditional step-by-step expansion MRP operation, after entering all the information, obtains the material demand date through certain operation logic and algorithm rules. and actual material net requirements Each MRP operation starts from the first-level BOM, traverses sequentially, and calculates serially.
[0063] S102: Construct a parallel BOM structure, determine multiple parent components contained in the parallel BOM structure, and multiple child components contained in each parent component, so as to allocate independent computing tasks to a single child component in a single computing stage, thereby executing the computing tasks in the child component in parallel.
[0064] In order to solve the time-consuming and labor-intensive problem caused by serial calculations in traditional solutions, the BOM structure is adjusted here to change it into a parallel BOM structure to achieve parallel calculations.
[0065] like Figure 3 As shown in the figure, the parallel BOM structure includes a parent component layer and a child component layer, each of which includes multiple parent components and multiple child components. The parent component layer has a total of i parts, including Each parent item corresponds to m, n, ..., k child items, with the parent item For example, its sub-components are .
[0066] Each parent The number of corresponding sub-components is recorded as , the operation process of each sub-component is recorded as an independent task, then the parent component correspond independent computing tasks, so the total number of independent computing tasks at the sub-component layer is .
[0067] Based on this, in order to realize parallel computing, all computing tasks need to be grouped so as to allocate the tasks of each group for parallel computing.
[0068] Specifically, based on the running device of the MRP operation, determine the corresponding number of parallel executions. The total number of computing tasks at the sub-component layer is split and assigned to a multi-core processor (that is, the running device of the MRP operation) for parallel computing. The multi-core processor includes but is not limited to 4-core, 6-core, 8-core, 16-core processors, etc. The number of cores depends on the complexity of the computing task. For example, to calculate a complex industrial product with a total of 13 layers in the BOM structure, a 16-core processor is selected. At this time, the number of processor cores (that is, the number of processing cores) is used as the number of parallel executions and is recorded as .
[0069] like Figure 4 As shown in the figure, in the splitting and parallel computing steps of the computing tasks, first, according to the number of processor cores Divide equally and round up, and based on the number of parallel executions and the total number of sub-components, get the number of tasks selected for a single group, that is, However, considering that there may be some emergencies in actual work, it is necessary to reserve some spare processing cores as free items to deal with emergencies or balance the computing tasks in the current processing state.
[0070] Based on this, the number of parallel executions and the preset number of standby executions (for example, the preset number of standby executions is set to 1) are subtracted, and the number of tasks selected for a single group is obtained by rounding up based on the result of dividing the total number of sub-components by the difference, that is, .
[0071] Then, based on the Monte Carlo algorithm, multiple rounds of selection are performed to randomly select the parent part in each round of selection until the number of all child parts of the selected parent part reaches the number of task selections, that is, , complete the selection of this round, take all the child parts selected in this round as a single group, record it as Group 1, and continue to select from the remaining unselected parent parts until all parent parts are selected, and get Group 2, Group 3, Group 4, Group 5, Group 6, Group 7, Group 8, Group 9, Group 10, Group 11, Group 12, Group 13, Group 14, Group 15, Group 16, Group 17, Group 18 group, at this time, the remaining parent item is used as the Group, completing the selection of the parent item.
[0072] Then divide each group, that is, The group computing tasks are respectively assigned to different processing cores of the running device to execute all the groups simultaneously, thereby realizing parallel processing of computing tasks of the subcomponents in the group.
[0073] If a free item, that is, a spare processing core, is set, the first processing core that has been assigned a group and the second processing core that is a spare can be determined. For example, the remaining 1-core processor is set as a free item to make up for the short board.
[0074] Because the parent items are grouped randomly, the amount of computing tasks in each group is not exactly the same, and the computing time of each group of tasks is also different, making it difficult to guarantee The parallel calculations of the two groups are completed at the same time, and even a large gap may occur, resulting in the bucket effect. The group that completes the calculation last determines the total calculation time.
[0075] Therefore, for each second processing core, among all the current first processing cores, a designated processing core with the highest amount of computing tasks to be processed is determined, and a single parent component is selected in the designated processing core so that it can execute the computing tasks of all child components in the selected single parent component.
[0076] For example, reserve 1 core as a free item and always calculate the previous The group with the largest amount of tasks in the group aims to correct The short board of the group makes the front The end time of the group calculation tasks should be as similar as possible. The group with the largest amount of tasks in the group randomly selects a parent component and calculates the computing tasks of its child components.
[0077] Furthermore, if there is already a set number of spare executions, the number can be directly used. If not, the number of child components corresponding to each parent component is determined, and a frequency histogram is drawn based on the number of child components. In the drawn frequency histogram, the frequency of occurrence of the number of different child components is marked.
[0078] Based on the frequency histogram, determine the degree of balance of the number of child components corresponding to the parent component. For example, determine the concentration based on the frequency histogram. If most of the data is concentrated in the number of a few child components, and the difference between the number of several child components in the concentration is not large, it means that the number of child components of most parent components is relatively close, and the degree of balance is high.
[0079] At this time, the number of standby executions is determined according to the degree of balance, wherein the more unbalanced the degree of balance is, the greater the difference between the concentrated numbers is, or the number of concentrated numbers is not, which means that in the process of allocating computing tasks, the number of computing tasks in different processing cores is more likely to differ greatly, and at this time, the number of standby executions is higher. Of course, there can be a preset upper limit for the number of standby executions, for example, set to 2~3.
[0080] Here, the entire MRP operation is divided into a constant operation stage, a variable operation stage, and a post-processing operation stage. In each operation stage, parallel calculation can be performed through a parallel BOM structure.
[0081] Of course, if it is determined that the operation tasks of all sub-components have been completed in the MRP operation of the current level, the sub-component layer in the parallel BOM structure of the current level will be used as the parent layer in the parallel BOM structure of the next level to facilitate the execution of the MRP operation of the next level.
[0082] S103: Execute a constant operation phase based on the acquired first constant parameter, generate multiple operation tasks, calculate and obtain the required second constant parameter and store it in a database to achieve decoupling of the constant parameter and the variable parameter.
[0083] Generally speaking, when performing MRP calculations, some parameters can be obtained, which are called first constant parameters and first variable parameters, and MRP calculations are performed through these parameters. The constant parameters are calculated first, and their results are stored. When performing variable parameters later, there is no need to recalculate them, and they can be directly retrieved from the database, thereby achieving the decoupling of constant parameters and variable parameters.
[0084] Specifically, Figure 5 As shown, the constant operation phase is performed first. Since the operation method includes period operation and quantity operation, separate calculations are also required.
[0085] For period calculation, the acquired parallel BOM structure and material demand lead time at each level are calculated. As input, the absolute lead time between the material's demand date and the delivered product's demand date is taken as output, the constant operation phase is performed recursively, and the output result of the period operation is stored in the database.
[0086] For different materials, the output is the demand date of material i The required date of the delivered product Absolute lead time (Absolute Lead Time), which can be solved by recursion from formula (5). After simplifying formula (5), it can be shown as formula (10) and formula (11):
[0087] Formula (10);
[0088] Formula (11).
[0089] For quantity calculation, the obtained parallel BOM structure, the corresponding proportional relationship between the parent part and the child part As input, the single unit quota of the material is taken as output, the constant operation stage is performed based on recursion, and the output result of the quantity operation is stored in the database.
[0090] For different materials i, the output can be solved by formula (6) through recursive method to obtain the material gross demand: The relationship between the gross demand of the master production plan quantity. After simplifying formula (6), it can be shown as formula (12):
[0091] Formula (12).
[0092] Among them, the single quota of materials As shown in formula (13):
[0093] Formula (13).
[0094] After the constant operation phase is completed, the required second constant parameter will be calculated: absolute lead time And the single quota of materials Stored in the database for subsequent MRP calculations.
[0095] S104: executing a variable operation phase based on the acquired first variable parameter and the second constant parameter in the database, generating a plurality of operation tasks, and calculating and obtaining the required second variable parameter.
[0096] like Figure 5 As shown in the figure, for period calculation, the start time and completion time in the master production plan that have been obtained, as well as the absolute lead time in the database As input, the material requirement date as output , as shown in formula (14):
[0097] Formula (14).
[0098] For quantity calculation, the planned quantity of the master production plan obtained is , and the single unit quota of the materials in the database As input, the material gross demand As the output, as shown in formula (15):
[0099] Formula (15).
[0100] Gross material requirements It can be solved directly by formula (15), which is simple and clear, without the need to use formula (6) for step-by-step expansion.
[0101] S105: Execute a post-processing operation phase based on the second variable parameters corresponding to the period operation and the quantity operation, respectively, to generate a plurality of operation tasks to implement the MRP operation.
[0102] In the post-processing calculation stage of the period calculation and quantity calculation results, the actual material net demand ANQMR is calculated through batch rules and inventory rules, and the purchase order and production order are generated through calculations such as order combination rules, batch combination rules, and purchase / self-made types.
[0103] like Figure 5 As shown, the material gross demand , and the available material inventory ASM obtained as input, the theoretical material net demand As output, it can be shown as formula (7).
[0104] Theoretical Net Material Requirement , and the preset constraint rules (batch rule LSR, inventory rule SR) as input, the actual material net demand As output, it can be shown as formula (9).
[0105] In the MRP operation process, the constant parameters are decoupled from the variable parameters, and the constant operation stage adopts the step-by-step expansion formula to calculate the absolute lead time in the operation result. And material unit quota The data is stored in the database. If the BOM does not change, it can be directly called multiple times by subsequent MRP operations without repeated operations, thus avoiding redundant operations and reducing the total amount of MRP operations. And material unit quota After that, the demand date of all materials can be obtained in one step without the need to expand step by step. and gross demand , the operation logic is simple and the amount of calculation is small.
[0106] The total number of computing tasks at the sub-component layer is split and parallelized to improve computing efficiency. Taking a multi-core processor as an example, its computing task allocation adopts a relatively even distribution and random grouping method, and reserves processing cores as free items to correct the shortcomings of other threads, so that the end time of all threads is as similar as possible.
[0107] In addition, before the variable operation stage, the relevant constants can be called from the ROM database to the RAM database, thereby eliminating the preparation time and shortening the calculation time.
[0108] In one embodiment, Figure 6 As shown in the figure, the traditional MRP operation has been split after the decoupling of constant operation and variable operation. Among them, the constant operation is related to the material demand lead time and the proportional relationship between the parent and child parts, and has nothing to do with the specific production plan and the change of the production plan. Therefore, it can be operated during idle time, and the operation results are stored in the ROM database for call. Constant call and variable operation are related to production plan and production plan change, batch rules / inventory rules, order combination rules / batch combination rules, self-made / purchased types, etc., and are performed during busy time.
[0109] Specifically, if there is a new MRP operation, or the first constant parameter of the existing MRP operation has been updated, a constant operation phase is added, and it is determined that the current state is an idle state.
[0110] If the constant operation stage has been calculated, the content stored in the ROM database in the constant operation stage is called and stored in the RAM database, and the variable operation stage and / or post-processing operation stage are added, and it is determined that the current busy state is in progress.
[0111] Compared with variable calculation, constant call is equivalent to preliminary preparation. Before the sub-layer parallel calculation, the relevant constant data is called out from the ROM database and stored in RAM for variable calculation. Therefore, for the MRP calculation of the sub-layer, the preparation time is erased. Looking at the calculation of each layer of MRP, the preparation time of each layer is erased, which further shortens the total calculation time of MRP.
[0112] like Figure 7 As shown, the embodiment of the present application also provides an MRP parallel computing device based on parameter decoupling, including:
[0113] at least one processor; and,
[0114] a memory communicatively connected to the at least one processor; wherein,
[0115] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: the MRP parallel operation method based on parameter decoupling described in any of the above embodiments.
[0116] An embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to be: the MRP parallel operation method based on parameter decoupling described in any of the above embodiments.
[0117] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0118] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0119] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0120] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0123] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0124] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0125] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0126] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0127] The above is only an 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 changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A MRP parallel operation method based on parameter decoupling, characterized in that: include: For MRP operation, determine the operation modes and operation parameters contained in each operation mode; wherein the operation modes include period operation and quantity operation; the operation parameters include constant parameters and variable parameters; wherein the period operation is used to perform corresponding calculations on dates, and the quantity operation is used to perform corresponding calculations on quantities; Constructing a parallel BOM structure, determining a plurality of parent components contained in the parallel BOM structure, and a plurality of child components contained in each parent component, so as to allocate independent computing tasks to a single child component in a single computing phase, thereby executing the computing tasks in the child component in parallel; Based on the first constant parameter that has been obtained, a constant operation phase is executed to generate multiple operation tasks, and the required second constant parameter is calculated and stored in a database to achieve decoupling of the constant parameter and the variable parameter; Executing a variable operation phase based on the first variable parameter that has been acquired and the second constant parameter in the database, generating a plurality of operation tasks, and calculating and obtaining the required second variable parameter; Performing a post-processing operation phase based on the second variable parameters corresponding to the period operation and the quantity operation, respectively, to generate a plurality of operation tasks to implement the MRP operation; Based on the acquired first constant parameter, a constant operation phase is executed to generate multiple operation tasks, and the required second constant parameter is calculated and stored in the database, specifically including: For the period operation, the obtained parallel BOM structure and the material demand lead time of each level are taken as input, the absolute lead time between the material demand date and the demand date of the delivered product is taken as output, the constant operation phase is performed based on a recursive method, and the output result is stored in the database; For the quantity operation, the obtained parallel BOM structure and the corresponding proportional relationship between the parent part and the child part are used as input, the single quota of the material is used as output, the constant operation stage is performed based on a recursive method, and the output result is stored in the database; Executing a variable operation phase based on the acquired first variable parameter and the second constant parameter in the database, generating multiple operation tasks, and calculating the required second variable parameter, specifically includes: For the period operation, the start time and completion time in the master production plan and the absolute lead time in the database are used as input, and the material requirement date is used as output to execute the variable operation stage; For the quantity operation, the planned quantity of the master production plan and the single unit quota of the material in the database are used as input, and the gross material demand is used as output to execute the variable operation stage; A post-processing operation phase is performed based on the second variable parameters corresponding to the period operation and the quantity operation, and a plurality of operation tasks are generated to implement the MRP operation, specifically including: The gross material demand and the acquired available material inventory are taken as input, and the theoretical net material demand is taken as output; the theoretical net material demand and preset constraint rules are taken as input, and the actual net material demand is taken as output to implement the MRP operation.
2. The method according to claim 1, characterized in that The parallel BOM structure includes a parent component layer and a child component layer, each including multiple parent components and multiple child components; In a single operation phase, an independent operation task is assigned to a single component, so that the operation tasks in the component are executed in parallel, specifically including: Based on the running equipment of MRP operation, determine the corresponding parallel execution quantity; Based on the parallel execution quantity and the total quantity of the sub-components, the number of selected tasks for a single group is obtained; Based on the Monte Carlo algorithm, multiple rounds of selection are performed to randomly select parent parts in each round of selection until the number of all child parts of the selected parent parts reaches the number of tasks to be selected, and the selection of this round is completed. All child parts selected in this round are grouped as a single group, and selection continues from the remaining unselected parent parts until all parent parts are selected; Each group is assigned to a different processing core of the operating device to execute all the groups simultaneously, thereby achieving parallel processing of the computing tasks of the sub-components in the group.
3. The method according to claim 2, characterized in that Based on the parallel execution quantity and the total quantity of the sub-components, the number of selected tasks for a single group is obtained, specifically including: The parallel execution quantity and the preset standby execution quantity are subtracted, and based on the result of dividing the total quantity of the components by the difference, the number of selected tasks for a single group is obtained by rounding up; The method further comprises: determining a first processing core to which packets have been assigned, and a second processing core as a backup; For each second processing core, among all the current first processing cores, a designated processing core with the highest amount of computing tasks to be processed is determined, and a single parent component is selected in the designated processing core so that it can execute the computing tasks of all child components in the selected single parent component.
4. The method according to claim 3, characterized in that Before subtracting the parallel execution quantity from the preset standby execution quantity, the method further includes: Determine whether there is a set number of spare executions; If not, determine the number of child items corresponding to each parent item and draw a frequency histogram based on the number of child items; Based on the frequency histogram, determining the degree of balance of the number of child parts corresponding to the parent part; The number of standby executions is determined according to the balance degree, wherein the more unbalanced the balance degree is, the higher the number of standby executions is, and there is a preset upper limit to the number of standby executions.
5. The method according to claim 2, characterized in that: The method further comprises: Make sure that all sub-component calculation tasks have been completed in the current level of MRP calculation; The sub-component layer in the parallel BOM structure of the current level is used as the parent component layer in the parallel BOM structure of the next level, so as to perform the MRP operation of the next level.
6. The method according to claim 1, characterized in that In a single operation phase, before allocating an independent operation task to a single component, the method further includes: If there is a new MRP operation, or the first constant parameter of the existing MRP operation has been updated, then a constant operation phase is added, and it is determined that the current state is idle; If the constant operation phase has been calculated, the content stored in the ROM database in the constant operation phase is called and stored in the RAM database, and a variable operation phase and / or a post-processing operation phase is added, and it is determined that the current state is busy.
7. An MRP parallel computing device based on parameter decoupling, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: the MRP parallel operation method based on parameter decoupling as described in any one of claims 1 to 6.
8. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are set to: the MRP parallel operation method based on parameter decoupling as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Material data processing method and electronic equipment
CN115187180A
Material demand calculation method, system and related device
CN116341842A