A structured sequence construction method based on switching matrix and connectivity determination system
By constructing a structured sequence based on a switching matrix, the problem of difficulty in uniformly modeling the switching relationships and constraints between different categories of elements is solved, and efficient and interpretable sequence construction is achieved, which is applicable to various fields such as task scheduling and process orchestration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 乔宇轩
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies struggle to uniformly model the switching relationships and constraints between different types of elements in fields such as information processing, task scheduling, process orchestration, and resource switching. This results in models that are difficult to extend, have high solution complexity, and lack interpretability and scalability.
A structured sequence construction method based on switching matrices is adopted. Through switching matrix modeling, unified constraint construction, spectral connectivity determination and graph search, the switching relationships and constraints of different categories of elements can be uniformly expressed and solved. It supports segmented construction, subsequence splicing and incremental expansion.
It achieves unified modeling for arbitrary sequence construction tasks, reduces search space complexity, improves model interpretability and scalability, and is applicable to sequence construction needs in various fields.
Smart Images

Figure CN122154854A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of sequence construction, structure optimization, and graph connectivity determination, belonging to the interdisciplinary field of information processing, operations research, and discrete structure planning. Specifically, this invention relates to a general sequence construction method based on switching matrices, unified constraint modeling, augmented structure representation, spectral analysis connectivity determination, and graph search. It can be applied to various scenarios requiring the generation of discrete sequences, such as task scheduling, process orchestration, resource switching, event sequencing, action planning, and data processing pipelines. Background Technology
[0002] In numerous information processing, task scheduling, workflow orchestration, resource switching, event sequencing, and discrete structure planning scenarios, systems typically need to construct a sequence that satisfies multiple constraints based on several categories of elements. This type of sequence construction problem is widespread in fields such as computer systems, network scheduling, data processing pipelines, robot motion planning, service call chain generation, workflow management, and resource switching control.
[0003] In these scenarios, sequence construction often needs to meet the following requirements simultaneously:
[0004] 1. There are specific switching relationships or switching costs between different categories of elements;
[0005] 2. The number of elements of each category, the frequency of occurrence, or the number of segments in the sequence must meet the constraints;
[0006] 3. The sequence may need to be constructed in segments, spliced across time windows, or combined across resource environments;
[0007] 4. The sequence as a whole must maintain connectivity to ensure that a complete path can be formed from the start point to the end point.
[0008] However, existing technologies generally have the following shortcomings:
[0009] 1. Traditional methods typically operate directly at the sequence level, making it difficult to systematically describe the number of transitions, adjacency relationships, and segment-level structures between different categories, resulting in models that are difficult to extend and combine.
[0010] 2. Different types of constraints, such as task dependencies, resource capabilities, time windows, and access rules, vary in form and are difficult to handle uniformly in the same mathematical model, resulting in a complex and unstable solution process.
[0011] 3. Under complex constraints, solving directly in the sequence space is complex and difficult to solve efficiently.
[0012] 4. Traditional methods are difficult to explain the relationship between switching structures, segment-level structures and constraints, and are also difficult to adapt to complex scenarios such as multi-stage, multi-time-slice, and multi-resource environments.
[0013] In summary, existing technologies lack a unified, structured, and scalable method for sequence construction, failing to meet the high reliability, interpretability, and scalability requirements of modern information systems, scheduling systems, and process systems. Therefore, it is necessary to propose a new sequence construction framework that enables it to:
[0014] 1. Use a unified matrix structure to express switching relationships and segment-level structures;
[0015] 2. Map multiple constraints into a solvable mathematical model;
[0016] 3. Supports segmented construction, subsequence concatenation, and incremental expansion;
[0017] 4. Applicable to sequence construction tasks in any field. Summary of the Invention
[0018] This invention addresses the following technical challenges commonly encountered in various sequence construction problems:
[0019] 1. There is a lack of a unified modeling method for switching relationships, making it difficult to systematically express the number of switching times, adjacency relationships, and structural dependencies between different elements;
[0020] 2. Constraints come from diverse sources and take various forms, making it difficult to handle them uniformly within the same model;
[0021] 3. Under complex constraints, solving directly in the sequence space is computationally expensive and difficult to perform efficiently;
[0022] 4. It lacks scalability and interpretability, making it difficult to adapt to the sequence construction needs of different fields.
[0023] To address the aforementioned issues, this invention proposes a structured sequence construction method and connectivity determination system based on a switching matrix. This method is applicable to any scenario requiring the construction of discrete sequences, including but not limited to task scheduling, process orchestration, resource switching, event sorting, action planning, and data processing sequences.
[0024] This invention provides a general sequence construction method based on matrix structure modeling, unified constraint construction, spectral connectivity determination, and graph search, comprising the following steps:
[0025] 1. Switching to matrix modeling
[0026] Construct the switching matrix:
[0027]
[0028] Used to describe the switching relationship between different categories of elements in a sequence, where:
[0029] 1) : From the types of elements Switch to element type The number of times;
[0030] 2) Element types The number of times adjacent occurrences;
[0031] 3) Row summation and column summation represent the number of swaps out and swaps in, respectively.
[0032] The switching matrix dimension is determined solely by the number of categories and is independent of the sequence length; it is the core decision-making object for sequence structure.
[0033] 2. Homogeneous segment structure and segment number expression
[0034] Based on the definition of homogeneous segments, categories The number of segments is:
[0035]
[0036] This expression enables a dimensionality reduction solution from element-level permutations to segment-level structure planning, and is applicable to any sequence construction task that requires a "segmentation-sorting-filling" structure.
[0037] 3. Algebraic structure of switching matrices and additivity of subsequences
[0038] Define the switching matrix addition:
[0039]
[0040] This algebraic structure supports:
[0041] 1) Divide the long sequence into multiple subsequences and model them independently;
[0042] 2) Subsequence structures naturally superimpose;
[0043] 3) Supports various scenarios such as incremental construction, local optimization, and time segmentation.
[0044] This structure is applicable to solving problems involving arbitrary sequence segmentation, partitioning, and phased solutions.
[0045] 4. Construction of augmented switching matrix and expression of head-tail relationship
[0046] To express the relationship between the beginning and end of a sequence, virtual nodes are introduced, and an augmented switching matrix is constructed:
[0047]
[0048] Augmented matrix support:
[0049] 1) Consistent modeling from beginning to end;
[0050] 2) Subsequence concatenation;
[0051] 3) Unified expression of arbitrary segmented structures (time grids, stage divisions, task windows, etc.).
[0052] 5. Construction of a unified constraint system
[0053] A unified constraint system is constructed based on the switching matrix or augmented switching matrix, including:
[0054] 1) Structural constraints: in-degree balance, quantity constraints, non-negativity, no switching, segment number constraints, etc.;
[0055] 2) Business constraints: can come from any domain, such as task dependencies, resource capabilities, time windows, priorities, access rules, etc.
[0056] 3) All constraints can be represented as linear constraints, integer constraints, or logical constraints, forming a unified solvable model.
[0057] This system is applicable to any sequence construction problem that requires a combination of "structure + rules".
[0058] 6. Optimize the solution
[0059] The above model is solved using LP, MILP, or heuristic methods to obtain numerical solutions for the switching matrix or augmented switching matrix. .
[0060] 7. Spectral analysis for connectivity determination
[0061] To avoid invalid solutions before further path searching, this invention introduces a spectral analysis method to determine structural connectivity in advance.
[0062] The steps include:
[0063] 1) Based on Constructing the adjacency matrix ;
[0064] 2) Construct the Laplace matrix
[0065] 3) Calculation All eigenvalues:
[0066] a) If the number of zero eigenvalues is 1 or the Fiedler value is... If so, the structure is connected;
[0067] b) Otherwise, the connection is not established, and the solution needs to be re-solved.
[0068] 8. Matrix-based sequence search and final sequence generation
[0069] After connectivity is satisfied:
[0070] 1) Construct the adjacency matrix ;
[0071] 2) Use methods such as DFS, BFS, Euler path, or Hamiltonian path to search for intermediate sequences. ;
[0072] 3) Fill in the blanks in each segment based on the quantity information to obtain the final sequence. .
[0073] The overall process of this method is shown in Figure 6, and it is applicable to any scenario that requires generating a final sequence from structure to order to content.
[0074] The present invention achieves the following technical effects through the above technical solution:
[0075] 1. Switching to structured relational representations
[0076] By using switching matrices and augmented switching matrices, a unified modeling of switching behavior for any sequence can be achieved.
[0077] 2. Unified combination of constraints
[0078] It can handle structural constraints, business constraints, and logical constraints simultaneously, and is suitable for cross-domain sequence construction.
[0079] 3. Search space has been significantly reduced.
[0080] By using segment-level structural programming, the exponential search space is reduced to the polynomial level;
[0081] 4. Wide range of applications
[0082] It can be applied to various fields such as manufacturing scheduling, task orchestration, resource switching, event sequencing, process planning, and robot motion sequences;
[0083] 5. Strong interpretability and scalability
[0084] The model has a clear structure and supports extensions such as subsequence splicing, time segment division, and multi-stage solution. Attached Figure Description
[0085] To more clearly illustrate the technical solution of the present invention, the embodiments of the present invention will be further described below with reference to the accompanying drawings. The accompanying drawings are used to illustrate the structural relationships of the present invention and are only used to explain the basic principles of the present invention, and do not constitute a limitation on the scope of protection of the present invention.
[0086] Figure 1. Schematic diagram of the switching matrix structure.
[0087] Figure 2. Schematic diagram of the meaning of virtual nodes.
[0088] Figure 3. Schematic diagram of augmented switching matrix structure.
[0089] Figure 4. Schematic diagram of the subsequence splicing process.
[0090] Figure 5. Schematic diagram of sequence generation process.
[0091] Figure 6. Schematic diagram of the overall process of sequence construction method. Detailed Implementation
[0092] The technical solution of the present invention will be described in detail below with reference to specific embodiments, so that those skilled in the art can more clearly understand the concept, technical features and beneficial effects of the present invention. It should be understood that these embodiments are only used to illustrate the basic principles of the present invention and do not constitute a limitation on the scope of protection of the present invention.
[0093] The technical solutions of this invention can be modified and extended in various ways according to actual application needs. As long as they do not depart from the core idea of this invention and the scope defined by the claims, they should be regarded as the objects of protection of this invention.
[0094] Without causing technical conflicts, the technical features or sub-modules in the following embodiments can be combined arbitrarily to adapt to different application scenarios and system architectures.
[0095] The illustrations are for illustrative purposes only. The processes, module divisions, and interaction relationships shown can be adjusted and optimized according to actual application scenarios, and should not be construed as the sole limitation of the collaborative decision-making optimization system and method of this invention. Those skilled in the art can adapt and extend the method steps, system structure, or information interaction methods according to specific needs without departing from the core ideas of this invention.
[0096] To enhance the clarity of the technical expression, terms such as "first" and "second" used in the specification are only used to distinguish similar components or steps and do not indicate their execution order or priority; terms such as "comprising" and "having" are open-ended expressions intended to cover other technical features not explicitly listed; terms "and / or" and " / " indicate a parallel or selective relationship, and their specific meaning should be understood in conjunction with the context. Sequence structure and switching matrix definition
[0097] Let the target sequence be Depend on Composed of class elements, with each class containing a certain number of elements. .
[0098] Define the switching matrix:
[0099]
[0100] in:
[0101] 1. : From the types of elements Switch to element type The number of times;
[0102] 2. Element types The number of times adjacent occurrences occur.
[0103] The structure of the switching matrix is as follows Figure 1 As shown, it includes the following key features:
[0104] 1. The dimension of a matrix is determined solely by the number of element types and is independent of the sequence length;
[0105] 2. All To optimize variables, the sequence structure is determined:
[0106] a) The target sequence is determined from arrive Did the switching occur, and how many times did it occur?
[0107] b) The Seeking a balance Indicates from the first The total number of times an element type switches to other element types;
[0108] c) Summation of columns Indicates switching from other element types to the first. The total number of occurrences of each element type;
[0109] 3. Constraints restrict the feasible values of these variables;
[0110] 4. Optimization goals will drive all The final solution;
[0111] 5. Switching the matrix representation format is not limited to a sequence. The length of the sequence is variable.
[0112] Therefore, switching matrix It is not only a statistical structure, but also a core decision-making object used to construct sequences. Definition of homogeneous segments
[0113] In sequence construction, the smallest indivisible continuous structural unit formed by the continuous arrangement of elements with the same category, attribute, or state is defined as a homogeneous segment. It possesses the following characteristics:
[0114] 1. Homogeneity: All elements within a segment share a key attribute, such as category, status, tag, pattern, color, task type, etc.
[0115] 2. Continuity: These elements appear consecutively in the sequence and are not interrupted by other categories;
[0116] 3. Minimality: A new segment is formed once the category changes.
[0117] Based on the above definition, this invention divides the sequence into several homogeneous segments according to categories. By first determining the number of segments and the inter-segment transition structure, and then determining the sequence, the combinatorial complexity of sequence construction can be significantly reduced, realizing a dimensionality reduction solution from element-level permutation search to segment-level structure planning. Mathematical expression of segments
[0118] The number of homogeneous segments is directly determined by the switching matrix:
[0119]
[0120] in:
[0121] 1. : Represents a sequence Types of elements The number of homogeneous segments;
[0122] 2. : Indicates the type of element The number of consecutive occurrences, therefore That is, the number of segments. Algebraic structure of switching matrices
[0123] Given two switching matrices:
[0124]
[0125] in:
[0126]
[0127] Define the addition operation for the switching matrix:
[0128]
[0129] Right now:
[0130]
[0131] The addition operation is:
[0132] 1. Natural superposition of subsequence structures;
[0133] 2. Splitting and concatenating long sequences;
[0134] 3. Piecewise solution and incremental construction;
[0135] It provides a rigorous algebraic foundation. Augmented switching matrix definition
[0136] To solve the switching matrix To address the problem of not being able to accurately represent the relationship between the first and last elements of a sequence, an augmented switching matrix is introduced. By introducing virtual nodes: in The first row and first column contain elements corresponding to the virtual nodes, used to represent the newly added virtual elements. For example... Figure 2 As shown, the augmented idea is:
[0137] 1. Add a new virtual node to point to the first element of the target sequence;
[0138] 2. Simultaneously, make the tail element of the target sequence point to this virtual node, thereby forming a loop structure on the target sequence.
[0139] make:
[0140] , ,
[0141] Define the augmented switching matrix as follows:
[0142]
[0143] The structure of the augmented switching matrix is as follows: Figure 3 As shown, where:
[0144] 1. The newly added top-left element is usually in the form of a variable in optimization problems;
[0145] 2. The newly added first row vector (excluding the top-left element) has elements that are variables in the optimization problem;
[0146] 3. The newly added first column vector (excluding the top-left element) has elements that are variables in the optimization problem;
[0147] 4. Original switching matrix;
[0148] 5. The aforementioned first Number of class elements or .
[0149] a) No. Seeking a balance Indicates from the first The total number of times an element type switches to other element types;
[0150] b) The Summation of columns Indicates switching from other element types to the first. The total number of occurrences of each element type;
[0151] c) In the sense of augmented switching matrix ;
[0152] As can be seen from the above block structure, for all have:
[0153]
[0154] That is, the original switching matrix Completely preserved in augmented switching matrix In the bottom right corner of the block. Subsequence method based on augmented switching matrix
[0155] augmented sequence Divided into Let there be subsequences, and denote the augmented switching matrix corresponding to these subsequences as:
[0156]
[0157] Each of them:
[0158]
[0159] With augmented sequences The corresponding original target sequence is The switching matrix corresponding to its subsequence is:
[0160]
[0161] From the definition of the augmented matrix, it can be seen that the following is satisfied:
[0162]
[0163] in:
[0164] 1. : subsequence The number of virtual node self-loops;
[0165] 2. The number of times the virtual node points to each element type;
[0166] 3. The number of times each element type switches to the virtual node;
[0167] 4. : subsequence The original switching matrix.
[0168] Based on the addition of the switching matrices, the addition of augmented switching matrices is defined as follows:
[0169]
[0170] have:
[0171]
[0172] like Figure 4 As shown, the method of concatenating subsequences through addition has the following engineering significance:
[0173] 1. The subsequence method allows long sequences to be split into multiple subsequences and modeled independently;
[0174] 2. The augmented switching structure of each subsequence is achieved through... Expressions, they are related to They have the same properties;
[0175] 3. The switching structure of the overall sequence is naturally merged through matrix addition;
[0176] 4. Subsequences do not need to have the same length or a fixed length. Subsequence splicing conditions
[0177] For the augmented switching matrix corresponding to the subsequence:
[0178]
[0179] For all The following constraints must be met:
[0180] Example of constraints Structural constraints
[0181] For augmented switching matrices:
[0182] 1. A value of 0 indicates that two virtual elements will not be adjacent to each other.
[0183] 2. If there is exactly one non-zero element, it means that the virtual node has exactly one outgoing edge.
[0184] 3. If there is exactly one non-zero element, it means that the virtual node has exactly one incoming edge.
[0185] 4. ;
[0186] 5. ;
[0187] 6. ;
[0188] For the augmented matrix of subsequences:
[0189] 1. Limited to 0;
[0190] 2. There is exactly one non-zero element in it;
[0191] 3. There is exactly one non-zero element in it;
[0192] 4. ;
[0193] 5. ;
[0194] 6. ; Rules and constraints
[0195] Quantity constraints for each element type:
[0196] 1. or or or ;
[0197] 2. or or or ;
[0198] Constraints on the number of homogeneous segments for each element type:
[0199] 1. or or or ;
[0200] 2. or or or ;
[0201] Constraint on the total number of homogeneous segments in the target sequence / subsequence:
[0202] 1. or or or ;
[0203] 2. or or or ;
[0204] Prohibit certain types of switching constraints:
[0205] Specify the number of times a certain type of switch is allowed:
[0206] Note: , , These are all placeholders; in practical applications, they are usually set to constants, and they are not related to the constraints mentioned above. Relaxation method example
[0207] Add slack variables to some constraints Make:
[0208]
[0209] An example of an objective function is as follows:
[0210] Optimized solution
[0211] Possible methods:
[0212] 1. Linear Programming (LP);
[0213] 2. Mixed Integer Programming (MILP);
[0214] 3. Heuristic algorithms;
[0215] Find the numerical solution of the switching matrix or augmented switching matrix. . Connectivity determination
[0216] This invention provides a connectivity determination method based on spectral analysis to determine whether a switching matrix can form a complete sequence. This method constructs the Laplacian matrix of the graph and analyzes its eigenvalue structure to achieve rapid determination of sequence connectivity, thereby avoiding invalid solutions. The specific steps are as follows:
[0217] 1. The numerical matrix obtained after optimizing the switching matrix or augmented switching matrix. ;
[0218] 2. The matrix obtained by resetting all diagonal elements to 0 and keeping the rest unchanged is: ;
[0219] 3. View it as the adjacency matrix of a graph;
[0220] 4. Using spectral analysis, calculate the corresponding Laplace matrix. ,in Let be a degree matrix, satisfying ;
[0221] 5. Calculation Connectivity is determined by counting all eigenvalues, either by the number of zero eigenvalues or by whether the Fiedler value is greater than or equal to zero.
[0222] 1) If the number of zero eigenvalues is 1, then the graph is connected;
[0223] 2) If the number of zero eigenvalues is greater than 1, then the graph is not connected;
[0224] 3) Equivalently, the second smallest eigenvalue (Fiedler value) can be used to determine whether the graph is connected. If it is greater than zero, the graph is connected; if it is equal to zero, the graph is not connected.
[0225] Preferably, it can be based on Construct according to the following steps :
[0226] 1. and They are matrices of the same type and have the same dimensions;
[0227] 2. Set all elements on the main diagonal of the array to 0.
[0228] 3. For any ,like and If at least one is non-zero, then let Otherwise
[0229] For the case using the subsequence method, the set of augmented switching matrices is:
[0230]
[0231] The connectivity of each subsequence can be determined independently:
[0232] 1. For each Construct the adjacency matrix and Laplace matrix according to the steps described above;
[0233] 2. Calculate the eigenvalues to determine connectivity;
[0234] 3. If all subsequences are connected, then the entire sequence is connected;
[0235] 4. The splicing between subsequences is guaranteed by the structural constraints of the augmented matrix, which does not affect the independence of connectivity determination. Sequence search methods
[0236] The numerical matrix is obtained after optimizing the switching matrix or augmented switching matrix. After determining that the corresponding graph structure is connected through spectral analysis, the target sequence can be generated according to the following steps. .
[0237] 1. Matrix-based Constructing the adjacency matrix
[0238] Matrix M accurately describes the number of segments, batches, and switching relationships between categories in the target sequence. To perform sequence search, an adjacency matrix is constructed. Its dimensions and They are the same and satisfy:
[0239] 1) Diagonal elements: ;
[0240] 2) Non-diagonal elements: .
[0241] matrix This represents a directed graph where nodes represent element categories and edge weights represent the number of transitions.
[0242] 2. Based on adjacency matrix Graph search yields intermediate sequences
[0243] Treating matrix A as the adjacency matrix of a graph, an intermediate sequence satisfying the switching structure is obtained through a graph search algorithm. Possible search algorithms include, but are not limited to:
[0244] 1) Depth-first search (DFS);
[0245] 2) Breadth-first search (BFS);
[0246] 3) Multiple traversals based on edge weights;
[0247] 4) Euler path (if the Euler condition is met);
[0248] 5) Hamilton path (if each element appears only once).
[0249] The search objective is to find a path such that:
[0250] 1) Each edge Visited Second-rate;
[0251] 2) The overall path is continuous and unbroken.
[0252] Since the switching matrix guarantees structural connectivity, any path that satisfies the above conditions can be used as an intermediate sequence. There is no need to find the optimal path.
[0253] 3. Based on intermediate sequences By configuring the number of homogeneous segments, the final sequence is obtained.
[0254] like Figure 5 As shown, the intermediate sequence Only the segment-level structure (i.e., batch order) is determined, but the specific number within each homogeneous segment is not. Based on the matrix... Quantity information The number of homogeneous segments is allocated to ensure that the final sequence satisfies the following: element types The total number is .
[0255] The configuration methods for the number of homogeneous segments include, but are not limited to:
[0256] 1) Average distribution method: Allocate the total quantity of a certain category... Distribute evenly to In a homogeneous segment;
[0257] 2) Optimized allocation method: based on A local optimization model is constructed based on factors such as the location of homogeneous segments, equipment capacity, and cycle time requirements to solve for the specific quantity of each homogeneous segment.
[0258] 3) Rule-driven method: Determine the batch size based on business rules such as process window, priority, and equipment limitations.
[0259] Once configured, the final target sequence that satisfies all quantity constraints, segment-level structure constraints, and switching structure constraints will be obtained. .
[0260] 4. Method Effectiveness
[0261] Through the above method, the present invention achieves:
[0262] 1) First determine the homogeneous segment structure (segment-level structure) using the switching matrix. Or augmented switching matrix The number of homogeneous segments is determined by the scalar matrix obtained after optimization. Relationship with switching;
[0263] 2) Further determine the sequence structure (segment-level order) and obtain the intermediate sequence through graph search. ;
[0264] 3) Finally, determine the number of homogeneous segments (the number within each segment). The final sequence is obtained through quantity allocation. .
[0265] This hierarchical solution method reduces the search space from an element-level exponential scale to a segment-level polynomial scale, significantly improving solution efficiency and feasibility. Example of constructing a switching matrix in a multi-product processing workshop
[0266] This embodiment uses a discrete manufacturing workshop as an example to illustrate how to construct a switching matrix in an engineering scenario. . Production scenario
[0267] The workshop needs to process the following categories:
[0268]
[0269] The switching costs differ between different product categories, for example:
[0270] 1. From A to B: Requires 20 minutes of cooling;
[0271] 2. From B to C: Mold change required, 15 minutes;
[0272] 3. From C to A: 30 minutes of heating is required. Switching matrix construction
[0273] Construct a matrix based on production demand:
[0274]
[0275] in:
[0276] 1. The number of times to switch from A to B;
[0277] 2. A: Number of consecutive processing cycles (without switching). Engineering meaning
[0278] 1. The first row sums up the number of times A is swapped out;
[0279] 2. Sum of the second column: the number of times B is swapped in;
[0280] 3. : Batch number of A;
[0281] For example:
[0282] 1. If Then the 10 workpieces of A are divided into 3 batches;
[0283] 2. If This means that the switch from A to B occurred twice. Engineering value
[0284] 1. It is not necessary to first extract the complete sequence;
[0285] 2. Batch structure can be controlled simply by determining the number of switching operations;
[0286] 3. Suitable for industries with high switching costs, such as injection molding, SMT, batteries, and food processing. Example of matrix-based process and equipment constraint modeling
[0287] This example illustrates how to map real-world process constraints to a matrix. . Process route constraints
[0288] For example:
[0289] 1. If switching from A to C is prohibited, then ;
[0290] 2. If a switch from B to C is absolutely necessary, then . Equipment capacity constraints
[0291] For example: If the equipment cannot process C more than twice consecutively, then . Time window constraints
[0292] For example, if B must be completed in the morning, then all batches of B must fall within the subsequence of the corresponding time window. Engineering value
[0293] 1. All constraints can be written as linear / integer constraints;
[0294] 2. Input can be directly entered into the MILP solver;
[0295] 3. The process rules and mathematical models are completely consistent. Examples of Subsequence Methods under Time Grid
[0296] This example illustrates how to use a subsequence matrix in "shift production". Production scenario
[0297] A day is divided into three time slots:
[0298] 1. Early shift (8:00–12:00);
[0299] 2. Middle class (13:00–17:00);
[0300] 3. Evening shift (18:00–22:00);
[0301] The device status varies at different times:
[0302] 1. Early shift: All equipment running;
[0303] 2. Middle shift: Partial equipment maintenance;
[0304] 3. Night shift: High energy costs; Subsequence matrix construction
[0305] The entire sequence is split into:
[0306]
[0307] Each submatrix This indicates the switching structure within that time period. Engineering constraint mapping
[0308] For example:
[0309] 1. If C can only be processed during the morning shift, then in the submatrix for the afternoon and evening shifts:
[0310] 1) ;
[0311] 2) ;
[0312] 2.B. Energy consumption is high during the night shift, so increase its weight in the optimization objective: . splicing conditions
[0313] The subsequences must satisfy the following:
[0314] 1. The last category of the previous subsequence is consistent with the first category of the next subsequence;
[0315] 2. Guaranteed by the aforementioned subsequence splicing conditions. Engineering value
[0316] 1. Local solution + global concatenation;
[0317] 2. Suitable for dynamic scheduling in actual factories.
Claims
1. A sequence construction method, characterized in that, include: 1) Based on the number of elements in each category in the sequence, construct a switching matrix to represent the switching relationship between categories; 2) Establish a unified constraint system based on the switching matrix to ensure the feasibility of the sequence structure; 3) Obtain the numerical solution of the switching matrix by solving for the switching matrix that satisfies the constraints. 4) Construct a graph structure to represent the reachability of a sequence based on the numerical solution, and perform connectivity determination on the graph structure to determine whether the numerical solution can correspond to a complete sequence; 5) When connectivity is satisfied, generate a target sequence that satisfies the switching relationship and quantity requirements based on the graph structure.
2. The method according to claim 1, wherein, The diagonal elements in the switching matrix represent the number of adjacent occurrences of a category, and the number of segments for a category is determined by the following formula: 。 3. The method according to claim 1, wherein, The switching matrix supports addition operations to represent segmented structures of sequences or combined structures of subsequences.
4. The method according to claim 1, wherein, The steps for constructing the switching matrix include constructing an augmented switching matrix to express the beginning-end relationship of the sequence.
5. The method according to claim 4, wherein, The augmented switching matrix is obtained by adding multiple submatrices, and the continuity of the overall sequence is ensured by a preset splicing constraint.
6. The method according to claim 1, wherein, The unified constraint system includes at least one of the following: in-degree balance constraint, quantity constraint, non-negativity constraint, or prohibition of switching constraint.
7. The method according to claim 1, wherein, The unified constraint system further includes at least one of the following: dependency relationships, capability limitations, time windows, or business rules.
8. The method according to claim 1, wherein, Connectivity determination is based on at least one of the following: spectral features of the graph structure, eigenvalue distribution, or number of connected components.
9. The method according to claim 1, wherein, Sequence generation further includes configuring the number of segments based on quantity information to meet the category quantity requirements.
10. A sequence construction system, characterized in that, include: 1) Matrix modeling module, used to construct the switching matrix; 2) Constraint building module, used to establish structural constraints and business constraints; 3) Solver module, used to solve the numerical solution of the switching matrix; 4) Connectivity determination module, used to determine the reachability of sequences based on graph structure; 5) Sequence generation module, used to generate the target sequence when connectivity is satisfied.