Supply chain inventory optimization method and system, storage medium and program product
By grouping parts by supplier characteristics and using genetic algorithms to optimize inventory levels, combining multi-sub populations and fitness value exchange mechanisms, the problems of inventory management accuracy and efficiency caused by fluctuations in supplier delivery capabilities in supply chain inventory management are solved, and global optimization of inventory levels and balanced cost service levels are achieved.
Patent Information
- Application Number
- CN202510854619.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-25
AI Technical Summary
It is difficult for existing supply chain inventory management to adjust inventory strategies in a timely manner when suppliers' delivery capabilities fluctuate, resulting in low accuracy and efficiency of inventory management, and prone to inventory backlog or insufficient problems.
By grouping parts by supplier characteristics, using genetic algorithms to optimize inventory levels, using multi-sper population and fitness value exchange mechanism, combining fitness value sorting and variation operations, the inventory level is optimized to adapt to the supply characteristics of different suppliers, and chromosome encoding is constrained by historical data to calculate the quantitative ratio of inventory cost to out-of-stock cost.
It improves the accuracy and practicality of inventory optimization, ensures that the inventory level balances costs and service levels within a global scope, avoids local optimal solutions, enhances population diversity and convergence, and improves the optimization efficiency and practicality of results.
Smart Images

Figure CN120374017A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of inventory optimization, and particularly relates to a supply chain inventory optimization method, system, storage medium, and program product. Background Art
[0002] In the existing supply chain inventory management, enterprises usually need to optimize inventory according to multi-dimensional factors such as market demand, supplier production capacity, and logistics conditions to balance inventory costs and supply efficiency. However, due to the complexity and dynamics of the supply chain, it is often difficult for enterprises to accurately grasp the best balance point of inventory management, and it is easy to have the situation of inventory backlog or insufficient inventory, resulting in problems such as excessive capital occupation or inability to respond to customer needs in a timely manner.
[0003] In the related art, future demand can be predicted by collecting historical inventory data and sales data and using a time series analysis model, and an inventory replenishment plan can be formulated accordingly. This method improves the scientific nature of inventory management to a certain extent and reduces inventory costs.
[0004] However, when the supplier delivery ability fluctuates, the prediction model based solely on historical data is difficult to adjust the inventory strategy in a timely manner, which may lead to a deviation between the inventory management decision and the actual market situation, reducing the accuracy and efficiency of supply chain inventory control management. Summary of the Invention
[0005] This application provides a supply chain inventory optimization method, system, storage medium, and program product for improving the accuracy and efficiency of supply chain inventory control management.
[0006] In the first aspect, this application provides a supply chain inventory optimization method, which classifies components according to the grouping information of the components to obtain a number of supplier groups, and each supplier group contains suppliers with similar supply characteristics; Based on a preset chromosome coding rule, an initial population is generated for the components in each supplier group, and each chromosome contains the target inventory level coding of each component within the supplier group; For each supplier group, the population corresponding to each supplier group is divided into multiple sub-populations; Based on a preset fitness function, the fitness value of each chromosome within each sub-population is calculated; The chromosomes in each sub-population are sorted in ascending order of fitness value, and the chromosomes with the top preset proportion of fitness values are selected as the parental chromosomes; A crossover operation is performed on the parental chromosomes to generate offspring chromosomes containing new inventory level combinations; The offspring chromosomes are subjected to a mutation operation according to a preset mutation probability to obtain the mutated offspring chromosomes; Compare the chromosomes with the minimum fitness values in each sub-population within the same supplier group in the preset algebraic interval, copy the chromosome with the minimum fitness value to other sub-populations, replace the chromosome with the maximum fitness value in other sub-populations, and update each sub-population. When the number of iterations reaches the preset threshold, select the chromosome with the minimum fitness value from the final population of each supplier group and decode it to obtain the optimal inventory level value of the components within the corresponding supplier group.
[0007] By adopting the above technical solution, the components are grouped according to supplier characteristics, and the genetic algorithm is used to optimize the inventory level within each supplier group, enabling components with similar supply characteristics to be optimized collaboratively. During the optimization process, the population is divided into multiple sub-populations and an inter-population interaction mechanism is introduced. Information sharing is achieved among sub-populations through the exchange of chromosomes with the minimum fitness value, avoiding being trapped in local optimal solutions. The parent selection strategy based on fitness value ranking and the mutation operation with a preset mutation probability are adopted to improve the diversity and convergence of the population. This grouping optimization method not only considers the differences in supplier characteristics but also expands the solution space through information interaction among sub-populations. The final obtained inventory level can not only adapt to the supply characteristics of different suppliers but also achieve the balance of inventory cost and service level globally, improving the accuracy and practicality of inventory optimization.
[0008] Combined with some embodiments of the first aspect, in some embodiments, based on the preset chromosome encoding rule, an initial population is generated for the components in each supplier group, which specifically includes: Obtain the historical inventory data, current inventory quantity, and production plan demand quantity of each component within the supplier group; Calculate the average consumption and standard deviation of each component according to the historical inventory data, and set the constraint range of the maximum inventory level and the minimum inventory level; Randomly generate a preset number of chromosomes within the constraint range using the normal distribution. Each chromosome contains the target inventory level encoding of each component; Conduct a feasibility test on the chromosomes. If the encoding of a chromosome exceeds the constraint range, regenerate it until an initial population that meets the constraint conditions is obtained.
[0009] By adopting the above technical solution, historical data is fully utilized when generating the initial population. The constraint range of the inventory level is set by calculating the average consumption and standard deviation, making the initial solution have practical business significance. The method of randomly generating chromosomes using the normal distribution makes the inventory level distribution in the initial population closer to the actual business scenario. Through the feasibility test, it is ensured that all chromosomes meet the constraint conditions, avoiding the generation of invalid solutions, improving the initial quality of the population, enabling the genetic algorithm to start searching from a more valuable solution space, accelerating the algorithm convergence speed, and enhancing the practicality of the final optimization result.
[0010] In some embodiments in combination with some embodiments of the first aspect, the preset fitness function is: ; In the above function, is the preset fitness function, and are the preset weight coefficients, is the total inventory cost, is the service level, is the penalty term, is the part 's unit holding cost, is the shortage cost, is the part 's demand, is the supplier delivery time constraint.
[0011] By adopting the above technical solution, the preset fitness function comprehensively considers three dimensions: total inventory cost, service level, and constraint penalty, and realizes the balance of multiple objectives through the preset weight coefficients. The total inventory cost item in the function includes the holding cost and the shortage cost. The service level item is calculated based on the ratio of the actual supply quantity to the demand quantity. The penalty term ensures the feasibility of the solution. This multi-dimensional fitness evaluation method accurately reflects the objective requirements of inventory optimization.
[0012] In some embodiments in combination with some embodiments of the first aspect, after obtaining the optimal inventory level values of the parts within the corresponding supplier group, the method further includes: Calculating the quantitative ratio of the inventory cost to the shortage cost according to the historical inventory data of each part; Constraining the initial population of each supplier group based on the quantitative ratio, and setting the upper and lower limits of the chromosome encoding; Dividing the upper and lower limits according to the quantitative ratio to generate the encoding mapping rule of the initial population; Correcting the initial population according to the encoding mapping rule.
[0013] By adopting the above technical solution, the quantitative ratio of the inventory cost to the shortage cost is calculated using historical data, and the constraint mechanism and mapping rule of the chromosome encoding are established. This encoding scheme based on the actual cost ratio makes the value space of the chromosome more in line with the business reality and avoids blind search. By dividing the encoding upper and lower limits according to the quantitative ratio and correcting the initial population accordingly, the inventory level combination in the population is closer to the actual operation requirements. This encoding constraint mechanism reduces the generation of invalid solutions, improves the quality of the population, enables the genetic algorithm to search in a more valuable solution space, and enhances the optimization efficiency and the practicality of the results.
[0014] In some embodiments in combination with some embodiments of the first aspect, the method for calculating the quantitative ratio of inventory cost to stock-out cost based on the historical inventory data of each component specifically includes: Statistically calculate the cumulative inventory backlog duration of each component based on the historical inventory data of each component; Record the number of stock-outs of each component and the impact duration of each stock-out; Convert the cumulative inventory backlog duration into an inventory cost value; Convert the number of stock-outs and the impact duration into a stock-out cost value; Calculate the ratio of the inventory cost value to the stock-out cost value to obtain the quantitative ratio of inventory cost to stock-out cost.
[0015] By adopting the above technical solution, by converting the historical inventory backlog duration and stock-out impact duration of components into specific cost values and calculating their quantitative ratio, two indicators, inventory cost and stock-out cost, which were originally difficult to directly compare, can be measured and balanced under the same standard. The cumulative inventory backlog duration reflects the actual situation of components occupying resources such as funds and space during the warehousing process, and the number of stock-outs and the impact duration reflect the actual loss degree caused by stock-outs to production operations. This quantitative method is more in line with the actual operation situation of enterprises. Based on this objective quantitative ratio, the inventory strategies of different components can be evaluated more accurately, a more reasonable balance point can be found between inventory cost and stock-out risk, and the scientificity and reliability of inventory optimization decisions are improved.
[0016] In some embodiments in combination with some embodiments of the first aspect, after correcting the initial population according to the coding mapping rule, the method further includes: Calculate the fitness value of each chromosome in the corrected initial population; Group the chromosomes according to the fitness value to obtain a dominant gene group and a recessive gene group; Extract characteristic gene fragments from the dominant gene group; Directly introduce the characteristic gene fragments into the chromosomes in the recessive gene group.
[0017] By adopting the above technical solution, the fitness values of each chromosome in the initial population after calculation and correction are grouped. Chromosomes with better performance are classified into the dominant gene group, and those with poorer performance are classified into the inferior gene group, distinguishing the superiority and inferiority of different chromosomes. Feature gene fragments are extracted from the dominant gene group and introduced into the chromosomes of the inferior gene group in a targeted manner, enabling the inferior gene group to obtain excellent features from the dominant gene group and improving the overall quality of the population. This targeted introduction method avoids the problem that traditional random crossover may destroy excellent gene combinations, ensuring that excellent gene fragments can be better transmitted and retained. By improving the population structure in this way, the evolution efficiency of the population is increased, the convergence speed of the algorithm is accelerated, and at the same time, due to the retention of excellent gene features, the quality of the finally obtained solution is also improved.
[0018] In combination with some embodiments of the first aspect, in some embodiments, extracting feature gene fragments from the dominant gene group specifically includes: Calculating the fitness values of each chromosome in the dominant gene group; Decoding the chromosome to obtain the gene locus values; Calculating the correlation coefficient between each gene locus value and the fitness value; Selecting the gene locus combinations with correlation coefficients greater than a preset threshold; Extracting the feature gene fragments where the gene locus combinations are located.
[0019] By adopting the above technical solution, by calculating the correlation coefficient between the gene locus values and the fitness values, a quantitative relationship between the chromosome coding and the optimization objective is established, and the key gene loci that have an important impact on the fitness value can be identified. Selecting the gene locus combinations with correlation coefficients greater than the preset threshold as the feature gene fragments ensures that the extracted gene fragments can indeed improve the population performance, and improves the solution efficiency and optimization effect of the genetic algorithm in the inventory optimization problem.
[0020] In a second aspect, an embodiment of the present application provides a supply chain inventory optimization system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, and the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the system to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0021] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, including instructions, which when running on the system, enable the system to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0022] Fourthly, an embodiment of the present application provides a computer program product. When the computer program product runs on a system, it enables the system to execute the method described in any possible implementation manner of the first aspect.
[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. The present application provides a supply chain inventory optimization method. By grouping parts according to supplier characteristics and using a genetic algorithm to optimize the inventory level within each supplier group, parts with similar supply characteristics can be optimized collaboratively. During the optimization process, the population is divided into multiple sub-populations and an inter-population interaction mechanism is introduced. Information sharing is achieved through the exchange of the chromosome with the minimum fitness value between sub-populations, avoiding falling into local optimal solutions. A parent selection strategy based on fitness value ranking and a mutation operation with a preset mutation probability are adopted to improve the diversity and convergence of the population. This grouping optimization method not only considers the differences in supplier characteristics but also expands the solution space through information interaction between sub-populations. The finally obtained inventory level can not only adapt to the supply characteristics of different suppliers but also achieve an equilibrium between inventory cost and service level globally, improving the accuracy and practicality of inventory optimization.
[0024] 2. The present application provides a supply chain inventory optimization method. By calculating the quantitative ratio of inventory cost and stockout cost using historical data, a constraint mechanism and mapping rules for chromosome coding are established. This coding scheme based on the actual cost ratio makes the value space of the chromosome more in line with business reality and avoids blind search. By dividing the upper and lower limits of the coding according to the quantitative ratio and correcting the initial population accordingly, the inventory level combinations in the population are closer to the actual operation requirements. This coding constraint mechanism reduces the generation of invalid solutions, improves the quality of the population, enables the genetic algorithm to search in a more valuable solution space, and enhances the optimization efficiency and the practicality of the results.
[0025] 3. The present application provides a supply chain inventory optimization method. By calculating the fitness values of each chromosome in the corrected initial population and grouping them, chromosomes with better performance are classified into the dominant gene group, and those with poorer performance are classified into the inferior gene group to distinguish the superiority and inferiority of different chromosomes. Characteristic gene fragments are extracted from the dominant gene group and introduced into the chromosomes of the inferior gene group in a targeted manner, enabling the inferior gene group to obtain excellent characteristics from the dominant gene group and improving the overall quality of the population. This targeted introduction method avoids the problem that traditional random crossover may destroy excellent gene combinations, ensuring that excellent gene fragments can be better transmitted and retained. By improving the population structure in this way, the evolution efficiency of the population is increased, the algorithm convergence speed is accelerated, and at the same time, the quality of the finally obtained solution is also improved due to the retention of excellent gene characteristics. Description of the Drawings
[0026] Figure 1 It is a schematic flow chart of a supply chain inventory optimization method in an embodiment of the present application.
[0027] Figure 2 It is a schematic flow chart of a population optimization method based on historical data in an embodiment of the present application.
[0028] Figure 3 It is a schematic structural diagram of an entity device of a supply chain inventory optimization system provided in an embodiment of the present application. Detailed implementation manners
[0029] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular forms "a", "an", "the", "above-mentioned", "said", and "this" are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations including one or more of the listed items.
[0030] Hereinafter, the terms "first" and "second" are only used for descriptive purposes, and cannot be construed as implying or indicating relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.
[0031] Next, an embodiment is used and combined with Figure 1 , to describe a supply chain inventory optimization method in an embodiment of the present application: Please refer to Figure 1 , which is a schematic flow chart of a supply chain inventory optimization method in an embodiment of the present application.
[0032] S101. Classify the components according to the grouping information to which the components belong to obtain a number of supplier groups; The system classifies components according to the grouping information of the components to which they belong, obtaining several supplier groups, and each supplier group contains suppliers with similar supply characteristics. In this step, the system classifies components according to the grouping information of the components to which they belong, thereby obtaining several supplier groups. Suppliers within each supplier group have similar supply characteristics, such as supply cycle, supply quantity, supply quality, etc. By grouping components, the inventory levels of each supplier group can be managed and optimized more precisely. In addition to grouping according to supplier characteristics, components can also be grouped according to other attributes of the components, such as the importance of the components, usage frequency, price, etc.
[0033] The system can classify components in a variety of ways. One specific implementation is that the system pre-sets classification rules for suppliers, such as dividing them into long-cycle suppliers, medium-cycle suppliers, and short-cycle suppliers according to the supply cycle. Then, the system divides each component into the corresponding supplier group according to the supplier information of each component. Another implementation is that the system automatically groups suppliers through a clustering algorithm. The system first extracts the feature vectors of each supplier, and then uses clustering algorithms such as k-means to divide suppliers with similar features into the same group.
[0034] S102. Generate an initial population for the components in each supplier group based on a preset chromosome encoding rule; The system generates an initial population for the components in each supplier group based on a preset chromosome encoding rule. Each chromosome contains the encoding of the target inventory levels of the components within the supplier group, specifically including: obtaining the historical inventory data, current inventory quantity, and production plan demand quantity of the components within the supplier group; calculating the average consumption and standard deviation of each component based on the historical inventory data, and setting the constraint range of the maximum inventory level and the minimum inventory level; randomly generating a preset number of chromosomes within the constraint range, and each chromosome contains the encoding of the target inventory levels of the components; conduct a feasibility test on the chromosomes. If the encoding of the chromosome exceeds the constraint range, regenerate it until an initial population that meets the constraint conditions is obtained.
[0035] The purpose of this step is to generate an initial population for the components in each supplier group, providing a basis for subsequent genetic algorithm optimization. The system first needs to preset a set of chromosome encoding rules to map the inventory level of each component to the genes on the chromosome. Common encoding methods include binary encoding, real number encoding, etc. After determining the encoding method, the system calculates the constraint range based on the historical inventory data, current inventory quantity, and production plan demand quantity of each component, and randomly generates the initial population within this range.
[0036] Specifically, the system can generate the initial population by following steps: First, obtain the historical inventory data of each component within the supplier group, and calculate its average consumption and the standard deviation of consumption; Then, based on the current inventory level and the production plan demand, set the maximum and minimum values of the inventory level of each component as the constraint range; Next, randomly generate a preset number of chromosomes within the constraint range, where each chromosome contains the inventory level encoding of all components within the supplier group; Finally, conduct a feasibility test on the generated chromosomes, and eliminate the chromosomes that do not meet the constraint conditions until an initial population that meets the requirements is obtained.
[0037] During the process of generating the initial population, it is possible that most of the randomly generated chromosomes do not meet the constraint conditions, resulting in difficulty in obtaining a sufficient number of feasible solutions. To address this issue, the system can introduce some heuristic rules, and tend to select levels closer to the median value of the constraint range when generating chromosomes, so as to improve the quality of the chromosomes. In addition, the system can also set some default initial inventory levels based on historical data and experience as part of the initial population to provide more diverse search starting points.
[0038] S103. For each supplier group, divide the population corresponding to each supplier group into multiple sub-populations; In this step, the system divides the initial population corresponding to each supplier group to obtain multiple sub-populations. The sub-populations are independent of each other during the evolution process, which helps to improve the diversity and search efficiency of the population. The number of sub-populations can be set according to the scale of the supplier group and the limitation of computing resources. The purpose of dividing the sub-populations is to control the computational complexity while ensuring the diversity of the population and avoiding slow algorithm convergence.
[0039] There are various specific methods for dividing the sub-populations, and the system can select an appropriate method according to the actual situation. A common approach is to cluster the population based on the similarity of chromosomes, and divide similar individuals into the same sub-population. The similarity can be measured by comparing metrics such as the Hamming distance or Euclidean distance of chromosome encodings. Another approach is to randomly divide the population into several sub-populations of equal size, ensuring that there are no obvious differences between the sub-populations.
[0040] S104. Calculate the fitness value of each chromosome within each sub-population based on a preset fitness function; The system calculates the fitness value of each chromosome within each sub-population based on a preset fitness function, where the preset fitness function is: ; In the above function, is the preset fitness function, and are the preset weight coefficients, is the total inventory cost, is the service level, is the penalty term, is the unit holding cost of the component, is the stockout cost, is the demand of the component, is the supplier delivery time constraint.
[0041] The purpose of this step is to evaluate the quality of chromosomes within each sub-population, providing a basis for subsequent genetic operations such as selection, crossover, and mutation. The system first needs to preset a fitness function to quantify the quality of the inventory level combination represented by the chromosomes. The fitness function needs to comprehensively consider multiple factors such as inventory cost, stockout risk, and service level, and obtain a value through weighted summation.
[0042] In this embodiment, the fitness function consists of three parts: total inventory cost, service level, and penalty term. Among them, the total inventory cost represents the sum of the holding cost and the stockout cost that the enterprise needs to pay to maintain the current inventory level; the service level represents the degree to which the current inventory level can meet customer demand, which is the ratio of the actual supply quantity to the demand quantity; the penalty term is used to punish chromosomes that violate the constraint conditions, such as the inventory level exceeding the storage capacity limit, etc. The system performs weighted summation on the three parts according to the preset weight coefficients to obtain the fitness value of the chromosome.
[0043] S105. Sort the chromosomes in each sub-population in ascending order of fitness value, and select the chromosomes with the top preset proportion of fitness values as the parental chromosomes; In this step, the system sorts the chromosomes in each sub-population according to the fitness value and selects the chromosomes with better fitness values as parental individuals for generating the next generation population. Generally speaking, the smaller the fitness value, the higher the quality of the chromosome. Therefore, the system sorts the chromosomes in ascending order of fitness value. Then, the system selects the top N% of the chromosomes as the parents according to the preset proportion parameter. The parental chromosomes will participate in subsequent crossover and mutation to generate new offspring chromosomes.
[0044] The selection ratio of parental chromosomes is an important parameter that directly affects the convergence speed and global search ability of the algorithm. If the selection ratio is too high, it means that only a few high-quality chromosomes can survive and be passed on to the next generation in each generation, and the diversity of the population will rapidly decline, and the algorithm is likely to fall into a local optimum; if the selection ratio is too low, it means that a large number of low-quality chromosomes can also enter the next generation, and the evolution speed of the population will become very slow. Therefore, the system needs to set an appropriate parental selection ratio according to the specific problem to balance the population diversity and the convergence speed.
[0045] S106. Perform a crossover operation on the parental chromosomes to generate offspring chromosomes containing new combinations of inventory levels; The purpose of this step is to recombine the high-quality gene segments of the parental chromosomes through the crossover operation to generate offspring chromosomes with new combinations of inventory levels. The crossover operation is one of the most core operations in the genetic algorithm. It simulates the exchange and recombination of genes in the biological evolution process and is an important source of innovation and optimization. Common crossover operations include single-point crossover, multi-point crossover, uniform crossover, etc. The system can select an appropriate crossover operation method according to the chromosome encoding method and problem characteristics.
[0046] Taking single-point crossover as an example, its specific steps are as follows: First, the system randomly selects two individuals from the parental chromosomes as the crossover objects; then, a crossover point is randomly selected on the chromosome encoding string, and the gene segments on both sides of the crossover point come from the two parental individuals respectively; finally, by swapping the gene segments on both sides of the crossover point, two new offspring chromosomes are generated. The offspring chromosomes inherit some characteristics of the parental individuals and also contain new combinations of inventory levels, injecting new diversity into the population.
[0047] S107. Perform a mutation operation on the offspring chromosomes according to a preset mutation probability to obtain the mutated offspring chromosomes; In this step, the system performs a mutation operation on the offspring chromosomes to further increase the diversity of the population. The mutation operation randomly perturbs some gene values in the chromosome encoding and modifies them to other possible values with a certain probability. By introducing randomness factors, the mutation operation enables the algorithm to jump out of the local optimum and explore new search regions. The probability of the mutation operation is usually set relatively low to ensure the stability and convergence of the population.
[0048] The specific way of the mutation operation depends on the chromosome encoding method. For binary encoding, bit-flip mutation can be used, that is, with a certain probability, some bits on the chromosome are changed from 0 to 1 or from 1 to 0. For real-number encoding, Gaussian mutation can be used, that is, a random perturbation obeying a Gaussian distribution is added to the original gene value. The system can set the intensity and frequency of the mutation operation according to actual needs. The mutation intensity can control the amplitude of the perturbation, and the frequency can control the probability of mutation occurrence.
[0049] S108. Compare the chromosomes with the minimum fitness value in each sub-population in the same supplier group within a preset generation interval, copy the chromosome with the minimum fitness value to other sub-populations, replace the chromosome with the maximum fitness value in other sub-populations, and update each sub-population; This step realizes the co-evolution of populations by exchanging and sharing information among multiple sub-populations within the same supplier group. The system regularly compares the optimal individuals of each sub-population, that is, the chromosome with the smallest fitness value, according to the preset number of iteration generations. It copies it to other sub-populations and replaces the worst individual there, that is, the chromosome with the largest fitness value. Through this mechanism of elite migration and elimination of the inferior, the evolution convergence of the population can be accelerated while avoiding falling into local optima. In addition to copying the optimal individuals, the system can also adopt other information exchange methods, such as crossing part of the genes of the optimal individuals and sharing the fitness evaluation results, to further promote cooperation and mutual learning among sub-populations.
[0050] In specific implementation, the system first sets an iteration generation interval, for example, performing operations between sub-populations every 10 generations. At the end of each interval, the system respectively finds the chromosome with the smallest fitness value in each sub-population, that is, the local optimal solution of each sub-population. Then, the system compares the fitness values of these local optimal solutions and selects the global optimal solution among them. Next, the system copies the global optimal solution to all other sub-populations and replaces the chromosome with the largest fitness value in each sub-population. In this way, the originally backward sub-populations can learn excellent genes from the advanced sub-populations, thereby enhancing their own evolution ability. Finally, the system updates each sub-population according to the new chromosomes. The above process can use multi-threaded parallel computing to improve the information exchange efficiency.
[0051] S109. When the number of iterations reaches the preset threshold, select the chromosome with the smallest fitness value from the final population of each supplier group and decode it to obtain the optimal inventory level value of the components within the corresponding supplier group.
[0052] This step is the termination and output stage of the multi-sub-population genetic algorithm. When the system completes the preset number of iterations, the algorithm stops. At this time, the population has evolved sufficiently, and the chromosomes have basically converged near the optimal solution. The system will select the chromosome with the smallest fitness value from the final population of each supplier group as the optimization result of the group. By decoding these chromosomes, the optimal inventory level value of each component within each supplier group can be obtained. In addition to using the number of iterations as the termination condition, the system can also set other strategies, such as fitness value threshold, chromosome similarity, etc., to cope with different convergence characteristics and accuracy requirements.
[0053] In specific implementation, the system first determines whether the current iteration count has reached a preset threshold. If it has, the algorithm is terminated; otherwise, the iteration continues. When the algorithm terminates, the system extracts the optimal chromosomes of the final population of each supplier group, that is, the individuals with the smallest fitness value. Through multiple rounds of evolution, these chromosomes have been able to better balance the inventory cost and service level, and are the optimal inventory allocation solutions for the corresponding supplier group. Next, the system decodes these optimal chromosomes. Since the chromosomes represent inventory levels using a specific encoding rule, they need to be restored to actual part quantity values. The decoding process matches the encoding method of the chromosomes and usually involves simple linear transformation or table lookup operations. Finally, the system outputs the decoded results, that is, the optimal inventory level values of each part within each supplier group, providing a quantitative basis for inventory management decisions.
[0054] In practical applications, due to the dynamic changes in the supply chain environment and the limitations in the modeling and optimization processes, there may be certain deviations between the obtained optimization results and the actual optimal values. To improve the applicability and reliability of the solution, the system can post-process the optimization results after decoding. For example, the system can compare the optimal values with the historical inventory levels of the parts and conduct manual review and correction for abnormally deviated results. In addition, the system can also perform sensitivity analysis to evaluate the impact of changes in various parameters and constraint conditions on the optimization results, so as to identify key influencing factors. When necessary, the system can also compare the optimization results with the results of other optimization algorithms or heuristic rules for mutual verification and complementation. Through the above post-processing measures, the interpretability and robustness of the inventory optimization solution can be further enhanced.
[0055] In the above embodiments, by grouping parts according to supplier characteristics and using a genetic algorithm to optimize the inventory levels within each supplier group, parts with similar supply characteristics can be optimized collaboratively. During the optimization process, the population is divided into multiple sub-populations and an inter-population interaction mechanism is introduced. Information sharing is achieved through the exchange of the chromosomes with the smallest fitness value between sub-populations, avoiding being trapped in local optimal solutions. The parent selection strategy based on fitness value ranking and the mutation operation with a preset mutation probability are adopted to improve the diversity and convergence of the population. This grouped optimization method not only considers the differences in supplier characteristics but also expands the solution space through information interaction between sub-populations. The finally obtained inventory levels can not only adapt to the supply characteristics of different suppliers but also achieve an equilibrium between inventory cost and service level globally, improving the accuracy and practicality of inventory optimization.
[0056] In the above embodiments, the optimization of inventory levels is achieved through supplier grouping and the multi-subpopulation genetic algorithm. However, in order to further improve the optimization effect, more refined control over the generation and evolution process of the initial population is required. Therefore, the embodiments of the present application also provide a population optimization method based on historical data, which restricts the chromosome coding range by quantifying the cost ratio and guides the population evolution using gene feature analysis. The following combines Figure 2 to describe a population optimization method based on historical data in the embodiments of the present application: Please refer to Figure 2 , which is a schematic flowchart of a population optimization method based on historical data in the embodiments of the present application.
[0057] S201. Calculate the quantified ratio of inventory cost to stock-out cost based on the historical inventory data of each component; The system calculates the quantified ratio of inventory cost to stock-out cost based on the historical inventory data of each component, which specifically includes: statistically analyzing the cumulative inventory backlog duration of each component according to the historical inventory data; recording the number of stock-outs of each component and the impact duration of each stock-out; converting the cumulative inventory backlog duration into an inventory cost value; converting the number of stock-outs and the impact duration into a stock-out cost value; calculating the ratio of the inventory cost value to the stock-out cost value to obtain the quantified ratio of inventory cost to stock-out cost.
[0058] This step conducts a quantitative analysis of inventory cost and stock-out cost, laying a foundation for subsequent constraints on the initial population. The system can calculate the quantified ratio in various ways, not limited to indicators such as cumulative inventory backlog duration, number of stock-outs, and impact duration. For example, comprehensive indicators such as inventory turnover rate and order fulfillment rate can also be considered to form a more comprehensive cost quantification model.
[0059] In specific implementation, the system first collects the historical inventory data of each component, statistically analyzes the cumulative inventory backlog duration, and records the number of stock-outs and the impact duration of each stock-out. Then, it converts the backlog duration into an inventory cost value and the stock-out situation into a stock-out cost value. Finally, it calculates the ratio of the two cost values to obtain the quantified ratio. This process can be automatically completed with the help of data analysis tools.
[0060] S202. Based on the quantified ratio, constrain the initial population of each supplier group and set the upper and lower limits of chromosome coding; This step uses the quantified ratio to impose constraints on the initial population and control the chromosome coding range. The system can adaptively adjust the coding upper and lower limits according to the magnitude of the quantified ratio. For example, when the quantified ratio is relatively large, it indicates that the inventory cost is relatively high, and the coding upper limit can be appropriately reduced; conversely, the upper limit can be increased. This can more precisely control the quality of the initial solution.
[0061] In specific implementation, the system first determines the chromosome length of each group according to the supplier grouping situation. Then, the quantization ratio is mapped to a preset coding range to obtain the upper and lower limits of the value of each gene position. For random coding values outside the range, corrections can be made by truncation, scaling, etc. This process can be completed in the chromosome generation function.
[0062] S203. Divide the upper and lower limits according to the quantization ratio to generate the coding mapping rule of the initial population; This step divides the coding range according to the quantization ratio to form a coding mapping rule. This rule determines how to convert the quantization ratio into a specific coding value. The system can adopt various mapping methods such as piecewise linear functions and non-linear functions, and can be flexibly set according to actual requirements.
[0063] In specific implementation, the system first divides the coding upper and lower limits into several sub-intervals, and each sub-interval corresponds to a certain range of quantization ratios. Then, within each sub-interval, according to its quantization ratio distribution, a coding mapping function is determined. This function can be a simple linear mapping or a complex non-linear mapping. Finally, the mapping functions of all sub-intervals are integrated into a complete mapping rule. This process can be assisted by mathematical modeling tools.
[0064] S204. Calibrate the initial population according to the coding mapping rule; This step uses the coding mapping rule to calibrate the initial population so that it better conforms to the constraint relationship of the quantization ratio. This calibration process can be regarded as a purposeful adjustment and correction of the randomly generated initial solution to improve the population quality. The system can adopt various calibration strategies, such as truncation recoding, local search, etc.
[0065] In specific implementation, the system first decodes each chromosome in the initial population to obtain the solution vector it represents. Then, the solution vector is brought into the coding mapping rule to calculate its corresponding ideal coding value. Next, the ideal coding value is compared with the actual coding value, and for gene positions with large differences, re-coding or local search is performed to make it as close to the ideal value as possible. Finally, the corrected coding values are reassembled into chromosomes.
[0066] S205. Calculate the fitness values of each chromosome in the calibrated initial population; This step performs fitness evaluation on the calibrated population to provide a basis for subsequent superiority and inferiority judgment. The fitness value measures the quality of the solution represented by each chromosome and is one of the core indicators of the genetic algorithm. The system can adopt different fitness functions according to specific optimization objectives.
[0067] In the specific implementation, the system first decodes each chromosome to obtain a feasible solution. Then, the feasible solution is substituted into the fitness function to calculate its fitness value. Common fitness functions include total cost, profit margin, customer satisfaction, etc. It can also be a weighted combination of multiple indicators.
[0068] S206, grouping the chromosomes according to the fitness values to obtain dominant genomes and inferior genomes; This step divides the population into superior and inferior groups according to the fitness value, forming two types of genomes: superior and inferior. Its purpose is to prepare for subsequent gene extraction and import, and to improve inferior individuals by drawing on the genetic characteristics of superior individuals. The system can use a variety of grouping methods, such as by fixed ratio, by fitness threshold, etc.
[0069] In specific implementation, the system first sorts the population by fitness value to obtain an ordered sequence. Then, according to the preset grouping rules, some of the chromosomes with the highest ranking are classified as the dominant group, and the rest are classified as the inferior group. In order to facilitate subsequent analysis, the system can set a flag bit for each genome to distinguish its category.
[0070] S207, extracting characteristic gene fragments from the dominant genome; The system extracts characteristic gene fragments from the dominant genome, specifically including: calculating the fitness value of each chromosome in the dominant genome; decoding the chromosome to obtain the gene site value; calculating the correlation coefficient between the value of each gene site and the fitness value; selecting the gene site combination with a correlation coefficient greater than a preset threshold; and extracting the characteristic gene fragment where the gene site combination is located.
[0071] This step extracts characteristic fragments that represent the superiority of the dominant genome, in preparation for the subsequent introduction of inferior individuals. The characteristic fragment is usually a continuous substring of the dominant genome, containing key genes that contribute significantly to fitness. The system can use a variety of extraction methods, such as statistical analysis, pattern matching, etc.
[0072] In the specific implementation, the system first randomly extracts a certain number of samples from the dominant genome and decodes them. Then, the value of each gene position is counted and the correlation coefficient with the fitness value is calculated. According to the size of the correlation coefficient, a group of key gene positions that contribute the most to the fitness are selected. Finally, the feature fragments formed by these key gene positions and their context are extracted. In order to improve the calculation efficiency, the population can be compressed and stored in advance, and only the difference information of the gene positions is recorded.
[0073] It should be noted that the length and quantity of the feature fragments need to be reasonably set according to the characteristics of the problem. If the fragments are too short, it may be difficult to capture complete pattern information. If the fragments are too long, it may introduce too much random noise and affect the import effect. Therefore, the system can adopt a progressive extraction strategy, first extract preliminary feature fragments, then evaluate their effectiveness through methods such as cross-validation, and further optimize the length and composition of the fragments. At the same time, the system can also introduce some domain knowledge to semantically interpret and evaluate the feature fragments, thereby improving their interpretability and applicability.
[0074] S208. Directionally introduce the feature gene fragments into the chromosomes of the inferior genome.
[0075] This step introduces the feature fragments extracted from the superior genome into the chromosomes of the inferior genome purposefully to improve its fitness. This process can be regarded as a process in which inferior individuals learn and imitate superior individuals, and improve their own evolutionary ability by absorbing the beneficial parts of superior genes. The system can adopt various import strategies, such as overall replacement, local grafting, etc.
[0076] In specific implementation, the system first selects one or more chromosomes to be improved in the inferior genome, usually individuals with lower fitness values. Then, judge the compatibility of each fragment to be introduced with the chromosome and find the best grafting position. Then insert the feature fragment into the corresponding position of the chromosome and replace the original gene sequence.
[0077] In the above embodiment, the quantitative ratio of inventory cost and out-of-stock cost is calculated using historical data, and the constraint mechanism and mapping rules of chromosome coding are established. This coding scheme based on the actual cost ratio makes the value space of chromosomes more in line with business reality and avoids blind search. By dividing the upper and lower limits of coding according to the quantitative ratio and correcting the initial population accordingly, the inventory level combinations in the population are closer to the actual operation requirements. This coding constraint mechanism reduces the generation of invalid solutions, improves the quality of the population, enables the genetic algorithm to search in a more valuable solution space, and improves the optimization efficiency and the practicality of the results.
[0078] The system in the embodiment of the present invention application will be described from the perspective of hardware processing. Please refer to Figure 3 which is a schematic structural diagram of an entity device of a supply chain inventory optimization system provided by an embodiment of the present application.
[0079] It should be noted that Figure 3 the structure of the system shown is only an example and should not bring any restrictions to the functions and usage scopes of the embodiments of the present invention.
[0080] Such as Figure 3As shown, the system includes a Central Processing Unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the Read-Only Memory (ROM) 302 or the program loaded from the storage section 308 into the Random Access Memory (RAM) 303, such as executing the method in the above embodiment. In the RAM 303, various programs and data required for system operation are also stored. The CPU 301, ROM 302, and RAM 303 are connected to each other via a bus 304. An Input / Output (I / O) interface 305 is also connected to the bus 304.
[0081] The following components are connected to the I / O interface 305: an input section 306 including a camera, an infrared sensor, etc.; an output section 307 including a Liquid Crystal Display (LCD) and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read from it can be installed into the storage section 308 as needed.
[0082] Specifically, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication section 309, and / or installed from the removable medium 311. When the computer program is executed by the Central Processing Unit (CPU) 301, various functions defined in the present invention are executed.
[0083] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present invention, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
[0084] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. Among them, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0085] As another aspect, the present invention also provides a computer-readable storage medium, which may be included in the system described in the above embodiments; or may exist alone without being assembled into the system. The above storage medium carries one or more computer programs, and when the one or more computer programs are executed by a processor of a system, the system implements the method provided in the above embodiments.
[0086] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the various embodiments of the present application.
[0087] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as "if...", or "after...", or "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if detecting (the stated condition or event)" can be interpreted as "if determining...", or "in response to determining...", or "when detecting (the stated condition or event)", or "in response to detecting (the stated condition or event)".
[0088] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that the computer can access, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state drive), etc.
[0089] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by relevant hardware instructed by a computer program. This program can be stored in a computer-readable storage medium. When this program is executed, it can include the processes of the above method embodiments. The aforementioned storage medium includes various media that can store program codes, such as ROM or random access memory RAM, magnetic disks, or optical discs.
Claims
1. A supply chain inventory optimization method, characterized in that, Including: Classify the components according to the grouping information of the components to obtain several supplier groups, and each of the supplier groups includes suppliers with similar supply characteristics; Based on a preset chromosome coding rule, generate an initial population for the components in each of the supplier groups, and each chromosome includes the target inventory level coding of each component within the supplier group; For each of the supplier groups, divide the population corresponding to each of the supplier groups into multiple sub-populations; Calculate the fitness value of the chromosomes within each of the sub-populations based on a preset fitness function; Sort the chromosomes in each of the sub-populations in ascending order according to the fitness value, and select the chromosomes with the top preset proportion of the fitness value rankings as the parental chromosomes; Perform a crossover operation on the parental chromosomes to generate offspring chromosomes containing new inventory level combinations; Perform a mutation operation on the offspring chromosomes according to a preset mutation probability to obtain the mutated offspring chromosomes; Compare the chromosomes with the minimum fitness value in each sub-population within the same supplier group within a preset generation interval, copy the chromosomes with the minimum fitness value to other sub-populations, replace the chromosomes with the maximum fitness value in the other sub-populations, and update each of the sub-populations; When the number of iterations reaches a preset threshold, select the chromosome with the minimum fitness value from the final population of each of the supplier groups and decode it to obtain the optimal inventory level value of the components within the corresponding supplier group.
2. The method according to claim 1, characterized in that The generating of the initial population for the components in each of the supplier groups based on a preset chromosome coding rule specifically includes: Obtain the historical inventory data, current inventory quantity, and production plan demand quantity of each component within the supplier group; Calculate the average consumption and standard deviation of each component according to the historical inventory data, and set the constraint range of the maximum inventory level and the minimum inventory level; Randomly generate a preset number of chromosomes within the constraint range using a normal distribution, and each of the chromosomes includes the target inventory level coding of each component; Perform a feasibility test on the chromosomes. If the coding of the chromosomes exceeds the constraint range, regenerate them until an initial population that meets the constraint conditions is obtained.
3. The method according to claim 1, wherein The preset fitness function is: ; In the above function, the is the preset fitness function, the and the are preset weight coefficients, the is the total inventory cost, the is the service level, the is the penalty term, the is the unit holding cost of the parts , the is the shortage cost, the is the demand for the parts , and the is the supplier arrival time constraint.
4. The method according to claim 1, characterized in that, After obtaining the optimal inventory level value of the components within the corresponding supplier group, the method further includes: Calculate the quantitative ratio of the inventory cost to the shortage cost according to the historical inventory data of each component; Based on the quantitative ratio, constrain the initial population of each of the supplier groups and set the upper and lower limits of the chromosome coding; Divide the upper and lower limits according to the quantitative ratio to generate the coding mapping rule of the initial population; Correct the initial population according to the coding mapping rule.
5. The method according to claim 4, characterized in that The calculating of the quantitative ratio of the inventory cost to the shortage cost according to the historical inventory data of each component specifically includes: Statistically calculate the cumulative inventory backlog duration of each component according to the historical inventory data of each component; Record the number of shortage times of each component and the impact duration of each shortage; Convert the cumulative inventory backlog duration into an inventory cost value; Convert the number of out-of-stock occurrences and the impact duration into out-of-stock cost values; Calculate the ratio of the inventory cost value to the out-of-stock cost value to obtain the quantitative ratio of inventory cost to out-of-stock cost.
6. The method according to claim 4, characterized in that, After calibrating the initial population according to the coding mapping rule, the method further includes: Calculate the fitness values of each chromosome in the calibrated initial population; Group the chromosomes according to the fitness values to obtain a dominant genome and a disadvantaged genome; Extract characteristic gene fragments from the dominant genome; Directly introduce the characteristic gene fragments into the chromosomes in the disadvantaged genome.
7. The method according to claim 6, wherein The extracting of the characteristic gene fragments from the dominant genome specifically includes: Calculate the fitness values of each chromosome in the dominant genome; Decode the chromosomes to obtain the gene locus values; Calculate the correlation coefficients between each gene locus value and the fitness value; Select the gene locus combinations with the correlation coefficients greater than a preset threshold; Extract the characteristic gene fragments where the gene locus combinations are located.
8. A supply chain inventory optimization system, characterized in that, The system includes: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the system to execute the method according to any one of claims 1-7.
9. A computer-readable storage medium, comprising instructions, characterized in that, When the instructions run on the system, enable the system to execute the method according to any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product runs on the system, enable the system to execute the method according to any one of claims 1-7.
Citation Information
Patent Citations
Allocation and purchasing method and device, and equipment
CN107153880A
Intelligent warehouse shelving method and device based on genetic algorithm
CN110070231A
Warehouse goods allocation optimization method and device, electronic equipment and storage medium
CN116579721A
Retail optimization for markdown
US20150161629A1