Genetic-greedy hybrid algorithm-based silo scheduling optimization method and system
The silo scheduling optimization method based on the genetic-greedy hybrid algorithm solves the problem of balancing global optimization and local response in multi-silo collaborative scheduling, achieving efficient and safe production control and reducing equipment wear and safety hazards.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA POWER CONSTR SIXTH BUREAU (ZHANGZHOU) ENVIRONMENTAL PROTECTION NEW MATERIALS CO LTD
- Filing Date
- 2026-04-27
- Publication Date
- 2026-06-16
Smart Images

Figure CN122222533A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation control and production scheduling technology, and in particular to a silo scheduling optimization method and system based on a genetic-greedy hybrid algorithm. Background Technology
[0002] Currently, in modern industrial production and warehousing logistics systems, multi-silo collaborative operation is a crucial link in material storage and buffering, and the rationality of its scheduling decisions directly affects the continuity of the entire production line and equipment wear and tear. With the expansion of automated production lines, the system needs to monitor the capacity, infeed / outfeed rates, and other state variables of each silo in real time. This involves processing massive amounts of high-frequency industrial data, placing extremely high demands on the computational efficiency and decision-making mechanisms of the scheduling system.
[0003] In existing technologies, silo scheduling typically employs two extreme strategies: one is to use a single global optimization algorithm, such as a standard genetic algorithm or particle swarm optimization, to generate a static, globally optimal scheduling sequence through long-term iterative calculations before the scheduling cycle begins; the other is to use real-time heuristic rules based on the current inventory level, such as first-in-first-out (FIFO) or triggering actions when a fixed inventory level is reached, for purely local real-time order dispatch. However, both of these existing technologies exhibit significant logical inconsistencies when facing highly dynamic continuous production environments. When using purely global static planning, the algorithm treats the system as an ideal closed environment. If fluctuations in the feed rate or a silo's inventory approaches its physical limits, such as impending overflow or material shortage, the static sequence cannot provide predictive intervention or emergency correction, easily leading to serious safety accidents. On the other hand, while the system responds extremely quickly when using purely local real-time rules, the lack of long-term prediction of future timelines often results in conveyor belts and other actuators frequently switching between different silos, causing increased mechanical wear and extremely low overall operating efficiency.
[0004] Existing technologies present a technical problem where it is difficult to balance global optimization efficiency with local dynamic over-limit prevention response when coordinating the scheduling of multiple silos. Summary of the Invention
[0005] This invention provides a silo scheduling optimization method and system based on a genetic-greedy hybrid algorithm to solve the technical problem in the prior art that it is difficult to balance global optimization efficiency and local dynamic over-limit prevention response when scheduling multiple silos in a coordinated manner.
[0006] Firstly, to address the aforementioned technical problems, this invention provides a silo scheduling optimization method based on a genetic-greedy hybrid algorithm, comprising:
[0007] Obtain initial inventory and equipment parameters, construct a dynamic model based on the initial inventory and equipment parameters, and generate an initial population using a genetic algorithm based on a preset population size;
[0008] The current individual is extracted from the initial population, and the current individual is input into the dynamic model for simulation decoding to obtain a simulated trajectory. The computation time is calculated based on the simulated trajectory, and the fitness value is calculated based on the simulated trajectory, the computation time, and a preset fitness function.
[0009] Real-time inventory is extracted from the simulated trajectory, short-term inventory is extrapolated based on the simulated trajectory, and a risk correction operation is performed on the current individual based on the real-time inventory, the short-term inventory, and a preset safety threshold to obtain a corrected individual. The initial population is updated based on the corrected individual to obtain an updated population. The updated population is iterated based on the fitness value until a preset switching time is reached to obtain a global sequence and a system snapshot. In each iteration, simulation decoding, fitness value calculation, and risk correction operation are performed on the current individual, and the population is updated with the corrected individual.
[0010] The system snapshot is parsed to extract local inventory and time status, and the execution environment is constructed based on the local inventory and time status.
[0011] Extract the highest silo from the execution environment, allocate time to the highest silo to obtain a transportation task, update the local inventory and the time state according to the transportation task, and repeatedly execute the operations of extracting the highest silo and updating the state until the time state reaches the preset end time to obtain a local sequence.
[0012] The final solution is obtained by concatenating the global sequence and the local sequence.
[0013] Secondly, this invention provides a silo scheduling optimization system based on a genetic-greedy hybrid algorithm, comprising:
[0014] The modeling initialization module is used to obtain the initial inventory and equipment parameters, construct a dynamic model based on the initial inventory and equipment parameters, and generate an initial population using a genetic algorithm based on a preset population size.
[0015] The simulation evaluation module is used to extract the current individual from the initial population, input the current individual into the dynamic model for simulation decoding to obtain the simulated trajectory, calculate the computation time based on the simulated trajectory, and calculate the fitness value based on the simulated trajectory, the computation time, and a preset fitness function.
[0016] The early warning evolution module is used to extract real-time inventory from the simulated trajectory, extrapolate short-term inventory based on the simulated trajectory, perform risk correction operations on the current individual based on the real-time inventory, the short-term inventory, and a preset safety threshold to obtain corrected individuals, update the initial population based on the corrected individuals to obtain an updated population, and iterate the updated population based on the fitness value until a preset switching time to obtain a global sequence and a system snapshot; wherein in each iteration, simulation decoding, fitness value calculation, and risk correction operations are performed on the current individual, and the population is updated with the corrected individuals;
[0017] The environment construction module is used to parse the system snapshot to extract local inventory and time status, and construct the execution environment based on the local inventory and time status;
[0018] The local scheduling module is used to extract the highest silo from the execution environment, allocate time to the highest silo to obtain a transportation task, update the local inventory and the time status according to the transportation task, and repeatedly execute the operations of extracting the highest silo and updating the status until the time status reaches a preset end time to obtain a local sequence.
[0019] The scheme splicing module is used to splice the global sequence and the local sequence to obtain the final scheme.
[0020] Compared with the prior art, the present invention has the following beneficial effects:
[0021] (1) This invention constructs a two-stage scheduling framework based on a genetic-greedy hybrid algorithm, using system state snapshots as the hub to achieve the splicing of the time axis between the front-end global optimization and the back-end local agile execution. Although the pure genetic algorithm has excellent long-term planning capabilities and can effectively reduce the overall equipment switching frequency, it suffers from computational lag when facing high-frequency disturbances in continuous production and cannot achieve millisecond-level hard response to prevent exceeding limits. While the pure greedy algorithm has extremely fast response and can firmly adhere to the safety bottom line, it is prone to short-sighted decision-making, leading to frequent and inefficient back-and-forth of the conveying equipment between different silos. This invention deeply integrates the two, allowing the greedy algorithm to start from the shoulders of the high-quality global optimal solution planned by the genetic algorithm. This not only gives the genetic algorithm the agility of implementation but also makes up for the shortcoming of the greedy algorithm in lacking a long-term global perspective. This brings an additional advantage greater than the sum of its parts. Under the premise of ensuring that the system has absolute defense capabilities against sudden anomalies, it avoids unnecessary equipment switching and mechanical wear to the greatest extent, perfectly solving the industry paradox that global optimization efficiency and local extreme dynamic response are difficult to balance in multi-silo scheduling.
[0022] (2) This invention establishes a bottom-level active defense link between fitness evaluation and population iteration by embedding a hierarchical risk correction mechanism into the evolutionary process of the genetic algorithm, namely, a first-level forced switching based on real-time inventory and a second-level insertion mutation based on short-term predicted inventory. Existing scheduling algorithms usually only use passive penalties as the driving force for optimization, resulting in the system often adjusting its strategy only after a risk of exceeding the limit has already occurred. However, this invention, by predicting short-term inventory in advance, once a potential risk of exceeding the limit is identified, directly bypasses the conventional evolutionary process and forcibly extracts the gene loci of high-risk individuals for pre-insertion at the bottom level of the algorithm, or even directly physically interrupts the current task. This mechanism of directly injecting prediction and prevention into the gene sequence completely eliminates the hidden dangers of warehouse overflow or material shortage under extremely dynamic working conditions, and significantly enhances the robustness of the scheduling system and the absolute safety of the production line in the face of adverse working conditions such as sudden changes in production capacity.
[0023] (3) This invention introduces a four-dimensional maximum and minimum value constraint calculation model, including time threshold, lower limit threshold, upper limit threshold, and transportation threshold, in the simulation decoding and local duration allocation stages to accurately quantify the duration of each single transportation of the target silo. Traditional scheduling algorithms often only output an abstract sequence of order, ignoring the physical fact of how long it can last, leading to frequent failures of the scheme in actual workshops. This invention deeply couples multiple physical parameters such as the silo's capacity extreme value, the net output rate of the conveying equipment, and the material productivity, ensuring that every scheduling action generated by the algorithm is executed within strict physical boundaries. This completely breaks down the barrier between the algorithm's virtual simulation and real industrial control, ensuring that the final output scheduling scheme has 100% engineering applicability and significantly reducing the execution deviation and on-site debugging difficulty after the scheduling instructions are issued. Attached Figure Description
[0024] Figure 1 This is a schematic diagram of the silo scheduling optimization method based on a genetic-greedy hybrid algorithm provided in the first embodiment of the present invention;
[0025] Figure 2 This is a schematic diagram of the silo scheduling optimization system based on a genetic-greedy hybrid algorithm provided in the second embodiment of the present invention.
[0026] Figure 3 This is an example output result diagram provided by the third embodiment of the present invention;
[0027] Figure 4 This is an example output data diagram provided in the fourth embodiment of the present invention. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] Reference Figure 1 The first embodiment of the present invention provides a silo scheduling optimization method based on a genetic-greedy hybrid algorithm, including the following steps:
[0030] S11, Obtain initial inventory and equipment parameters, construct a dynamic model based on the initial inventory and equipment parameters, and generate an initial population using a genetic algorithm based on a preset population size;
[0031] S12, extract the current individual from the initial population, input the current individual into the dynamic model for simulation decoding to obtain the simulated trajectory, calculate the operation time based on the simulated trajectory, and calculate the fitness value based on the simulated trajectory, the operation time, and the preset fitness function;
[0032] S13, extract real-time inventory from the simulated trajectory, extrapolate short-term inventory based on the simulated trajectory, perform risk correction operation on the current individual based on the real-time inventory, the short-term inventory, and a preset safety threshold to obtain a corrected individual, update the initial population based on the corrected individual to obtain an updated population, iterate the updated population based on the fitness value until a preset switching time to obtain a global sequence and a system snapshot; wherein in each iteration, perform simulation decoding, calculate fitness value and risk correction operation on the current individual, and update the population with the corrected individual;
[0033] S14, parse the system snapshot to extract local inventory and time status, and construct the execution environment based on the local inventory and time status;
[0034] S15, extract the highest silo from the execution environment, allocate time to the highest silo to obtain a transportation task, update the local inventory and the time state according to the transportation task, and repeatedly execute the operations of extracting the highest silo and updating the state until the time state reaches the preset end time to obtain a local sequence;
[0035] S16, the global sequence and the local sequence are concatenated to obtain the final solution.
[0036] In step S11, the initial inventory and equipment parameters are obtained, a dynamic model is constructed based on the initial inventory and equipment parameters, and an initial population is generated using a genetic algorithm based on a preset population size.
[0037] In one implementation, this embodiment uses a programmable logic controller (PLC) to extract the equipment status messages of each silo from the manufacturing execution system (MAS) and parses these messages to obtain the initial inventory and equipment parameters. The initial inventory represents the absolute mass of the material stored inside each silo at the start of scheduling; the equipment parameters include the maximum physical capacity of each silo, the fixed feed rate of the corresponding production line, and the rated transport rate of the common conveyor belt.
[0038] It should be noted that this embodiment constructs a dynamic model based on the initial inventory and the equipment parameters. This dynamic model is essentially a set of physical state equations driven by discrete time steps. Regarding the method for determining the time step size of this discrete derivation, this embodiment no longer uses a fixed constant, but instead performs adaptive derivation. The system obtains the maximum allowed planning waiting time window before the scheduling task is issued, obtains the preset maximum number of generations and the previously determined preset population size; the maximum planning waiting time window is divided sequentially by the maximum number of generations and the preset population size to calculate the maximum allowable time consumption for a single individual evaluation; subsequently, the underlying clock processing frequency of the programmable logic controller is obtained, and the maximum allowable time consumption is multiplied by the underlying clock processing frequency to obtain the maximum allowable number of iteration steps; the preset total scheduling time is divided by the maximum allowable number of iteration steps to calculate the time step size.
[0039] The maximum planning waiting time window is set by the operator through the human-machine interface of the manufacturing execution system. Its default value is sixty seconds, which represents the longest available time for the algorithm to perform scheduling decision calculations. If it is not manually set, the system automatically reads the sum of the programmable logic controller's scan cycle and the fieldbus's maximum response delay, and then multiplies it by one hundred to get the default value of the time window. The maximum number of evolution generations is preset according to the complexity of the scheduling problem, and the default value is two hundred generations. If the number of silos exceeds ten, the maximum number of evolution generations increases by ten generations for each additional silo.
[0040] It should be noted that the specific construction logic of the dynamic model is as follows: when there is no transportation task for the corresponding silo, the system sets the dynamic inventory at the current time step to be equal to the dynamic inventory at the previous time step plus the product of the fixed feed rate and the time step length; when there is a transportation task for the corresponding silo, the system sets the dynamic inventory at the current time step to be equal to the dynamic inventory at the previous time step plus the product of the fixed feed rate and the time step length, and subtracts the product of the rated transportation rate and the time step length. The dynamic inventory is synchronously mapped and calculated using the above calculation logic to generate the dynamic model.
[0041] The process of generating an initial population using a genetic algorithm based on a preset population size includes:
[0042] The occurrence frequency is calculated based on the preset allocation ratio and the initial inventory, and a first subset is generated based on the occurrence frequency;
[0043] Extract silo numbers based on the equipment parameters, and perform a random permutation operation on the silo numbers to obtain a second subset;
[0044] The first subset and the second subset are merged to obtain the initial population.
[0045] In one implementation, this embodiment obtains a preset allocation ratio and a preset population size. Regarding the determination process of the preset allocation ratio and the preset population size, this embodiment is based on the statistical analysis results of offline scheduling simulation. The system obtains the total number of silos obtained from the previous analysis, calculates the reciprocal of the total number, and determines it as the increment step size of the allocation ratio. The system obtains a baseline length parameter obtained by dividing the preset total scheduling time by a preset average single transport time, and determines this baseline length parameter as the increment step size of the population size. The system constructs a two-dimensional grid search space containing incrementing allocation ratios and incrementing population sizes, using the two determined increment step sizes as coordinate axis scales. Historical operating data is used to solve for each parameter combination in the grid search space, and the average number of iterations required for the algorithm to meet the convergence condition and the frequency of getting trapped in local maxima are statistically analyzed for different combinations. The parameter combination that minimizes the average number of iterations and minimizes the frequency of local maxima is selected, and its corresponding values are determined as the preset allocation ratio and the preset population size.
[0046] It should be noted that in this embodiment, the initial inventory of all silos participating in the scheduling is summed to obtain the total initial inventory. The initial inventory of a single silo is divided by the total initial inventory to calculate the frequency of occurrence of the corresponding silo in the chromosome gene sequence to be generated. In this embodiment, the historical production scheduling database of the manufacturing execution system is retrieved, and the average single continuous start-up time of the same type of conveyor belt for feeding silos is extracted and labeled as the preset single average transport time within a preset period, such as the past thirty calendar days, to accurately reflect the recent actual mechanical operation conditions and process rhythm of the equipment. The total scheduling time is divided by the single average transport time, and the result is rounded up to obtain the baseline length parameter. A uniformly distributed random function is called to generate a dynamic random ratio between zero and the preset upper limit of the fluctuation ratio. The baseline length parameter is multiplied by the dynamic random ratio to calculate the random fluctuation value. The baseline length parameter and the random fluctuation value are combined and added or subtracted to determine the absolute total length of each variable-length chromosome sequence.
[0047] It should be noted that, regarding the preset upper limit of the fluctuation ratio, this embodiment retrieves historical production logs, extracts the maximum fluctuation range of the actual duration of similar delivery tasks in the past, divides the maximum fluctuation range by the average single delivery duration, and determines the result as the preset upper limit of the fluctuation ratio.
[0048] For example, in this embodiment, the preset population size is multiplied by the preset allocation ratio to calculate the target number of heuristic individuals. The system strictly follows the calculated occurrence frequency of each silo, filling in the corresponding number of silo numbers into the absolute total length and performing sequence combination to generate a set of heuristic chromosome individuals equal to the target number, and this set is determined as the first subset. Assuming the absolute total length of a chromosome is calculated to be fifty, the occurrence frequency of silo A is sixty percent, and the occurrence frequency of silo B is forty percent, then the system precisely allocates thirty silo A numbers and twenty silo B numbers to the chromosome sequence.
[0049] In one implementation, this embodiment extracts the silo numbers of all corresponding physical silos based on the equipment parameters. The target number of random individuals is calculated by subtracting the number of individuals in the first subset from the preset population size. This embodiment uses the Mason tween algorithm to generate a discrete pseudo-random number sequence. Based on this sequence, all the extracted silo numbers are randomly permuted within a determined absolute total length to generate chromosome individuals with randomly distributed gene loci, until the target number of random individuals is reached. The set of these randomly generated chromosome individuals is then defined as the second subset.
[0050] It is worth noting that in this embodiment, the first subset and the second subset are merged. In the population data structure in memory, all chromosome individual sequences in the second subset are sequentially appended to the end of the data sequence of the first subset to form a two-dimensional matrix structure with a total number of individuals equal to the preset population size, and this two-dimensional matrix structure is determined as the initial population.
[0051] In step S12, the current individual is extracted from the initial population, the current individual is input into the dynamic model for simulation decoding to obtain the simulated trajectory, the computation time is calculated based on the simulated trajectory, and the fitness value is calculated based on the simulated trajectory, the computation time, and a preset fitness function.
[0052] In one implementation, this embodiment traverses the two-dimensional matrix structure of the initial population, extracting variable-length sequences containing specific silo number sequences one by one, and identifying these as the current individual. This embodiment inputs the current individual into the previously constructed dynamic model to perform forward inference, sequentially reading the silo numbers at the gene loci of the current individual as the current service object. The system records the opening time, operating duration, and closing time of the corresponding silo on the time axis of the dynamic model, and simultaneously records the continuous changes in the dynamic inventory levels inside all silos during this period. The system combines and maps the service object switching records on the time axis with the inventory change sequence corresponding to each silo to generate the simulated trajectory characterizing the system state over time.
[0053] The calculation of the computation time based on the simulated trajectory includes:
[0054] Extract the current time, current capacity, and amount of materials to be transported from the simulated trajectory;
[0055] A time threshold is calculated based on the preset total scheduling time and the current time, and a lower limit threshold is calculated based on the current capacity, the preset lower inventory limit, and the preset net output rate.
[0056] The upper limit threshold is calculated based on the preset inventory limit, the current capacity, and the preset productivity; the transportation threshold is calculated based on the amount of materials to be transported and the preset transportation rate.
[0057] The minimum value is extracted from the time threshold, the lower threshold, the upper threshold and the transportation threshold, and the minimum value is determined as the operation time.
[0058] In one implementation, this embodiment extracts the system clock value corresponding to the current simulation node from the simulation trajectory as the current time, extracts the instantaneous material inventory of the target silo at the current time as the current capacity, and extracts the remaining material mass of the target silo that has not yet been transported as the amount of material to be transported.
[0059] It should be noted that this embodiment obtains the preset total scheduling time, preset lower inventory limit, preset net output rate, preset upper inventory limit, preset productivity, and preset transportation rate. The preset total scheduling time is the duration of a single production shift issued by the operator through the manufacturing execution system, such as an 8-hour shift or a 24-hour day; the lower inventory limit is determined based on the physical dead zone volume of the silo outlet; the upper inventory limit is determined based on the total physical volume of the silo minus the preset overflow safety margin volume; the productivity and transportation rate are calibrated based on the rated power parameters of the upstream feeding equipment and the downstream discharging equipment, respectively; the net output rate is calculated by subtracting the productivity from the transportation rate.
[0060] It is worth noting that in this embodiment, the total scheduling time is subtracted from the current time to calculate the time threshold; the current capacity is subtracted from the preset lower inventory limit, and the result is divided by the preset net output rate to calculate the lower limit threshold; the preset upper inventory limit is subtracted from the current capacity, and the result is divided by the preset productivity rate to calculate the upper limit threshold; and the amount of material to be transported is divided by the preset transportation rate to calculate the transportation threshold. This embodiment compares the calculated time threshold, lower limit threshold, upper limit threshold, and transportation threshold, extracts the value with the smallest absolute value from the four values, and determines this smallest value as the calculation time corresponding to the target silo at the current location.
[0061] The calculation of the fitness value based on the simulated trajectory, the computation time, and a preset fitness function includes:
[0062] Based on the simulated trajectory, the frequency of exceeding limits, the frequency of being too low, the switching frequency, and the average inventory level are statistically analyzed. The absolute deviation is calculated based on the computation time to obtain the fragmentation penalty item.
[0063] Based on the over-limit frequency, the under-limit frequency, the switching frequency, the average inventory level, and the fragmentation penalty item, a weighted summation operation is performed using preset over-limit weights, preset under-limit weights, preset switching weights, preset inventory weights, and preset fragmentation weights to obtain a comprehensive penalty value.
[0064] The fitness value is obtained by calculating the negative of the comprehensive penalty value.
[0065] In this embodiment, the preset fitness function is used to evaluate the quality of chromosomes and guide the evolutionary direction of the genetic algorithm. This invention constructs a multi-objective weighted aggregation penalty-type fitness function. Individuals are assessed by converting the degree of violation of physical constraints into negative scores, calculated as follows:
[0066]
[0067] in, This is a penalty for exceeding inventory limits. In this embodiment, the complete timeline data of the simulated trajectory is traversed, and the total number of times the dynamic inventory of any silo at any given time exceeds a preset inventory limit (e.g., 95% of the total storage capacity) is counted to obtain the frequency of exceeding the limit. This frequency is then multiplied by a preset first coefficient, such as... Determined as The aim is to strictly prohibit margin calls through a maximum value penalty system that enforces constraints.
[0068] in, This is a penalty for excessively low inventory. In this embodiment, the total number of times the dynamic inventory level of any silo in the simulated trajectory is less than a preset lower inventory limit (e.g., 5% of the total silo capacity) is counted to obtain the frequency of excessively low inventory. This frequency is then multiplied by a preset second coefficient, such as... Determined as The aim is to ensure the safety of the production line in case of material shortage by using maximum value penalties.
[0069] in, This is a switching frequency penalty term. In this embodiment, the total number of times adjacent gene loci corresponding to different silo numbers in the current individual's gene sequence is counted to obtain the total switching frequency; this total switching frequency is then compared with a preset unit switching penalty factor. Multiplication is determined as Regarding the aforementioned unit switching penalty factor The method for determining this method involves obtaining the maximum allowable total number of start-stop cycles for the on-site conveying equipment, and then using the reciprocal of this maximum allowable total number of start-stop cycles as the unit switching penalty factor. It is used to characterize the equivalent of a single start-up and shutdown on the cumulative fatigue life of the equipment, thereby reducing unnecessary equipment start-ups, shutdowns and path switching.
[0070] in, This is a penalty term for total inventory. In this embodiment, the time integral of the inventory levels of all silos over the entire simulation period is calculated and divided by the total scheduling time and the total number of silos to obtain the average total inventory. The average total inventory is then compared with a preset inventory holding cost coefficient. Multiplication is determined as Regarding the aforementioned inventory holding cost coefficient The method for determining the inventory holding cost coefficient is as follows: In this embodiment, the critical storage time at which the material's fluidity decreases due to natural settling or caking within the silo is obtained, and the reciprocal of the critical storage time is determined as the inventory holding cost coefficient. It is used to characterize the equivalent risk of material accumulation per unit mass per unit time, thereby reducing the risk of material blockage caused by long-term accumulation.
[0071] in, The time deviation penalty term measures the deviation between the planned total transportation time and the available time window. It is obtained by calculating the absolute deviation between the sum of all operation times and the total scheduling time. This absolute value is used to measure the overall time utilization of the scheduling scheme. The smaller the absolute value, the more compact the scheduling. It aims to constrain the compactness of the scheduling scheme on the time axis and avoid the task allocation being too fragmented.
[0072] in, to These are preset weighting coefficients, which are dynamically adjusted based on business priorities and are typically set to represent security constraints. and The numerical magnitude is much larger than that representing the efficiency constraint. , and Furthermore, to ensure the objectivity of the weights, the aforementioned to An objective weighting algorithm based on information entropy is used for pre-extraction. The system retrieves historical scheduling simulation databases and extracts statistical data on the five dimensions of a preset number of past scheduling schemes, constructing an evaluation feature matrix containing multiple samples and five dimensions. The system performs maximum and minimum value standardization on this evaluation feature matrix to eliminate dimensional differences. The system calculates the probability distribution weight of each dimension in all samples and uses this probability distribution weight to calculate the information entropy value of the corresponding dimension feature. The system calculates the difference coefficient by subtracting the information entropy value from the value. The system normalizes the difference coefficient of each dimension by dividing it by the sum of the difference coefficients of all dimensions. The system directly and strictly determines the five weight values calculated after normalization as the values of the above five dimensions. The above The above The above With the .
[0073] It is worth noting that in this embodiment, the calculated five weighted penalty terms are summed and their negative values are taken to obtain the fitness value of the current individual. When the fitness value The larger the value, the more the corresponding scheduling sequence meets production constraints and efficiency requirements. The historical scheduling simulation database is obtained by randomly generating scheduling tasks and running a standard genetic algorithm in the offline phase, generating a total of one thousand scheduling schemes under different working conditions and their corresponding five penalty statistical values. All subsequent parameter tuning involving historical data statistics is based on this database. The preset first coefficient and second coefficient are both set to one million. This value is greater than the maximum statistical value of the over-limit frequency and under-limit frequency that may occur in any actual scheduling scheme, ensuring that the contribution of safety constraint violation items in the weighted summation is absolutely dominant, forcing the genetic algorithm to prioritize the elimination of individuals that violate safety constraints.
[0074] In step S13, real-time inventory is extracted from the simulated trajectory, short-term inventory is deduced based on the simulated trajectory, risk correction operation is performed on the current individual based on the real-time inventory, the short-term inventory and a preset safety threshold to obtain a corrected individual, the initial population is updated based on the corrected individual to obtain an updated population, and the updated population is iterated based on the fitness value until a preset switching time is obtained to obtain a global sequence and a system snapshot.
[0075] In one implementation, during the process of simulating and decoding the gene sequence of the current individual, at each discrete simulation time step node, the simulation trajectory generated by the previous step is scanned, the absolute physical inventory values inside all silos at that time step node are read, and the set of these absolute physical inventory values is determined as the real-time inventory.
[0076] It should be noted that this embodiment extrapolates short-term inventory based on the simulated trajectory. This embodiment obtains a preset prediction time window and extracts the fixed feed rate configured for the target silo in the dynamic model. The fixed feed rate is multiplied by the prediction time window to obtain the extrapolated increment. The real-time inventory is added to the extrapolated increment to calculate the extrapolated inventory of the target silo after the prediction time window. The set of extrapolated inventories for all silos is then determined as the short-term inventory.
[0077] It should be noted that, regarding the determination process of the preset prediction time window, this embodiment obtains the maximum mechanical displacement time required for the conveyor belt to physically transfer from the current silo and align with the farthest silo, and obtains the electrical start-up time for the conveyor belt motor to accelerate from a standstill to its rated operating speed. The maximum mechanical displacement time and the electrical start-up time are added together to calculate the shortest physical dead time of the system response. The shortest physical dead time is multiplied by a preset redundancy coefficient to calculate the preset prediction time window. The preset redundancy coefficient is obtained by retrieving the equipment operation logs from the past ninety days, statistically analyzing the actual mechanical displacement time of the conveyor belt from a stop to alignment with the farthest silo each time, sorting all recorded time values from smallest to largest, taking the 95th percentile of the recorded time value, dividing it by the sum of the maximum mechanical displacement time and the electrical start-up time, and obtaining the ratio, which is the redundancy coefficient.
[0078] The process of performing a risk correction operation on the current individual based on the real-time inventory, the short-term inventory, and a preset safety threshold to obtain a corrected individual includes:
[0079] If the real-time inventory exceeds the preset upper limit threshold, then the excess number is extracted from the real-time inventory, and the system is forcibly switched to the physical silo corresponding to the excess number to perform a correction operation on the current individual to obtain the corrected individual;
[0080] If the real-time inventory is not greater than the upper limit threshold, then compare the short-term inventory with the preset warning threshold;
[0081] If the short-term inventory is greater than the warning threshold, then an insertion mutation operation is performed on the current individual to obtain the corrected individual;
[0082] If the short-term inventory is not greater than the warning threshold, then the current individual is identified as the corrected individual.
[0083] In one implementation, this embodiment obtains a preset upper limit threshold and a preset warning threshold, which together constitute the preset safety threshold. Regarding the method for determining the preset upper limit threshold and the preset warning threshold, this embodiment obtains the maximum physical volume of the corresponding silo and the total system communication and mechanical execution delay time required for the system control command to be issued to the actuator to fully close the feed valve. The total delay time is multiplied by the maximum feed rate of the corresponding silo to calculate the maximum overflow material quantity. The maximum physical volume is subtracted from the maximum overflow material quantity to obtain the preset upper limit threshold. In this embodiment, the preset prediction time window is multiplied by the maximum feed rate to calculate the warning buffer amount, and the preset upper limit threshold is subtracted from the warning buffer amount to calculate the preset warning threshold.
[0084] For example, this embodiment compares the real-time inventory with the preset upper limit threshold. If a certain inventory value in the real-time inventory is greater than the preset upper limit threshold, the global identification code of the silo corresponding to that value is extracted from the real-time inventory as the over-limit number. In this embodiment, the current simulation decoding index position is located in the variable-length sequence of the current individual, all original gene position data after the index position are deleted, the extracted over-limit number is appended to the index position as new gene position data, and the new gene position is forcibly assigned a continuous transportation time until the simulation finds that the simulated inventory of the silo corresponding to the over-limit number has dropped below the preset warning threshold. The sequence after truncation and recombination is determined as the corrected individual.
[0085] It should be noted that the mandatory continuous transportation time is obtained by taking the difference between the real-time inventory of the current overloaded silo and the preset warning threshold, dividing the difference by the net output rate corresponding to the silo, and the resulting quotient is the minimum continuous transportation time required to reduce the inventory to the warning threshold; if the calculated time is greater than the current remaining total scheduling time, the remaining total scheduling time is taken as the actual transportation time.
[0086] In one implementation, if the real-time inventory is not greater than the upper limit threshold, this embodiment compares the short-term inventory with the preset warning threshold. If a projected inventory value in the short-term inventory is greater than the preset warning threshold, this embodiment extracts a risk number from the position corresponding to that value. This embodiment performs an insertion mutation operation on the current individual, using the risk number as an emergency gene, randomly generating an integer between the current decoding index position of the current individual and the end of the sequence as a target index, and inserting the emergency gene into the position corresponding to the target index.
[0087] It is worth noting that, when performing the insertion mutation operation, this embodiment obtains a preset minimum emergency repair time and directly assigns this preset minimum emergency repair time to the inserted emergency gene as the forced duration of its single execution action, and determines the new sequence after the insertion operation as the corrected individual. Regarding the method for determining the preset minimum emergency repair time, this embodiment obtains the single start-stop physical protection cycle parameter of the on-site conveyor belt motor and directly determines it as the preset minimum emergency repair time. If the short-term inventory is not greater than the warning threshold, this embodiment does not make any changes to the sequence structure of the current individual and directly determines the current individual as the corrected individual. This embodiment puts the generated corrected individual back into the population data storage area, replacing the original current individual. After traversing all individuals in the population and executing the correction logic, the updated overall individual set in the storage area is determined as the updated population.
[0088] Specifically, the updated population is iterated based on the fitness value until a preset switching time is reached to obtain a global sequence and a system snapshot, including:
[0089] The tournament selection algorithm is used to extract superior individuals from the updated population based on the fitness value, and sequential crossover is performed on the superior individuals to obtain crossover offspring.
[0090] Perform gene position exchange operation on the crossover offspring to obtain a new generation population, and return the new generation population as the updated population to perform a loop iteration operation;
[0091] When the preset switching time is reached, the optimal individual is extracted from the updated population, and the optimal individual is parsed to obtain the global sequence;
[0092] The system snapshot is obtained by extracting the state data at the switching moment.
[0093] In one implementation, this embodiment obtains a preset tournament size value and calls a random sampling function to randomly select a subset of individuals from the updated population with a number equal to the tournament size value without replacement. Regarding the method for determining the preset tournament size value, this embodiment performs multiple independent controlled simulation experiments on a historical scheduling dataset, setting the size value as an integer variable, calculating the number of iterations required for the population's average fitness variance to converge to a minimum under different sizes, and selecting the integer value that minimizes this convergence number of iterations as the preset tournament size value. This embodiment reads the fitness value of each individual in the subset, extracts the individual with the largest fitness value (i.e., the smallest overall penalty value), and determines it as the superior individual.
[0094] It should be noted that this embodiment performs sequential crossover on the paired superior individuals. Two unequal index positions are randomly generated within the sequence length of parent individual A as crossover points. The gene sequence fragments of parent individual A between these two crossover points are completely extracted and pasted into the corresponding index positions of the offspring individuals. Starting from the second crossover point, the gene sequence of parent individual B is traversed, and gene values are read one by one. If a read gene value does not exist in the pasted gene sequence fragment, the gene value is sequentially filled into the remaining empty spaces of the offspring individual. When the end of the sequence is reached, the process continues from the beginning until all empty spaces are filled. The individual with the resulting new sequence combination is identified as the crossover offspring.
[0095] It is worth noting that in each iteration, simulation decoding is first performed on each individual in the current population and the fitness value is calculated. Then, based on the fitness value, the tournament selection algorithm is used to extract superior individuals. Next, crossover and mutation operations are performed on the superior individuals to generate the offspring population. Finally, a risk correction operation is performed on each individual in the offspring population, and the corrected individuals constitute the updated population for the next iteration. That is, the selection operation is based on the fitness value before risk correction, and the fitness value is not recalculated after the risk correction is applied to the offspring individuals.
[0096] For example, in this embodiment, a preset mutation probability parameter is obtained, and a continuous random number between zero and one is generated. If the continuous random number is less than the preset mutation probability parameter, this embodiment performs a gene position exchange operation on the crossover offspring. A first position index and a second position index are randomly generated in the gene sequence of the crossover offspring, and the gene values at the first position index and the second position index are interchanged. The preset mutation probability parameter is determined by calculating the reciprocal of the length of the crossover offspring sequence. In this embodiment, the set of all offspring individuals after the above crossover and mutation operations is defined as the new generation population.
[0097] It is worth noting that this embodiment repeats the above evaluation and evolution cycle, extracts the system deduction clock, and determines whether the clock value has reached the preset switching time. Regarding the method for determining the preset switching time, this embodiment obtains the previously determined total scheduling time, obtains the preset switching ratio coefficient, and calculates the preset switching time by multiplying the total scheduling time by the preset switching ratio coefficient.
[0098] It should be noted that, regarding the determination process of the preset switching ratio coefficient, this embodiment performs a one-dimensional grid search on historical production scheduling data to calculate the total equipment switching frequency and local over-limit failure frequency under different ratio coefficients. The total equipment switching frequency is multiplied by a preset first weighting coefficient, and the local over-limit failure frequency is multiplied by a preset second weighting coefficient. The two products are then added together to obtain the comprehensive evaluation value. The first weighting coefficient is set to one, and the second weighting coefficient is set to one thousand, to highlight that the priority of safety over-limit prevention is far higher than equipment switching efficiency. A specific ratio value that reduces the comprehensive evaluation value to the lowest globally is selected and calibrated as the preset switching ratio coefficient. In the current iteration round when the clock reaches the switching moment, this embodiment stops population evolution, extracts the optimal individual with the highest fitness value in the population, and parses the complete scheduling sequence of this optimal individual to obtain the global sequence. This embodiment extracts the absolute inventory value of each silo and the equipment operation status variables at this moment from the dynamic model, encapsulates the set of these variables into a read-only data structure, and obtains the system snapshot.
[0099] It should be further explained that the frequency of local over-limit prevention failure refers to the failure during the greedy scheduling phase. If the real-time inventory of a silo exceeds the preset upper limit or falls below the preset lower limit at a certain moment, it is counted as one over-limit prevention failure. In the one-dimensional grid search of historical production scheduling data, for each candidate switching ratio coefficient, the complete scheduling process is run, and the total number of times the above-mentioned over-limit or under-limit events occur in the entire scheduling cycle is counted. This is the frequency of local over-limit prevention failure corresponding to the coefficient.
[0100] In step S14, the system snapshot is parsed to extract local inventory and time status, and the execution environment is constructed based on the local inventory and time status.
[0101] The process of parsing the system snapshot to extract local inventory and time status includes:
[0102] The local inventory is obtained by parsing the system snapshot to extract the precise inventory level at the switching moment;
[0103] The system snapshot is analyzed to extract the time point and device status at the switching moment;
[0104] The time state is obtained by combining the time node with the device state.
[0105] In one implementation, this embodiment opens the system snapshot generated in the preceding steps as a read-only data structure, and reads the absolute inventory values of all internal materials of the silo arrays at the switching moment recorded in the snapshot data packet using key-value pair parsing instructions. This embodiment determines these arrays of inventory values representing the instantaneous physical load of each silo as the local inventory.
[0106] It should be noted that this embodiment continues to analyze the system snapshot, extracts the absolute simulation clock value recorded when the snapshot was generated, and determines it as the time node. This embodiment analyzes the current working attribute parameters of the conveyor belt actuator in the snapshot, reads the global identification code of the silo currently in the connected discharge state and the remaining unfinished allocated conveying time of the silo, and combines the global identification code of the silo with the remaining conveying time to determine the equipment state.
[0107] It is worth noting that this embodiment establishes a new multi-dimensional state structure, using the extracted time node as the time base field of this structure, and the silo global identification code and remaining conveying time in the equipment status as the execution attribute fields of this structure. These fields are combined and nested to generate the time state. Simultaneously, this embodiment further parses the system snapshot, extracting the remaining planned target values of each silo that have not yet completed conveying at the switching time, and determining them as the amount of material to be transported. This embodiment instantiates a virtual simulation sandbox using a greedy algorithm, synchronously loading the extracted local inventory, time state, and amount of material to be transported into the initial environment pointer of the virtual simulation sandbox, completing the rigid connection of the underlying data, thereby constructing the complete execution environment.
[0108] In step S15, the highest silo is extracted from the execution environment, and a transportation task is obtained by allocating time to the highest silo. The local inventory and the time state are updated according to the transportation task. The operations of extracting the highest silo and updating the state are executed cyclically until the time state reaches the preset end time to obtain a local sequence.
[0109] The process of extracting the highest silo from the execution environment and allocating time to the highest silo to obtain a transportation task includes:
[0110] Extract the target number with the largest value from the local inventory, and determine the physical silo corresponding to the target number as the highest silo;
[0111] The local duration for the highest silo is calculated using a greedy algorithm based on a preset local constraint formula.
[0112] The transportation task is obtained by combining the highest silo with the local duration.
[0113] In one implementation, this embodiment iterates through the local inventory array in the execution environment constructed in the preceding steps, comparing the current precise inventory levels of each silo recorded in the array. The global identification code corresponding to the silo with the largest precise inventory level is extracted and designated as the target number with the largest value. Subsequently, the system uses a mapping table to point the target number to the physical silo entity corresponding to the actual industrial site, and designates this physical silo entity as the highest-ranking silo in the current decision step.
[0114] It should be noted that this embodiment utilizes the local optimum solution logic of the greedy algorithm, without making long-term extrapolations of the inventory status in future time steps, but directly allocating the extreme duration for the currently selected highest silo. This embodiment obtains a preset local constraint formula and calculates the local duration for the highest silo based on this preset local constraint formula. The determination and calculation method of this preset local constraint formula is exactly the same as the method for calculating the operation duration based on the simulation trajectory described in S12, that is, it also extracts the current remaining time, the current capacity of the highest silo, and the amount of material to be transported, and calculates the time threshold, lower limit threshold, upper limit threshold, and transportation threshold respectively in combination with preset lower inventory limit, net output rate, upper inventory limit, productivity, and transportation rate, and extracts the minimum value among them as the local duration. By reusing the aforementioned four-dimensional maximum and minimum value constraint calculation method, the system imposes strict physical boundary restrictions on the single-step execution action of the greedy algorithm.
[0115] It is worth noting that in this embodiment, the global identification code of the highest silo is determined and the calculated local duration is concatenated into an atomic operation instruction package containing two data dimensions: service object and duration. This atomic operation instruction package is then identified as the transportation task generated in this decision step.
[0116] Updating the local inventory and the time status according to the transportation task includes:
[0117] Calculate the target consumption and production increase based on the local duration of the transportation task;
[0118] The current capacity of the highest silo is updated based on the target consumption, and the current capacity of the remaining silos is updated based on the production increase to obtain the updated inventory.
[0119] The update time is obtained by adding the local duration to the time state;
[0120] Replace the local inventory and the time status with the updated inventory and the updated time, respectively.
[0121] In one implementation, this embodiment parses the local duration from the transportation task. For the selected highest-performing silo, its corresponding preset net output rate is obtained, and the local duration is multiplied by the preset net output rate to calculate the target consumption. For all other silos in the local inventory besides the highest-performing silo, their respective preset production rates are obtained, and the local duration is multiplied by the preset production rate of the corresponding silo to calculate the production increase of each of the remaining silos during this period.
[0122] It should be noted that this embodiment performs the state update operation in the in-memory data structure. The current capacity value of the highest-capacity silo in the local inventory is located, and the target consumption amount is subtracted from this capacity value to obtain the latest capacity of the highest-capacity silo. Simultaneously, the current capacity values of the remaining silos are traversed, and the corresponding capacity values are added to the production increase amount to obtain the latest capacity of each remaining silo. In this embodiment, the set of the latest capacities of all silos after the above addition and subtraction operations is determined as the updated inventory.
[0123] For example, suppose at a certain idle decision point, the local inventory shows that silo A has a maximum inventory of 40,000 tons, while the remaining silo B has an inventory of 20,000 tons. Using a greedy algorithm and the local constraint formula, the local duration for silo A is calculated to be 2 hours. If the preset net output rate of silo A is 3,800 tons per hour, and the preset production rate of silo B is 1,200 tons per hour, then the target consumption of silo A is calculated to be 7,600 tons, and the production increase of silo B is 2,400 tons. When updating capacity, the new capacity of silo A is 40,000 minus 7,600, which equals 32,400 tons, and the new capacity of silo B is 20,000 plus 2,400, which equals 22,400 tons. The updated inventory for the current step consists of 32,400 tons and 22,400 tons.
[0124] It is worth noting that in this embodiment, the system time node from the preceding time state is extracted, and the value of the local duration is added to the system time node to calculate the updated time after the advancement. The system uses the generated updated inventory to overwrite the original local inventory variable storage area, and uses the updated time to overwrite the original time state variable storage area. Based on this, the system determines whether the time state has reached a preset end time.
[0125] It should be noted that, regarding the preset end time, the system directly obtains the absolute clock endpoint value corresponding to the preset total scheduling time determined in S12 as the end time. If the preset end time is not reached, the system uses the updated environment as a new starting point and jumps back to the step of extracting the highest silo to perform loop iteration; if the preset end time is reached, the system ends the iteration and arranges and merges all transportation tasks generated sequentially during the loop in chronological order to generate the local sequence.
[0126] In step S16, the global sequence and the local sequence are concatenated to obtain the final solution.
[0127] In one implementation, this embodiment reads the global sequence generated by the genetic algorithm and stored in the storage medium in S13, and the local sequence generated by the greedy algorithm and stored in the cache in S15, in the fusion output module of the scheduling system.
[0128] It should be noted that this embodiment establishes a one-dimensional overall timeline starting at time zero and ending at a preset end time. The system maps the global sequence to the interval from time zero to the preset switching time on this overall timeline, and maps the local sequence to the interval from the preset switching time to the preset end time on this overall timeline. Since the initial time starting point of the local sequence strictly inherits from the switching time that generated the system snapshot, the two sequences exhibit seamless continuity at time nodes.
[0129] It is worth noting that this embodiment formats and encapsulates the spliced timeline data. The discrete action sequence is converted into a continuous time series structure containing timestamps, corresponding execution silo numbers, start instructions, and stop instructions. This continuous time series structure is then output to the execution memory area of the programmable logic controller (PLC) and determined as the final scheme guiding the actions of the industrial equipment in the field.
[0130] Reference Figure 3 and Figure 4 This embodiment demonstrates the output results of the above optimization method in a real scheduling scenario. For example... Figure 3 As shown, the upper graph reflects the real-time inventory ratio fluctuations of each silo, such as silos A, B, C, and D, within the total scheduling time. The lower Gantt chart clearly shows the switching actions of conveying equipment and the distribution of specific transportation tasks within each time period. Figure 4 As shown, the instance output data table generated by the system accurately records the physical inventory and corresponding storage capacity percentage of each silo at discrete time points, verifying that the present invention achieves continuous and stable scheduling execution while meeting safety threshold constraints.
[0131] In summary, this invention constructs a two-stage scheduling framework based on a genetic-greedy hybrid algorithm, using system state snapshots as the data connection hub between the two stages. This achieves seamless splicing of long-term global optimization in the front end and rapid local agile execution in the back end on the time axis. By embedding a graded risk correction mechanism based on real-time inventory and predicted inventory at the bottom layer of the genetic algorithm, proactive defense logic is directly injected into the gene sequence of the scheduling individuals, completely eliminating the risks of silo overflow and material shortage under continuous high-dynamic production conditions. By introducing a four-dimensional maximum and minimum value constraint calculation model that integrates physical parameters of multiple equipment sources, the duration of a single transportation task is accurately quantified physically, breaking down the barriers between virtual algorithm simulation and the underlying layer of real industrial control. This effectively solves the technical challenge of balancing global optimization efficiency and local extreme dynamic response in multi-silo collaborative scheduling. While providing the production line with absolute safety and extremely high robustness, it minimizes unnecessary switching and mechanical wear of the actuators, ensuring that the final output scheduling scheme is 100% directly implementable in engineering.
[0132] Reference Figure 2 The second embodiment of the present invention provides a silo scheduling optimization system based on a genetic-greedy hybrid algorithm, comprising:
[0133] The modeling initialization module is used to obtain the initial inventory and equipment parameters, construct a dynamic model based on the initial inventory and equipment parameters, and generate an initial population using a genetic algorithm based on a preset population size.
[0134] The simulation evaluation module is used to extract the current individual from the initial population, input the current individual into the dynamic model for simulation decoding to obtain the simulated trajectory, calculate the computation time based on the simulated trajectory, and calculate the fitness value based on the simulated trajectory, the computation time, and a preset fitness function.
[0135] The early warning evolution module is used to extract real-time inventory from the simulated trajectory, extrapolate short-term inventory based on the simulated trajectory, perform risk correction operations on the current individual based on the real-time inventory, the short-term inventory, and a preset safety threshold to obtain corrected individuals, update the initial population based on the corrected individuals to obtain an updated population, and iterate the updated population based on the fitness value until a preset switching time to obtain a global sequence and a system snapshot; wherein in each iteration, simulation decoding, fitness value calculation, and risk correction operations are performed on the current individual, and the population is updated with the corrected individuals;
[0136] The environment construction module is used to parse the system snapshot to extract local inventory and time status, and construct the execution environment based on the local inventory and time status;
[0137] The local scheduling module is used to extract the highest silo from the execution environment, allocate time to the highest silo to obtain a transportation task, update the local inventory and the time status according to the transportation task, and repeatedly execute the operations of extracting the highest silo and updating the status until the time status reaches a preset end time to obtain a local sequence.
[0138] The scheme splicing module is used to splice the global sequence and the local sequence to obtain the final scheme.
[0139] It should be noted that the silo scheduling optimization system based on the genetic-greedy hybrid algorithm provided in this embodiment of the invention is used to execute all the process steps of the silo scheduling optimization method based on the genetic-greedy hybrid algorithm in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0140] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0141] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A silo scheduling optimization method based on a genetic-greedy hybrid algorithm, characterized in that, include: Obtain initial inventory and equipment parameters, construct a dynamic model based on the initial inventory and equipment parameters, and generate an initial population using a genetic algorithm based on a preset population size; The current individual is extracted from the initial population, and the current individual is input into the dynamic model for simulation decoding to obtain a simulated trajectory. The computation time is calculated based on the simulated trajectory, and the fitness value is calculated based on the simulated trajectory, the computation time, and a preset fitness function. Real-time inventory is extracted from the simulated trajectory, short-term inventory is deduced based on the simulated trajectory, risk correction operation is performed on the current individual based on the real-time inventory, the short-term inventory and a preset safety threshold to obtain a corrected individual, the initial population is updated based on the corrected individual to obtain an updated population, and the updated population is iterated based on the fitness value until a preset switching time is obtained to obtain a global sequence and a system snapshot. In each iteration, simulation decoding, fitness value calculation and risk correction operations are performed on the current individual, and the population is updated with the corrected individual. The system snapshot is parsed to extract local inventory and time status, and the execution environment is constructed based on the local inventory and time status. Extract the highest silo from the execution environment, allocate time to the highest silo to obtain a transportation task, update the local inventory and the time state according to the transportation task, and repeatedly execute the operations of extracting the highest silo and updating the state until the time state reaches the preset end time to obtain a local sequence. The final solution is obtained by concatenating the global sequence and the local sequence.
2. The method according to claim 1, characterized in that, The step of generating an initial population using a genetic algorithm based on a preset population size includes: The occurrence frequency is calculated based on the preset allocation ratio and the initial inventory, and a first subset is generated based on the occurrence frequency; Extract silo numbers based on the equipment parameters, and perform a random permutation operation on the silo numbers to obtain a second subset; The first subset and the second subset are merged to obtain the initial population.
3. The method according to claim 1, characterized in that, The calculation of the computation time based on the simulated trajectory includes: Extract the current time, current capacity, and amount of materials to be transported from the simulated trajectory; A time threshold is calculated based on the preset total scheduling time and the current time, and a lower limit threshold is calculated based on the current capacity, the preset lower inventory limit, and the preset net output rate. The upper limit threshold is calculated based on the preset inventory limit, the current capacity, and the preset productivity; the transportation threshold is calculated based on the amount of materials to be transported and the preset transportation rate. The minimum value is extracted from the time threshold, the lower threshold, the upper threshold and the transportation threshold, and the minimum value is determined as the operation time.
4. The method according to claim 1, characterized in that, The step of calculating the fitness value based on the simulated trajectory, the computation time, and a preset fitness function includes: Based on the simulated trajectory, the frequency of exceeding limits, the frequency of being too low, the switching frequency, and the average inventory level are statistically analyzed. The absolute deviation is calculated based on the computation time to obtain the fragmentation penalty item. Based on the over-limit frequency, the under-limit frequency, the switching frequency, the average inventory level, and the fragmentation penalty item, a weighted summation operation is performed using preset over-limit weights, preset under-limit weights, preset switching weights, preset inventory weights, and preset fragmentation weights to obtain a comprehensive penalty value. The fitness value is obtained by calculating the negative of the comprehensive penalty value.
5. The method according to claim 1, characterized in that, The step of performing a risk correction operation on the current individual based on the real-time inventory, the short-term inventory, and a preset safety threshold to obtain a corrected individual includes: If the real-time inventory exceeds the preset upper limit threshold, then the excess number is extracted from the real-time inventory, and the system is forcibly switched to the physical silo corresponding to the excess number to perform a correction operation on the current individual to obtain the corrected individual; If the real-time inventory is not greater than the upper limit threshold, then compare the short-term inventory with the preset warning threshold; If the short-term inventory is greater than the warning threshold, then an insertion mutation operation is performed on the current individual to obtain the corrected individual; If the short-term inventory is not greater than the warning threshold, then the current individual is identified as the corrected individual.
6. The method according to claim 1, characterized in that, The step of iterating the updated population according to the fitness value until a preset switching time to obtain a global sequence and a system snapshot includes: The tournament selection algorithm is used to extract superior individuals from the updated population based on the fitness value, and sequential crossover is performed on the superior individuals to obtain crossover offspring. Perform gene position exchange operation on the crossover offspring to obtain a new generation population, and return the new generation population as the updated population to perform a loop iteration operation; When the preset switching time is reached, the optimal individual is extracted from the updated population, and the optimal individual is parsed to obtain the global sequence; The system snapshot is obtained by extracting the state data at the switching moment.
7. The method according to claim 1, characterized in that, The process of parsing the system snapshot to extract local inventory and time status includes: The local inventory is obtained by parsing the system snapshot to extract the precise inventory level at the switching moment; The system snapshot is analyzed to extract the time point and device status at the switching moment; The time state is obtained by combining the time node with the device state.
8. The method according to claim 1, characterized in that, The step of extracting the highest silo from the execution environment and allocating time to the highest silo to obtain a transportation task includes: Extract the target number with the largest value from the local inventory, and determine the physical silo corresponding to the target number as the highest silo; The local duration for the highest silo is calculated using a greedy algorithm based on a preset local constraint formula. The transportation task is obtained by combining the highest silo with the local duration.
9. The method according to claim 8, characterized in that, The step of updating the local inventory and the time status according to the transportation task includes: Calculate the target consumption and production increase based on the local duration of the transportation task; The current capacity of the highest silo is updated based on the target consumption, and the current capacity of the remaining silos is updated based on the production increase to obtain the updated inventory. The update time is obtained by adding the local duration to the time state; Replace the local inventory and the time status with the updated inventory and the updated time, respectively.
10. A silo scheduling optimization system based on a genetic-greedy hybrid algorithm, characterized in that, include: The modeling initialization module is used to obtain the initial inventory and equipment parameters, construct a dynamic model based on the initial inventory and equipment parameters, and generate an initial population using a genetic algorithm based on a preset population size. The simulation evaluation module is used to extract the current individual from the initial population, input the current individual into the dynamic model for simulation decoding to obtain the simulated trajectory, calculate the computation time based on the simulated trajectory, and calculate the fitness value based on the simulated trajectory, the computation time, and a preset fitness function. The early warning evolution module is used to extract real-time inventory from the simulated trajectory, extrapolate short-term inventory based on the simulated trajectory, perform risk correction operation on the current individual based on the real-time inventory, the short-term inventory and a preset safety threshold to obtain a corrected individual, update the initial population based on the corrected individual to obtain an updated population, and perform iterative operation on the updated population based on the fitness value until a preset switching time to obtain a global sequence and a system snapshot. In each iteration, simulation decoding, fitness value calculation and risk correction operations are performed on the current individual, and the population is updated with the corrected individual. The environment construction module is used to parse the system snapshot to extract local inventory and time status, and construct the execution environment based on the local inventory and time status; The local scheduling module is used to extract the highest silo from the execution environment, allocate time to the highest silo to obtain a transportation task, update the local inventory and the time status according to the transportation task, and repeatedly execute the operations of extracting the highest silo and updating the status until the time status reaches a preset end time to obtain a local sequence. The scheme splicing module is used to splice the global sequence and the local sequence to obtain the final scheme.