Method, system and medium for flexible job shop scheduling and layout co-optimization
By employing a three-layer encoded niche meme algorithm and a local search strategy, the problem of coordinated optimization of scheduling and equipment layout in flexible work workshops was solved, thereby compressing the production cycle and improving production efficiency. This addresses the issues of high logistics costs and long production cycles in existing technologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAZHONG UNIV OF SCI & TECH
- Filing Date
- 2026-05-12
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies have failed to effectively achieve coordinated optimization of scheduling and equipment layout in flexible workshops, resulting in detours in logistics transportation routes, excessively long handling distances, increased logistics costs, and extended production cycles. Furthermore, existing algorithms struggle to balance global exploration and local development within a vast solution space.
A three-layer coding niche meme algorithm combined with a critical path-based local search strategy is used to construct a flexible job shop scheduling and equipment layout collaborative optimization model. The three-layer coding (process coding layer, machine selection coding layer, and layout allocation coding layer) represents the coupling relationship between scheduling and space, and the niche partitioning and local search mechanism are used to optimize the production scheduling sequence and equipment layout.
It significantly reduces the roundabout handling of AGVs and the invalid waiting time between processes, improves production efficiency, shortens the production cycle, ensures population diversity and algorithm solution quality, and realizes efficient flexible workshop scheduling and equipment layout collaborative optimization.
Smart Images

Figure CN122198259B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of flexible job shop scheduling optimization technology, and relates to methods, systems and media for flexible job shop scheduling and layout collaborative optimization, and particularly to a method, system and storage medium for flexible job shop scheduling and equipment layout optimization based on a local search operation-enhanced niche meme algorithm. Background Technology
[0002] With the popularization of small-batch, multi-variety flexible production models, flexible manufacturing systems with dynamic adjustment capabilities are gradually becoming the mainstream, which puts forward higher requirements for the scheduling and optimization of flexible workshops.
[0003] Currently, optimization solutions for flexible work workshops generally adopt a "divide and conquer" strategy, which involves optimizing scheduling schemes under a fixed equipment layout or planning the layout based on assumed logistics routes. This separate optimization strategy fails to fully consider the inherent coupling between work scheduling and equipment layout, resulting in a disconnect between logistics time and equipment distance.
[0004] Specifically, the logistics needs of the workshop (i.e., the frequency and flow of material handling between various devices) are dynamically determined by specific process scheduling schemes; while the physical distances determined by the equipment layout directly translate into the actual transportation time of AGVs (Automated Guided Vehicles), which in turn disrupts the original scheduling expectations. If these two are separated, layout optimization is often based on distorted logistics assumptions, while scheduling optimization is limited by unreasonable transportation times. This directly manifests in actual production as circuitous logistics routes and excessively long handling distances. This not only increases logistics costs but also delays the production cycle and weakens the company's responsiveness. Therefore, how to achieve the synergistic integration of workshop scheduling and equipment layout has become a key technical issue of concern for researchers.
[0005] In achieving coordinated optimization of scheduling and layout, existing technologies still face significant algorithmic bottlenecks, struggling to balance global exploration and local development within a vast and complex joint solution space. Furthermore, coordinated optimization involves not only the processing sequence and AGV selection but also complex equipment layout characteristics, leading to an expansion of the solution space for the entire optimization model. On one hand, traditional evolutionary algorithms lack diversity maintenance mechanisms for layout coding characteristics, making the population highly susceptible to premature convergence due to homogenization. On the other hand, existing local search strategies are mostly limited to neighborhood mutation of machine blocks and transport blocks, lacking neighborhood mutation of layout coding. This means that when the time bottleneck hindering production cycle shortening is caused by the unreasonable physical location of a key piece of equipment, existing algorithms struggle to specifically optimize and break through the bottleneck, resulting in severely limited local development capabilities and ultimately failing to achieve deep compression and optimization of the workshop production cycle. Summary of the Invention
[0006] In response to one or more of the above-mentioned defects or improvement needs of the existing technology, the present invention provides a method, system and medium for the coordinated optimization of flexible workshop scheduling and layout. It can accurately represent the coupling relationship between the scheduling sequence of flexible workshop and the spatial relationship of equipment, eliminate invalid logistics waiting time from the source, significantly reduce the detour handling of AGVs and invalid waiting between processes, and significantly improve actual production efficiency.
[0007] To achieve the above objectives, one aspect of the present invention provides a method for coordinated optimization of flexible workshop scheduling and layout, comprising the following steps: (1) Construct a collaborative optimization model for flexible operation workshop scheduling and equipment layout, and clarify the optimization objectives, scheduling and transportation timing constraints and equipment layout constraints; (2) The model is solved by combining a three-layer encoded niche meme algorithm with a critical path-based local search strategy, and the optimal production scheduling sequence and equipment layout scheme are output; where: The three-layer coding includes a process coding layer to indicate the processing sequence of processes, a machine selection coding layer to indicate the machine selected for each process, and a layout allocation coding layer to indicate how the machines are arranged in the workshop.
[0008] As a further improvement of the present invention, in step (1), the optimization objective is to minimize the maximum completion time. It is characterized by the following formula:
[0009]
[0010] In the formula, The subscript for the workpiece is [index], and its range is [range]. ; For workpiece The subscript of the corresponding process has a range of variation. ; For workpiece final process The processing completion time; The index of the AGV that will perform the unloading task; The transport speed of the AGV; For workpiece final process The assigned processing machine number; For processing machines Location coordinates within the workshop; The coordinates of the unloading station's location within the workshop; For position With position Manhattan distance between them; The subscript is used to represent The AGV arrives at the machine Time; The subscript is used to represent The time after the AGV completes the previous task; The subscript is used to represent The coordinates of the position of a task in the workshop on the AGV.
[0011] As a further improvement of the present invention, the scheduling and transportation timing constraints include at least the unique delivery constraint, the AGV empty / loaded transportation time connection constraint, and the process start time constraint. and / or The device layout adopts a row-based layout strategy, and the device layout constraints include at least single-row allocation constraints, effective placement constraints of geometric boundaries, and cross-device anti-overlap constraints.
[0012] As a further improvement of the present invention, in step (2), a decoding mechanism is constructed for the three-layer encoding, the decoding mechanism including: Select the process to be processed according to the process coding layer sequence, determine the processing equipment according to the machine selection coding layer, and resolve the equipment coordinates according to the layout of the coding layer; AGVs are allocated based on the first-come, first-served principle. The total time for a workpiece to travel from the loading station to the unloading station is calculated, and the maximum completion time is used as the fitness value.
[0013] As a further improvement of the present invention, the solution process in step (2) further includes the following sub-steps: S1: Execute the decoding mechanism, calculate the fitness value of each individual in the initial population, set the algorithm parameters, and initialize the population; S2: Determine the evolutionary stage based on the current iteration number; if in the exploration stage, execute the niche partitioning process based on the difference in layout encoding sequence; if entering the convergence stage, cancel the niche partitioning and evolve in a single large population. S3: Perform crossover and mutation operations within each niche or large population to generate offspring, and recalculate the fitness value of the offspring. S4: Select elite individuals based on offspring fitness values, perform local search operations based on critical paths, and update the population in a targeted manner based on the elite preservation strategy; If the hybrid algorithm satisfies the maximum number of iterations or the convergence condition, it outputs the optimal individual of the population; otherwise, it jumps to S2 for repeated iterations until the termination condition is met.
[0014] As a further improvement of the present invention, the niche classification process in step S2 includes: S21: Construct an unassigned set containing all individuals; determine if the unassigned set is empty; if not empty, select the individual with the highest fitness value from it as the seed individual for the current niche. S22: Traverse the remaining individuals in the unassigned set and calculate the layout coding sequence difference between each remaining individual and the seed individual, which is represented by the Hamming distance, i.e.:
[0015] In the formula, For individuals and Genotypic diversity in the layout coding sequence; The length of the layout encoding sequence, Subscripts for gene loci; and Individuals and In the layout coding The physical location index value of the device on the dimension; Let Kronecker function be used when The value is 1 if the condition is met, and 0 otherwise. S23: Sort the individual layout coding sequence differences and, based on the preset niche size, assign the multiple individuals with the smallest differences to the niche of the seed individual; S24: Repeat the above steps until the unassigned set is empty, resulting in several subpopulations, and complete the niche division of all individuals.
[0016] As a further improvement of the present invention, in step S3, different crossover and mutation operations are used for the exploration phase and the convergence phase; wherein, in the exploration phase, stratified crossover and mutation operations are performed within each subpopulation. The layered crossover operation includes: performing crossover operation based on process priority on the process coding layer, performing mask crossover operation on the machine selection coding layer, and performing sequential crossover operation on the layout allocation coding layer; The mutation operations include: performing a multi-point reverse mutation operation on the process coding layer, performing a machine reallocation mutation operation on the machine selection coding layer, and performing a full layout permutation mutation operation on the layout allocation coding layer; wherein: The layout full permutation mutation operation is as follows: randomly select several non-repeating loci in the layout encoding, extract the corresponding machine numbers to form a subset to be optimized, generate the full permutation of the subset, and select the optimal permutation to replace the original encoding.
[0017] As a further improvement of the present invention, in step S4, the local search operation based on the critical path specifically includes: Extract the critical path from the current scheduling scheme, and identify machine critical blocks, transportation critical blocks, and cross-resource coupling blocks from the critical path; For the aforementioned machine critical blocks, a machine scheduling neighborhood search is performed to optimize the processing order; For the aforementioned key transportation blocks, a transportation scheduling neighborhood search is performed to optimize the AGV operation sequence; For the cross-resource coupling block, a layout collaborative neighborhood search is performed to optimize the device layout position.
[0018] As a further improvement of the present invention, the layout cooperative neighborhood search includes: The transportation tasks on the critical path are divided into discrete transportation task units and continuous transportation task chains; For discrete transportation task units: lock the starting machine and the ending machine corresponding to the task, and swap the positions of the ending machine and the machine at the target position closest to the starting machine in the layout coding layer; For a continuous transportation task chain: the head transportation node and the tail transportation node of the task chain are locked respectively, and the optimization strategy of discrete transportation task unit is applied to the machines on the paths corresponding to the head transportation node and the tail transportation node.
[0019] As a further improvement of the present invention, in step S4, the specific strategies for targeted population updates based on the elite preservation strategy include: During the exploration phase, a restricted niche elite retention strategy is implemented, which includes: allocating elite retention quotas according to the size proportion of each subpopulation, selecting parent elite individuals that meet the quota within each subpopulation, and replacing the worst individual in the corresponding subpopulation with the parent elite individuals. During the convergence phase, a global competitive elite retention strategy is implemented, which includes: breaking the subpopulation boundary, ranking based on the fitness values of the entire population, and selecting the globally best individual to replace the worst individual.
[0020] Another aspect of the present invention provides a system for the coordinated optimization of flexible workshop scheduling and layout, comprising: The model building module is used to build a collaborative optimization model for flexible workshop scheduling and equipment layout; the model includes an optimization objective aimed at minimizing the maximum completion time, as well as scheduling and transportation timing constraints and equipment layout constraints; The algorithm solution module employs a three-layer coding structure: a process coding layer, a machine selection coding layer, and a layout allocation coding layer. It solves the collaborative optimization model based on a niche meme algorithm using this three-layer coding structure, combined with a critical path-based local search strategy. The module includes: The habitat partitioning unit is used to selectively execute a habitat partitioning strategy based on the difference in layout coding sequence according to the evolutionary stage of the current iteration generation during the evolutionary process. A local search unit is used to perform a critical path-based local search operation on elite individuals when a triggering condition is met. The local search operation includes: Extract the critical path from the current scheduling scheme, identify machine critical blocks, transportation critical blocks and cross-resource coupling blocks from the critical path, and apply corresponding neighborhood operations to different critical blocks.
[0021] As a further improvement of the present invention, the local search unit includes: The critical block identification subunit is used to extract the critical path in the current scheduling scheme and identify machine critical blocks, transportation critical blocks and cross-resource coupling blocks from the critical path; The machine scheduling neighborhood search subunit is used to adjust the process sequence on the bottleneck machine for the machine's critical blocks; The transportation scheduling neighborhood search subunit is used to optimize the sequence of continuous transportation tasks executed by the same AGV for the transportation key block. The layout collaborative neighborhood search subunit is used to perform the layout collaborative neighborhood search for the cross-resource coupling block to adjust the layout position of the device.
[0022] In another aspect, the present invention also provides a storage medium storing a processor-executable program, which, when executed by a processor, is used to perform the method for coordinated optimization of flexible job shop scheduling and layout.
[0023] The aforementioned improved technical features can be combined with each other as long as they do not conflict with each other.
[0024] In summary, the beneficial effects of the above-described technical solutions conceived by this invention compared with the prior art include: (1) The method for coordinated optimization of flexible workshop scheduling and layout of the present invention includes the following steps: constructing a coordinated optimization model for flexible workshop scheduling and equipment layout, clarifying the optimization objective, scheduling and transportation timing constraints, and equipment layout constraints; using a three-layer encoded niche meme algorithm combined with a critical path-based local search strategy to solve the model, and outputting the optimal production scheduling sequence and equipment layout scheme. By utilizing the three-layer encoding mechanism, the precise representation of the coupling relationship between scheduling timing and equipment space is achieved, reducing ineffective logistics waiting time; at the same time, by utilizing the niche meme algorithm and the critical path-based directional local search mechanism, the problem of premature convergence under a large solution space is avoided, and the workshop production cycle is compressed, ensuring both population diversity in the solution process and the excellence of the final output result, ultimately achieving the goal of optimizing the coordinated optimization of flexible workshop scheduling and equipment layout.
[0025] (2) The flexible workshop scheduling and layout co-optimization method of the present invention effectively solves the problem of premature convergence under a large solution space by introducing a niche partitioning strategy based on the layout coding difference degree during the model solution process; in the face of the solution space explosion caused by scheduling and layout co-optimization, the population is divided into different niches and a restricted elite retention strategy is implemented to physically isolate the superior genes; effectively maintain the distribution diversity of the population in the complex solution space, avoid the defects of traditional evolutionary algorithms that are prone to homogenization and local optima, and ensure the solution quality and robustness of the algorithm from the global dimension.
[0026] (3) The flexible workshop scheduling and layout collaborative optimization method of the present invention introduces a directional local search mechanism based on the critical path in the model solution process, which realizes the compression of the workshop production cycle. It not only maintains the diversity of the population in the solution process, but also realizes the accurate positioning of the bottlenecks restricting the production cycle (such as bottleneck machines, inefficient transportation routes or unreasonable equipment coordinates). In this way, it can quickly break the current time bottleneck in a short period of time, drive the reconstruction scheme to converge quickly to a high-quality approximate optimal solution, and ultimately ensure that enterprises can continuously obtain efficient production schemes with shorter logistics distances and more compact production cycles in a flexible manufacturing environment with multiple varieties and variable batches, thereby improving enterprise production efficiency and reducing enterprise production costs.
[0027] (4) The flexible workshop scheduling and layout collaborative optimization system of the present invention is designed based on the flexible workshop scheduling and layout collaborative optimization method. It has a simple architecture and is easy to set up. It can meet the rapid execution requirements of the flexible workshop scheduling and equipment collaborative optimization algorithm, meet the rapid formulation of efficient production plans for enterprises in a flexible manufacturing environment with multiple varieties and variable batches, and meet the actual application requirements. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 This is a flowchart of the method for coordinated optimization of flexible workshop scheduling and layout in an embodiment of the present invention; Figure 2 This is a logical flowchart of the method for coordinated optimization of flexible workshop scheduling and layout in an embodiment of the present invention; Figure 3 This is a flowchart of the sub-steps in solving the model in the collaborative optimization method of this invention embodiment; Figure 4 This is a flowchart of the steps involved in niche partitioning in the collaborative optimization method of this invention. Figure 5 This is a schematic diagram of the three-layer coding scheme of the collaborative optimization model in a specific embodiment of the present invention; Figure 6 yes Figure 5 The Gantt chart after decoding the encoding scheme in the specific embodiment shown; Figure 7 yes Figure 5 The diagram shows the device layout after decoding the encoding scheme in the specific embodiment shown. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0031] In the description of this invention, it should be understood that, unless otherwise expressly specified and limited, the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," "circumferential," etc., indicating the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, are only for the convenience of describing this invention and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.
[0032] Furthermore, unless otherwise expressly defined, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise expressly and specifically defined.
[0033] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0034] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0035] Below, for reference Figures 1-7 This invention describes a method, system, and medium for the coordinated optimization of flexible workshop scheduling and layout according to a preferred embodiment of the invention.
[0036] As one aspect of the present invention, a method for collaborative optimization of flexible workshop scheduling and equipment layout is provided. The method aims to achieve collaborative optimization between workshop scheduling and equipment layout in a flexible work environment. By utilizing the strong coupling characteristics of flexible workshop scheduling and layout, a three-layer coding mechanism including process sequence, machine allocation, and equipment layout is constructed. The layout coordinates of physical space are rigidly bound to the process scheduling and AGV transportation sequence in the time dimension. Furthermore, by utilizing the constraint association at the bottom layer, the technical defects of logistics time estimation distortion in traditional separate optimization are overcome. This ensures that each scheduling instruction generated by the algorithm has physical space executability, thereby significantly reducing the detour handling of AGVs and the invalid waiting between processes, and significantly improving actual production efficiency.
[0037] Specifically, the method for coordinated optimization of flexible workshop scheduling and layout in the preferred embodiment includes the following steps: (1) Construct a collaborative optimization model for flexible operation workshop scheduling and equipment layout, and clarify the optimization objectives, scheduling and transportation timing constraints and equipment layout constraints; (2) The model is solved by combining a three-layer encoded niche meme algorithm with a critical path-based local search strategy, and the optimal production scheduling sequence and equipment layout scheme are output; where: The three-layer coding includes a process coding layer to indicate the processing sequence of processes, a machine selection coding layer to indicate the machine selected for each process, and a layout allocation coding layer to indicate how the machines are arranged in the workshop.
[0038] More specifically, for the collaborative optimization model constructed in the preferred embodiment, the preferred operating scenarios are as follows: Assuming flexible work has n A set of workpieces to be processed m A machine set consisting of processing equipment. Each workpiece involves several processes, and each process has a set of selectable processing machines. The scheduling process requires determining the specific processing machine from these sets. Simultaneously, the workshop logistics system is equipped with... k Each AGV is responsible for executing material transfer tasks between the loading station, processing equipment, and unloading station. At this time, the position of each processing machine in the workshop is a variable to be optimized, constrained by the equipment layout strategy. At time 0, all AGVs and workpieces to be processed are docked at the loading station; when all processes of a workpiece are completed, it must be transported by an AGV from the last processing equipment to the unloading station for the processing operation of that workpiece to be considered complete.
[0039] Based on the above scenario, a collaborative optimization model is constructed, and the optimization objective, scheduling and transportation timing constraints, and equipment layout constraints are described in detail.
[0040] Specifically, in a preferred embodiment, the optimization objective of the model in step (1) is preferably to minimize the maximum completion time. Its further preference is characterized by the following formula:
[0041]
[0042] In the formula, The subscript for the workpiece is [index], and its range is [range]. ; For workpiece The subscript of the corresponding process has a range of variation. ; For workpiece final process The processing completion time; The index of the AGV that will perform the unloading task; The transport speed of the AGV; For workpiece final process The assigned processing machine number; For processing machines Location coordinates within the workshop; The coordinates of the unloading station's location within the workshop; For position With position Manhattan distance between them, i.e. Characterization machine Manhattan distance between the unloading station and the unloading station Representing the previous task machine and machine Manhattan distance between them; The subscript is used to represent The AGV arrives at the machine Time; The subscript is used to represent The time after the AGV completes the previous task; The subscript is used to represent The coordinates of the position of a task in the workshop on the AGV.
[0043] More specifically, for the scheduling of AGVs in the preferred embodiment, the scheduling and transportation timing constraints include at least a unique delivery constraint, an AGV empty / loaded transportation time connection constraint, and a process start time constraint. Specifically, the preferred process for defining the scheduling and transportation timing constraints is as follows: First, define the relevant variables: Let For 0-1 decision variables, when the process The delivery task was assigned by number When the AGV is executed, Otherwise, it is 0; For workpiece The completion time of the previous process; For machines Available time after completing the previous processing task; and AGV The start and end times of the unloaded driving during the execution of this task; and These are the start and end times of the load-bearing driving, respectively. and These are the actual start time and completion time of the process on the machine, respectively; and These are the unloaded and loaded driving times calculated based on the layout distance, respectively. For the process in the machine The processing time.
[0044] At this point, each constraint condition is specifically represented as follows: Unique delivery constraint: Only one AGV can provide delivery services for any given process at any given time. .
[0045] The constraints on the connection between AGV empty / loaded transport time include: AGV Idle Journey Start Time Constraint: The start time of an AGV's idle journey cannot be earlier than the end time of the AGV's previous transport task, i.e. .
[0046] AGV Idle Journey End Time Calculation: The end time of an AGV's idle journey is the sum of the start time of the idle journey and the idle travel time, i.e. .
[0047] AGV load transport start time constraint: The start time of AGV load transportation shall not be earlier than the end time of the AGV's no-load journey, and shall not be earlier than the completion time of the previous process for that workpiece. .
[0048] AGV load transport end time calculation: The end time of AGV load transport is the sum of the load transport start time and the load transport time, i.e. .
[0049] Process start time constraint: The start time of the current process shall not be earlier than the end time of AGV load transportation, and shall not be earlier than the completion time of the previous processing task on the machine containing this process, i.e. .
[0050] The completion time of a process is the sum of the start time of the current process and the machine processing time, that is... .
[0051] Furthermore, in the preferred embodiment, the device layout preferably adopts a row-based layout strategy, and the device layout constraints include at least single-row allocation constraints, effective placement constraints of geometric boundaries, and cross-device anti-overlap constraints. Wherein: For the row layout strategy, its preferred definition is: The workshop adopts a multi-row facility layout structure, dividing the workshop into several parallel rows. Logistics channels for AGVs are provided between adjacent rows, and each device must and can only be assigned to a specific row. In this case, the location constraints of the device layout specifically include the following process: First, define the two-dimensional continuous coordinate system of the workshop and related variables: Let This refers to the collection of machines to be laid out within the workshop. ; This is a pre-designed arrangement of multiple rows of machines within the workshop. ; Indicates machine The coordinates of the lower left reference point in the workshop coordinate system; and They represent machines The physical length and width; and This represents the maximum length and width limits of the workshop.
[0052] At the same time, decision variables are introduced: Let For 0-1 variables, if the machine Assigned to the placement area Middle Otherwise, it is 0; let These are 0-1 variables used to represent the relative positions of two machines within the same row. If the machine... Placed in the machine On the left side Otherwise, it is 0; let It is a sufficiently large positive number. The layout position constraint can be specifically expressed by the following formula: Single-row assignment constraint: Each piece of equipment must and can only be assigned to one specific machine placement strip (single row) within the workshop, i.e. .
[0053] Geometric boundary effective placement constraint: The machine must be effectively placed within the layout boundaries, meaning the sum of the machine's geometric coordinates and dimensions must not exceed the length and width boundaries of the workshop; that is, the following conditions must be met: .
[0054] Cross-device overlap prevention constraint: Machines must not overlap in position. If any two machines... With machines Assigned to the same row (i.e.) Then their physical coordinates in the length direction must satisfy a mutual exclusion constraint: .
[0055] Furthermore, corresponding to the three-layer encoding strategy in the preferred embodiment, a decoding mechanism is constructed, which includes: Select the process to be processed according to the process coding layer sequence, determine the processing equipment according to the machine selection coding layer, and resolve the equipment coordinates according to the layout of the coding layer; AGVs are allocated based on the first-come, first-served principle. The total time for a workpiece to travel from the loading station to the unloading station is calculated, and the maximum completion time is used as the fitness value.
[0056] Specifically, when performing three-layer coding, it is preferable that the first layer is the process coding layer, the second layer is the machine selection coding layer, and the third layer is the layout allocation coding layer.
[0057] The preferred specific process for decoding is as follows: First, select the process steps of the process layer in sequence. The first step is to determine the process to be sorted; the second step is to determine the process based on the machine's selected coding layer. The corresponding processing machine is identified; then, based on the layout allocation coding layer, the specific spatial coordinates of the current processing machine within the workshop are parsed. Simultaneously, AGVs are allocated using a first-come, first-served assignment rule: the available time of candidate AGVs is calculated. And travel from its current location to the process Based on the machine's idle travel time, select the AGV that can arrive earliest to perform the task.
[0058] When the workpiece Complete its final processing step Then, the completion time of the unloading task is calculated based on the model. The specific calculation logic is as follows: Final process completion time of workpiece Arrival time of the AGV performing the unloading task The larger of the two values is taken as the unloading start time; the distance from the machine where this process is located to the unloading station is calculated and divided by the AGV's transport speed. Obtain the unloading and transportation time; add the unloading start time to the unloading and transportation time to obtain the final completion time of the workpiece.
[0059] Based on the above logic, the completion time of all workpieces is determined sequentially, and the maximum completion time is finally calculated. .
[0060] In practical solutions to collaborative optimization models, the preferred solution process is as follows: Figure 3 The diagram shows the following sub-steps: S1: Execute the aforementioned decoding mechanism, calculate the fitness value of each individual in the initial population, set the algorithm parameters, and initialize the population. Wherein: When initializing the population, the number of individuals in the population is... Each individual in the population employs a three-layer coding structure that includes process sequence, machine allocation, and equipment layout. The process sequence is randomly generated based on the number of workpieces and processes, the machine allocation is randomly selected from the set of feasible machines, and the equipment layout is randomly arranged to ensure the diversity of the initial population.
[0061] When setting the algorithm parameters, the maximum number of iterations is: The probability of crossover is The probability of mutation operation is The number of elite individuals retained is The size of the microhabitat is In addition, the triggering parameters for the local search strategy are set, where The algebraic interval for performing local search, This represents the number of elite individuals participating in each local search.
[0062] S2: Determine the evolutionary stage based on the current iteration number; if in the exploration stage, execute the niche partitioning process based on the difference in layout encoding sequence; if entering the convergence stage, cancel the niche partitioning and evolve in a single large population.
[0063] In actual judgment, it depends on the current iteration algebra. With maximum number of iterations The ratio determination algorithm is used to determine the evolutionary stage. If it is in the exploration stage, niches are defined, and crossover and mutation operations are restricted to occur independently within each niche to protect the structural diversity of rare layout features in the population. If it is in the convergence stage, global hybrid evolution is allowed to accelerate algorithm convergence.
[0064] More specifically, for niche classification strategies, the preferred classification process is as follows: Figure 4 As shown, it includes: S21: Sort all individuals in the population according to their fitness values from highest to lowest, and establish an unassigned set containing all individuals. Accordingly, design a judgment mechanism for the unassigned set, that is, check whether the unassigned set is empty. If it is not empty, select the individual with the highest fitness value from it as the seed individual for the current niche.
[0065] S22: Traverse the remaining individuals in the unassigned set and calculate the layout coding sequence difference between each remaining individual and the seed individual, which is represented by the Hamming distance, i.e.:
[0066] In the formula, For individuals and Genotypic diversity in the layout coding sequence; The length of the layout encoding sequence, Subscripts for gene loci; and Individuals and In the layout coding The physical location index value of the device on the dimension; Let Kronecker function be used when The value is 1 if the condition is met, and 0 otherwise.
[0067] For niche segmentation, it relies on the genotypic distance between individuals, which aims to measure the coding differences between individuals in the solution space. Therefore, for the workshop layout layer in the three-layer coding structure, since it is essentially a discrete arrangement of machine position indices, the Hamming distance can be used to characterize the genotypic differences between different individuals in the layout coding sequence.
[0068] S23: Sort the individual layout coding sequence differences and, based on the preset niche size, assign the multiple individuals with the smallest differences to the niche of the seed individual.
[0069] In actual division, a size is pre-defined for each microhabitat (i.e., subpopulation). At this point, by calculating the difference between each individual in the unassigned set and the seed individual, and selecting the individuals with the smallest difference... Individuals are incorporated into their current niche, thus forming a subpopulation.
[0070] S24: Repeat the above steps until the unassigned set is empty, resulting in several subpopulations, and complete the niche division of all individuals.
[0071] By utilizing the aforementioned niche partitioning strategy, the initial population can be quickly divided into multiple subpopulations, simplifying the model solution process while avoiding premature convergence under a large solution space.
[0072] S3: Perform crossover and mutation operations within each niche or large population to generate offspring, and recalculate the fitness value of the offspring.
[0073] Specifically, in the preferred embodiment, different crossover and mutation operations are used for the exploration phase and the convergence phase. In the exploration phase, stratified crossover and mutation operations are performed within each subpopulation; while in the convergence phase, the niche isolation mechanism is removed, all individuals are merged into a global large population, and the aforementioned crossover and mutation operations are performed within the global large population.
[0074] More specifically, the aforementioned layered crossover operations preferably include: performing crossover operations based on process priority on the process coding layer, performing mask crossover operations on the machine selection coding layer, and performing sequential crossover operations on the layout allocation coding layer. Meanwhile, the aforementioned mutation operations preferably include: performing multi-point reverse mutation operations on the process coding layer, performing machine reallocation mutation operations on the machine selection coding layer, and performing full layout permutation mutation operations on the layout allocation coding layer; wherein: The layout permutation mutation operation is as follows: randomly select several non-repeating loci in the layout code, extract the corresponding machine numbers to form a subset to be optimized, generate the full permutation of the subset, and select the optimal permutation to replace the original code.
[0075] Taking the stratified cross-operations within each microhabitat as an example, during the exploration phase, within each microhabitat... The probability is used to perform a stratified crossover operation on the population.
[0076] For the process coding layer, it is preferable to perform POX (Precedence Operation Crossover) operations: First, randomly divide the set of all workpiece numbers into two non-empty subsets. and When generating offspring, the parent generation is fully preserved. The middle belongs to the workpiece set All process genes are processed and fixed in their corresponding original positions in the offspring; subsequently, the parent generation... The middle belongs to the workpiece set The process genes, according to their in The relative order in which the parent and child processes appear is used to fill the remaining empty slots in the child process. This operation effectively inherits the superior substructure of the parent process and ensures that the generated child process sequence strictly meets the priority order constraints of the processing technology.
[0077] For machine-selected coding layers, MPX (Masked Permutation Crossover) operation is preferred: First, generate a random binary mask vector with the same length as the chromosome; iterate through this vector, if the... If the value of the bit is 1, then the child inherits from the parent at that position. Genes are allocated by the machine; otherwise, they are inherited from the parent. This strategy enables uniform recombination of machine selection strategies, increasing the diversity of machine allocation.
[0078] For layout-assigned coding layers, sequential interleaving is preferred: First, in the parent generation Two intersection points are randomly selected from the layout encoding to extract a preserved fragment. The layout sequence within this fragment is directly copied to the corresponding position on the offspring chromosome. Subsequently, from the parent... Starting from the initial position, the layout sequence is traversed, machine nodes already present in the reserved segment are removed, and the remaining machines are filled into the remaining empty slots of the child generation in the original order. This operation ensures that the generated child generation layout code constitutes a valid arrangement of devices without repetition or omission, while inheriting the local neighborhood features of the parent generation.
[0079] Based on the above crossover operation, the generated offspring individuals are processed according to probability. Perform multi-point inversion mutation, machine redistribution mutation, and layout permutation mutation operations.
[0080] For the process coding layer, it is preferable to perform multi-point reverse mutation operations: First, several unique locus indices are randomly selected within the chromosome length range, and the process codes at these index positions are extracted to form a subsequence. Then, this subsequence is geometrically reversed, and the reversed gene sequence is strictly filled back into the chromosome according to the original index positions. This operation aims to disrupt the processing order by shuffling the local gene arrangement.
[0081] For machine-selected encoding layers, perform resource reselection mutation operations: First, each locus in the machine coding layer is traversed. If a mutation probability is triggered at that location, the set of feasible machines for the process represented by that gene is identified. Then, a replacement machine different from the currently assigned machine is randomly selected from this set to update the gene value. This operation effectively explores the processing efficiency of different machine combinations by forcibly changing the resource allocation of the process.
[0082] For the layout allocation coding layer, it is preferable to perform a full layout permutation mutation operation: First, several target location indices are randomly selected in the layout encoding, and the machine numbers at these locations are extracted as a subset to be optimized. A full permutation of the machine numbers within this subset is generated, and corresponding temporary layout individuals are constructed. The fitness values of all temporary individuals are evaluated sequentially, and the permutation sequence with the best fitness is selected to replace the corresponding segment in the original chromosome. This operation introduces a local optimization mechanism during the mutation process to fine-tune the spatial physical location of the equipment to find a layout scheme with a shorter logistics path.
[0083] In addition, during the convergence phase, the isolation mechanisms of each niche are removed, all individuals are merged into a global population, and the aforementioned crossover and mutation operations are performed on the global population.
[0084] Based on the crossover and mutation operations at each layer in two stages, the sub-individuals in each (sub)population are obtained. On this basis, using the aforementioned decoding mechanism, the fitness value (maximum completion time) of each offspring can be calculated separately.
[0085] S4: Select elite individuals based on their offspring fitness values and perform local search operations based on critical paths, as well as targeted updates to the population based on the elite retention strategy; if the hybrid algorithm satisfies the maximum number of iterations or the convergence condition, output the optimal individual of the population; otherwise, jump to S2 for repeated iterations until the termination condition is met.
[0086] In actual operation, based on the preset interval parameters Determine when the local search mechanism is triggered. If the triggering condition is met, then use a greedy strategy to select the top-ranked fitness samples from the current population. Each elite individual is selected as the optimization target, and a local search operation is performed on it. After the local search is completed, based on the results of the evolutionary stage division, differentiated elite retention strategies are implemented for the exploration stage and the convergence stage respectively.
[0087] In a preferred embodiment, the local search operation of the critical path preferably includes: extracting the critical path in the current scheduling scheme, and identifying machine critical blocks, transportation critical blocks, and cross-resource coupling blocks from the critical path. Specifically, for the machine critical blocks, a machine scheduling neighborhood search is performed to optimize the processing order; for the transportation critical blocks, a transportation scheduling neighborhood search is performed to optimize the AGV operation sequence; and for the cross-resource coupling blocks, a layout coordination neighborhood search is performed to optimize the layout position of the equipment.
[0088] More specifically, in the actual local search operation, the preferred process is as follows: First, execute the critical path extraction and critical block identification procedures.
[0089] The earliest start time of each process is calculated by decoding, and the longest path with zero relaxation time, i.e., the critical path, is identified using a reverse backtracking algorithm. This path directly determines the maximum completion time. Subsequently, the node sequence on the critical path is decomposed into three types of critical block structures: Machine critical block: defined as a sequence of consecutive processing steps that occupy the same machine resources on the critical path, representing the processing bottleneck at the equipment end; Transportation critical block: defined as a sequence of transportation task nodes executed continuously by the same AGV on the critical path, representing the transportation flow bottleneck; Cross-resource coupling block: Defined as a transport task node on the critical path that connects two consecutive processing steps. This node strongly couples the end node of the previous step with the start node of the next step in the spatiotemporal dimension, and is limited by the physical layout distance between the starting machine and the ending machine.
[0090] Secondly, for the critical paths and critical blocks identified above, three hierarchically differentiated neighborhood search structures were designed to collaboratively optimize the process sequence, AGV scheduling sequence, and equipment space layout. That is: Machine scheduling neighborhood: This neighborhood operates at the process coding layer and aims to reduce congestion caused by process queuing by adjusting the process sequence on the bottleneck machine.
[0091] For example, first try the N5 neighborhood swapping strategy; if there is no improvement, then try the N7 neighborhood insertion strategy. Wherein: The N5 neighborhood exchange strategy identifies the head node of a critical machine block and its immediate successor node, or the tail node and its immediate predecessor node, and performs a position exchange operation. This strategy attempts to loosen the tight constraints of the critical path by changing the processing priority of adjacent workpieces on the machine block.
[0092] The N7 neighborhood insertion strategy removes the block head node from its current position and re-inserts it into another position within the block, or moves nodes within the block to after the block tail. This strategy fills machine time gaps by significantly delaying or advancing the processing of specific operations, thereby compressing the maximum completion time.
[0093] Transportation Scheduling Neighborhood: This neighborhood operates at the process coding layer, aiming to optimize the sequence of continuous transportation tasks executed by the same AGV. Within the identified transportation critical block, two transportation task nodes belonging to different workpieces are randomly locked, and their gene positions are exchanged in the chromosome. This neighborhood changes the transportation order of different workpieces by the AGV, thereby reducing idle travel time and queuing time caused by improper task coordination.
[0094] Layout Coordination Neighborhood: This neighborhood operates on the layout allocation coding layer to optimize the layout position of equipment. Based on the chain-like characteristics of transportation tasks on the critical path, it is divided into discrete transportation task units and continuous transportation task chains for differentiated processing, aiming to reconstruct the physical position of equipment based on the temporal characteristics of workpiece flow. Specifically: Discrete transport task unit: When the AGV transport key block contains only a single independent transport task, the algorithm identifies the starting and ending machines corresponding to that task. Using the distance matrix between workshop equipment, it retrieves the target location with the closest physical distance to the starting machine of that transport task. Identify the machine currently occupying the target location. Then, in the layout coding layer, the endpoint machine of this task is linked to the machine... By swapping location indices, the single load transport distance on the critical path can be minimized without changing the relative positions of other devices.
[0095] Continuous Transportation Task Chain: When the AGV transportation key block consists of a task chain composed of multiple time-sequential transportation tasks, the algorithm locks the head and tail transportation nodes of the task chain. Applying the aforementioned discrete unit optimization strategy, the layout of the starting and ending machines on the path corresponding to the head node, and the layout of the starting and ending machines on the path corresponding to the tail node, are optimized respectively. This strategy aims to shorten the physical distance between equipment in high-frequency logistics areas from a macroscopic perspective, reducing the long-distance round trips of AGVs during the continuous execution of multiple tasks.
[0096] After achieving local search through the aforementioned neighborhood structure combination, the fitness value of the optimized individual is calculated. If it is better than the original individual, the corresponding individual in the original population is replaced.
[0097] After the local search is completed, based on the results of the evolutionary stage division, differentiated elite retention strategies are implemented for the exploration stage and the convergence stage respectively, so as to achieve targeted population renewal.
[0098] More specifically, during the exploration phase, a restrictive niche elite retention strategy was implemented, strictly adhering to the niche affiliation principle to retain elites and replace individuals.
[0099] Specifically, before performing crossover and mutation operations, the number of individuals in each niche of the parent population is first counted, and the total number of elites to be retained globally is determined based on their size proportion. A weighted allocation is performed to calculate the parent elite quota that should be retained in each niche. Then, within each parent niche, individuals are sorted by fitness, and the best individuals meeting the quota are selected and temporarily stored. After the offspring population is generated, the temporarily stored parent elite individuals strictly replace the worst-fit individuals in each niche of the offspring population. This strategy, by establishing a mapping relationship between elite quotas and niche size, aims to balance the diversity of population distribution in the solution space with the depth of local development, thereby effectively improving the convergence accuracy of the algorithm.
[0100] During the convergence phase, a global competitive elite retention strategy is implemented. At this point, niche isolation boundaries are broken, and survival of the fittest is executed based on the fitness ranking of the entire population. Superior individuals are allowed to compete and replace each other across niches throughout the entire population, driving the algorithm to converge quickly to the global optimum.
[0101] The design of niche partitioning strategy and evolutionary stage determination effectively solves the problem of premature convergence under a large solution space. Faced with the solution space explosion caused by scheduling and layout co-optimization, the population is divided into different niches and a restricted elite preservation strategy is implemented to physically isolate superior genes. This effectively maintains the diversity of the population in the complex solution space, avoids the shortcomings of traditional evolutionary algorithms that easily fall into homogenization and local optima, and ensures the solution quality and robustness of the algorithm from a global perspective.
[0102] The following is a specific embodiment to further illustrate the aforementioned method for coordinated optimization of flexible workshop scheduling and layout.
[0103] In this embodiment, the flexible workshop has 5 processing machines, 3 AGV resources, and 4 workpieces to be processed, with process numbers of 3, 3, 4, and 4 for each workpiece. In this case, the length of both the process coding layer and the machine selection coding layer in the three-layer coding is 3+3+4+4=14. More specifically, the number of machines selectable for each process number is [2, 2, 3, 1, 1, 2, 1, 2, 3, 3, 3, 1, 1, 3], as shown below. Figures 5-7 As shown.
[0104] The process of coordinating and optimizing the scheduling and layout of the aforementioned flexible work workshop is as follows: (1) Construct a collaborative optimization model.
[0105] Based on the flexible workshop and other scenarios in the embodiments, a collaborative optimization model for scheduling and layout during the workpiece production process is constructed.
[0106] (2) Optimize the solution model.
[0107] The solution process of step (2) mainly includes the following sub-steps: Step 1: Encoding and Decoding.
[0108] To facilitate logical operations in computer programs, this embodiment uses a 0-starting numerical index format in the specific encoding array; while for physical entities such as workpieces, processes, and machines, a 1-starting natural numbering format is used to conform to common industrial understanding. The mapping relationship between the two is defined as follows: the numerical values in the encoding array... The physical entity in the corresponding text description or attached diagram .
[0109] For example, the encoded value 0 corresponds to machine 1 or workpiece 1; the encoded value 1 corresponds to machine 2 or workpiece 2, and so on. The following descriptions of the specific decoding process all follow this mapping rule.
[0110] Figure 5 This is a schematic diagram of the encoding scheme for this example. A three-layer encoding format, including process sequence, machine allocation, and equipment layout, is used to represent a feasible solution of the flexible workshop collaborative optimization model. Decoding is then performed based on this encoding to calculate the objective function value. Taking this example, which includes 4 workpieces, 5 machines, and a total of 14 processes, the specific meaning of each layer of encoding is explained below: The first layer is the process coding layer, where the coding length equals the total number of processes for all workpieces. The values in the array represent workpiece numbers, and the order in which the same value appears represents the processing order of that workpiece.
[0111] by Figure 5Taking the process layer encoding shown as an example, it is [2, 2, 3, 0, 1, 3, 2, 1, 0, 0, 3, 1, 2, 3]. According to the mapping rules, the value 2 at array index 0 represents workpiece 3, and this is the first occurrence of the value 2 in the sequence, so it is decoded as the first process of workpiece 3; the value 2 immediately following at index 1 represents the second occurrence of the value 2, so it is decoded as the second process of workpiece 3. This encoding method ensures the process priority constraints between processes.
[0112] The second layer is the machine selection encoding layer, which also has an encoding length of 14. This array uses a flat lookup table structure, that is, it is arranged in a fixed order according to all processes of workpiece 1, all processes of workpiece 2, ..., all processes of workpiece n. The values in the array represent the machine number index selected for the corresponding process.
[0113] by Figure 5 Taking the machine layer encoding shown as an example, it is [1, 2, 0, 1, 2, 3, 2, 4, 1, 2, 0, 3, 2, 4]. Workpiece 1 contains 3 processes, so the first 3 bits of the array represent the machines selected for the 1st, 2nd, and 3rd processes of workpiece 1, respectively. Therefore, the 1 in the first bit of the array indicates that the first process of workpiece 1 is processed by machine 2, and the 1 in the fourth bit of the array indicates that the first process of workpiece 2 is processed by machine 2.
[0114] The third layer: the layout allocation coding layer, whose coding length is equal to the total number of machines. The array index represents the physical location number within the workshop, and the value in the array represents the machine number index placed at that location.
[0115] by Figure 5 Taking the layout layer encoding shown as an example, it is [4, 1, 0, 2, 3]. Here, the value 4 represents machine 5, and the value 1 represents machine 2. This means that machine 5 is placed at position 1, machine 2 is placed at position 2, and so on. This arrangement directly determines the distance matrix between different machines.
[0116] Furthermore, Figure 6 for Figure 5 Example of a decoded Gantt chart using a Chinese encoding scheme. Figure 7 for Figure 5 A schematic diagram of the layout after decoding an example of a Chinese encoding scheme.
[0117] First, perform layout layer decoding to determine equipment location parameters: for the workshop layout layer encoding [4, 1, 0, 2, 3], a multi-row facility layout strategy is used during decoding to map the one-dimensional sequence into two-dimensional physical coordinates.
[0118] Specifically, the algorithm sequentially reads the machine gene values in the sequence and determines the remaining space in the current row based on the preset workshop row width constraint. Taking this embodiment as an example, machines M5 and M2 are placed in the first row. When M1 is read, because the accumulated width exceeds the boundary limit, the algorithm automatically triggers an automatic line wrapping mechanism, forcibly assigning M1 to the beginning position of the second row. Similarly, M3 follows M1, while M4 is assigned to the third row due to insufficient space. After all machines are placed, the algorithm performs vertical center alignment correction on each row to determine the exact physical coordinates of all machines and calculates the Manhattan distance matrix between each node, serving as the static basis for subsequent logistics time calculations.
[0119] Subsequently, the joint process layer and machine layer are decoded to construct a collaborative scheduling scheme. Based on the generated distance matrix, the transportation time of the AGV between different machines is calculated. The algorithm sequentially reads the gene sequences of the process layer and machine layer. For each workpiece process to be scheduled, it comprehensively considers the completion time of its predecessor process, the load transportation time of the AGV from the predecessor machine to the current designated machine, and the idle release time of the current machine, and takes the maximum value of the three to determine the earliest start time of the process. By recursively calculating the processing and flow of all processes, the maximum completion time of all workpieces in the entire scheduling scheme is finally obtained, which is used as the fitness value to measure the quality of the individual.
[0120] Step 2: Population initialization and algorithm parameter setting.
[0121] When initializing the population, the number of individuals in the population... Individuals are initialized randomly, and each individual in the population adopts a three-layer coding structure. Then, the maximum completion time of each individual is calculated as the initial fitness value according to the decoding process in Step 1.
[0122] When setting parameters, set the maximum number of iterations for the algorithm. The crossover probability is 150. Setting it to 0.9 ensures a high frequency of gene recombination and a low probability of mutation. The value is set to 0.02 to maintain a moderate level of random perturbation. Simultaneously, the trigger interval for the local search strategy is set to an algebraic value. The number of elite individuals participating in each local search is 10. The value is 5, and the number of individuals retained under the global elite retention strategy. It is 10.
[0123] Step 3: Determine the current evolution stage based on the current iteration number.
[0124] Real-time comparison of the current iteration algebra With maximum number of iterations Set the stage switching threshold parameter It is 0.5. If If the algorithm is in the exploratory phase, then it is in the exploratory phase; that is, the first 75 generations of the algorithm are in the exploratory phase, and a niche partitioning strategy based on the difference in layout coding sequences is enforced; otherwise, if If the algorithm enters the convergence phase, it stops niche partitioning and switches to hybrid evolution.
[0125] When in the exploratory phase, niche classification is based on Formula for calculating two individuals and Genotypic differences in the layout coding sequence. Based on the above calculations, the population is divided into several independently evolving subpopulations. The specific steps are as follows: First, the 100 individuals in the population are sorted from highest to lowest fitness, and an unassigned set of individuals is established. During the partitioning process, the individual with the highest fitness in the unassigned set is selected first as the seed individual for the current niche, and the layout distance between this seed individual and the other individuals in the set is calculated. Next, the size of the microhabitat is pre-defined. If the distance to the seed individual is 20, select the 20 individuals closest to the seed individual and assign them to the current niche, and remove these individuals from the unassigned set; repeat the above process until all individuals in the population are assigned to the corresponding independent subpopulations.
[0126] Step 4: Perform crossover and mutation operations according to the evolutionary stage.
[0127] The evolutionary process is divided into an exploration phase and a convergence phase, and different crossover and mutation operations are applied to the two phases.
[0128] During the exploration phase, a restricted niche breeding strategy is implemented, meaning that the parent individuals involved in crossover are limited to the same niche. The crossover probability is set. The value is set to 0.9. The process layer uses the POX operator, the machine layer uses the MPX operator, and the layout layer uses the sequential crossover operator. Next, the mutation probability is set. The value is 0.02. Multi-point inversion mutation, machine redistribution mutation, and layout permutation mutation operations are performed on the generated offspring individuals according to the mutation probability to increase the random perturbation of the population.
[0129] During the convergence phase, the niche isolation mechanism is removed, all individuals are merged into a global population, and the aforementioned crossover and mutation operations are performed on the global population.
[0130] Step 5: Perform a local search based on the critical path for elite individuals and update the population based on the elite strategy.
[0131] Set the trigger interval algebra for the local search strategy. The number of elite individuals participating in each local search is 10. The interval parameter is set to 5. Whether a local search mechanism is triggered is determined based on the interval parameter. If triggered, the top 5 individuals with the highest fitness in the current population are selected as optimization targets for a local search. After the local search is completed, differentiated elite retention strategies are implemented for the exploration and convergence phases, based on the evolutionary stage divisions.
[0132] First, execute the critical path extraction and critical block identification procedures.
[0133] If a block is identified as a critical machine block, the N5 neighborhood swapping strategy is tried first within the block. If there is no improvement, the N7 neighborhood insertion strategy is then tried.
[0134] If a key block for transportation is identified, two transportation task nodes belonging to different workpieces are randomly locked within the block, and their gene positions are exchanged in the chromosome.
[0135] If identified as a cross-resource coupling block, it needs to be differentiated into discrete transportation task units and continuous transportation task chains based on the chain-like characteristics of transportation tasks on the critical path. For discrete transportation task units, the starting and ending machines corresponding to the task are locked. Using the distance matrix between workshop equipment, the target position closest to the starting machine is retrieved, and the machine currently occupying that target position is identified. Subsequently, in the layout coding layer, the position indices of the ending machine and the occupying machine of this task are swapped. If identified as a continuous transportation task chain, the head and tail transportation nodes of the task chain are locked respectively. Applying the above discrete unit optimization strategy, the layout of the starting and ending machines on the path corresponding to the head node, and the layout of the starting and ending machines on the path corresponding to the tail node are optimized respectively.
[0136] After achieving local search through the aforementioned neighborhood structure combination, the fitness value of the optimized individual is calculated. If it is better than the original individual, the corresponding individual in the original population is replaced.
[0137] After the local search is completed, based on the results of the evolutionary stage division, differentiated elite retention strategies are implemented for the exploration and convergence stages respectively, to achieve targeted population updates. Specifically: During the exploration phase, a restricted niche elite retention strategy will be implemented. A total elite retention limit will be set. The value is 10. Elite retention and individual replacement are strictly implemented according to the niche affiliation principle. The total number of elites to be retained is weighted and allocated based on the size proportion of each niche, thereby calculating the parental elite quota to be retained for each niche. The best individuals that meet the quota are selected and temporarily stored. After the offspring population is generated, the worst individuals in the corresponding offspring niche are replaced with the temporarily stored elite individuals.
[0138] During the convergence phase, a global competitive elite retention strategy is implemented. Niche isolation boundaries are broken down, and survival of the fittest is executed based on the fitness ranking of the entire population. Superior individuals are allowed to compete and replace each other across niches globally, driving the algorithm to converge quickly to the global optimum.
[0139] Step 6: If the hybrid algorithm satisfies the maximum number of iterations of 150 or the convergence condition, output the optimal individual of the population; otherwise, jump to Step 3 and iterate repeatedly until the termination condition is met.
[0140] As another aspect of the present invention, a system for coordinated optimization of flexible workshop scheduling and layout is also provided. The construction of this system corresponds to the aforementioned method and includes: The model building module is used to construct a collaborative optimization model for flexible workshop scheduling and equipment layout. This model includes an optimization objective aimed at minimizing the maximum completion time, as well as scheduling and transportation timing constraints and equipment layout constraints. The representation of the optimization objective and the specific determination of the constraints are described above and will not be repeated here.
[0141] The algorithm solution module employs a three-layer coding structure: a process coding layer, a machine selection coding layer, and a layout allocation coding layer. It uses a niche meme algorithm based on this three-layer coding structure combined with a critical path-based local search strategy to solve the collaborative optimization model. The module includes: The niche partitioning unit is used to selectively execute a niche partitioning strategy based on the difference in layout coding sequence according to the evolutionary stage of the current iteration generation during the evolutionary process.
[0142] A local search unit is used to perform a critical path-based local search operation on elite individuals when a triggering condition is met. The local search operation includes: Extract the critical path from the current scheduling scheme, identify machine critical blocks, transportation critical blocks and cross-resource coupling blocks from the critical path, and apply corresponding neighborhood operations to different critical blocks.
[0143] More specifically, the aforementioned local search unit is further preferably comprised of: The critical block identification subunit is used to extract the critical path in the current scheduling scheme and identify machine critical blocks, transportation critical blocks and cross-resource coupling blocks from the critical path; The machine scheduling neighborhood search subunit is used to adjust the process sequence on the bottleneck machine for the machine's critical blocks; The transportation scheduling neighborhood search subunit is used to optimize the sequence of continuous transportation tasks performed by the same automated guided vehicle for the transportation key block. The layout collaborative neighborhood search subunit is used to perform the layout collaborative neighborhood search for the cross-resource coupling block to adjust the layout position of the device.
[0144] It should be noted that the specific practices of the niche partitioning strategy executed by the niche partitioning unit and the local search operation executed by the local search unit are preferably the same as those described above, and will not be repeated here.
[0145] As another aspect of the present invention, a storage medium is also provided, wherein a processor-executable program is stored, which, when executed by a processor, corresponds to the aforementioned method for coordinated optimization of flexible job shop scheduling and layout.
[0146] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for flexible job shop scheduling and layout co-optimization, characterized in that, Includes the following steps: (1) Construct a collaborative optimization model for flexible operation workshop scheduling and equipment layout, and clarify the optimization objectives, scheduling and transportation timing constraints and equipment layout constraints; (2) The model is solved by combining a three-layer encoded niche meme algorithm with a critical path-based local search strategy, and the optimal production scheduling sequence and equipment layout scheme are output; where: The three-layer coding system includes a process coding layer to indicate the processing sequence, a machine selection coding layer to indicate the machine selected for each process, and a layout allocation coding layer to indicate the arrangement of the machines in the workshop; and The solution process for the model includes the following sub-steps: S1: Execute the decoding mechanism, calculate the fitness value of each individual in the initial population, set the algorithm parameters, and initialize the population; S2: Determine the evolutionary stage based on the current iteration number; if in the exploration stage, execute the niche partitioning process based on the difference in layout encoding sequence; if entering the convergence stage, cancel the niche partitioning and evolve in a single large population. S3: Perform crossover and mutation operations within each niche or large population to generate offspring, and recalculate the fitness value of the offspring. S4: Select elite individuals based on offspring fitness values, perform local search operations based on critical paths, and update the population in a targeted manner based on the elite preservation strategy; If the hybrid algorithm satisfies the maximum number of iterations or the convergence condition, it outputs the optimal individual of the population; otherwise, it jumps to S2 for repeated iterations until the termination condition is met.
2. The method for coordinated optimization of flexible workshop scheduling and layout according to claim 1, characterized in that, In step (1), the optimization objective is to minimize the maximum completion time which is characterized by the following formula: In the formula, The subscript for the workpiece is [index], and its range is [range]. ; For workpiece The subscript of the corresponding process has a range of variation. ; For workpiece final process The processing completion time; The index of the AGV that will perform the unloading task; The transport speed of the AGV; For workpiece final process The assigned processing machine number; For processing machines Location coordinates within the workshop; The coordinates of the unloading station's location within the workshop; For position With position Manhattan distance between them; The subscript is used to represent The AGV arrives at the machine Time; The subscript is used to represent The time after the AGV completes the previous task; The subscript is used to represent The coordinates of the position of a task in the workshop on the AGV.
3. The method for coordinated optimization of flexible workshop scheduling and layout according to claim 2, characterized in that, The scheduling and transportation timing constraints should include at least the unique delivery constraint, the AGV empty / loaded transportation time connection constraint, and the process start time constraint. and / or The device layout adopts a row-based layout strategy, and the device layout constraints include at least single-row allocation constraints, effective placement constraints of geometric boundaries, and cross-device anti-overlap constraints.
4. The method for coordinated optimization of flexible workshop scheduling and layout according to any one of claims 1 to 3, characterized in that, In step (2), a decoding mechanism is constructed for the three-layer encoding, which includes: Select the process to be processed according to the process coding layer sequence, determine the processing equipment according to the machine selection coding layer, and resolve the equipment coordinates according to the layout of the coding layer; AGVs are allocated based on the first-come, first-served principle. The total time for a workpiece to travel from the loading station to the unloading station is calculated, and the maximum completion time is used as the fitness value.
5. The method for coordinated optimization of flexible workshop scheduling and layout according to any one of claims 1 to 3, characterized in that, In step S2, the niche delineation process includes: S21: Construct an unassigned set containing all individuals; determine if the unassigned set is empty; if not empty, select the individual with the highest fitness value from it as the seed individual for the current niche. S22: Traverse the remaining individuals in the unassigned set and calculate the layout coding sequence difference between each remaining individual and the seed individual, which is represented by the Hamming distance, i.e.: In the formula, For individuals and Genotypic differences in the layout coding sequence; The length of the layout encoding sequence, Subscripts for gene loci; and Individuals and In the layout coding The physical location index value of the device on the dimension; Let Kronecker function be used when The value is 1 if the condition is met, and 0 otherwise. S23: Sort the individual layout coding sequence differences and, based on the preset niche size, assign the multiple individuals with the smallest differences to the niche of the seed individual; S24: Repeat the above steps until the unassigned set is empty, resulting in several subpopulations, and complete the niche division of all individuals.
6. The method for coordinated optimization of flexible workshop scheduling and layout according to any one of claims 1 to 3, characterized in that, In step S3, different crossover and mutation operations are used for the exploration phase and the convergence phase; in the exploration phase, stratified crossover and mutation operations are performed within each subpopulation. The layered crossover operation includes: performing crossover operation based on process priority on the process coding layer, performing mask crossover operation on the machine selection coding layer, and performing sequential crossover operation on the layout allocation coding layer; The mutation operations include: performing a multi-point reverse mutation operation on the process coding layer, performing a machine reallocation mutation operation on the machine selection coding layer, and performing a full layout permutation mutation operation on the layout allocation coding layer; wherein: The layout full permutation mutation operation is as follows: randomly select several non-repeating loci in the layout code, extract the corresponding machine numbers to form a subset to be optimized, generate the full permutation of the subset, and select the optimal permutation to replace the original code.
7. The method for coordinated optimization of flexible workshop scheduling and layout according to any one of claims 1 to 3, characterized in that, In step S4, the local search operation based on the critical path specifically includes: Extract the critical path from the current scheduling scheme, and identify machine critical blocks, transportation critical blocks, and cross-resource coupling blocks from the critical path; For the aforementioned machine critical blocks, a machine scheduling neighborhood search is performed to optimize the processing order; For the aforementioned key transportation blocks, a transportation scheduling neighborhood search is performed to optimize the AGV operation sequence; For the cross-resource coupling block, a layout collaborative neighborhood search is performed to optimize the device layout position.
8. The method for coordinated optimization of flexible workshop scheduling and layout according to claim 7, characterized in that, The layout-coordinated neighborhood search includes: The transportation tasks on the critical path are divided into discrete transportation task units and continuous transportation task chains; For discrete transportation task units: lock the starting machine and the ending machine corresponding to the task, and swap the positions of the ending machine and the machine at the target position closest to the starting machine in the layout coding layer; For a continuous transportation task chain: the head transportation node and the tail transportation node of the task chain are locked respectively, and the optimization strategy of discrete transportation task unit is applied to the machines on the paths corresponding to the head transportation node and the tail transportation node.
9. The method for coordinated optimization of flexible workshop scheduling and layout according to any one of claims 1 to 3 and 8, characterized in that, In step S4, the specific strategies for targeted population updates based on the elite preservation strategy include: During the exploration phase, a restricted niche elite retention strategy is implemented, which includes: allocating elite retention quotas according to the size proportion of each subpopulation, selecting parent elite individuals that meet the quota within each subpopulation, and replacing the worst individual in the corresponding subpopulation with the parent elite individuals. During the convergence phase, a global competitive elite retention strategy is implemented, which includes: breaking the subpopulation boundary, ranking based on the fitness values of the entire population, and selecting the globally best individual to replace the worst individual.
10. A system for coordinated optimization of flexible workshop scheduling and layout, characterized in that, include: The model building module is used to build a collaborative optimization model for flexible workshop scheduling and equipment layout; the model includes an optimization objective aimed at minimizing the maximum completion time, as well as scheduling and transportation timing constraints and equipment layout constraints; The algorithm solution module employs a three-layer coding structure: a process coding layer, a machine selection coding layer, and a layout allocation coding layer. It solves the collaborative optimization model based on a niche meme algorithm using this three-layer coding structure, combined with a critical path-based local search strategy. The module includes: The habitat partitioning unit is used to selectively execute a habitat partitioning strategy based on the difference in layout coding sequence according to the evolutionary stage of the current iteration generation during the evolutionary process. A local search unit is used to perform a critical path-based local search operation on elite individuals when a triggering condition is met. The local search operation includes: Extract the critical path in the current scheduling scheme, identify machine critical blocks, transportation critical blocks and cross-resource coupling blocks from the critical path, and apply corresponding neighborhood operations to different critical blocks; The process of solving the model using the algorithm solution module includes: S1: Execute the decoding mechanism, calculate the fitness value of each individual in the initial population, set the algorithm parameters, and initialize the population; S2: Determine the evolutionary stage based on the current iteration number; if in the exploration stage, execute the niche partitioning process based on the difference in layout encoding sequence; if entering the convergence stage, cancel the niche partitioning and evolve in a single large population. S3: Perform crossover and mutation operations within each niche or large population to generate offspring, and recalculate the fitness value of the offspring. S4: Select elite individuals based on offspring fitness values, perform local search operations based on critical paths, and update the population in a targeted manner based on the elite preservation strategy; If the hybrid algorithm satisfies the maximum number of iterations or the convergence condition, it outputs the optimal individual of the population; otherwise, it jumps to S2 for repeated iterations until the termination condition is met.
11. The system for coordinated optimization of flexible workshop scheduling and layout according to claim 10, characterized in that, The local search unit includes: The critical block identification subunit is used to extract the critical path in the current scheduling scheme and identify machine critical blocks, transportation critical blocks and cross-resource coupling blocks from the critical path; The machine scheduling neighborhood search subunit is used to adjust the process sequence on the bottleneck machine for the machine's critical blocks; The transportation scheduling neighborhood search subunit is used to optimize the sequence of continuous transportation tasks executed by the same AGV for the transportation key block. The layout collaborative neighborhood search subunit is used to perform the layout collaborative neighborhood search for the cross-resource coupling block to adjust the layout position of the device.
12. A storage medium storing a processor-executable program, characterized in that, The processor-executable program, when executed by the processor, is used to perform the method of flexible job shop scheduling and layout collaborative optimization as described in any one of claims 1 to 9.