Parallel test scheduling method for large aircraft cable test system based on operation line simulation
Through a dynamic scheduling model based on work line simulation and a parallel test scheduling method optimized by genetic algorithms, the scheduling efficiency and deadlock risks caused by complex topological structures and limited resources in large aircraft cable testing systems are solved, and more efficient testing resource utilization and system stability are achieved.
Patent Information
- Application Number
- CN202411397978.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-02-25
AI Technical Summary
In large aircraft cable testing systems, due to complex topology and limited testing instrument resources, the test task scheduling efficiency is low, the instrument resource waiting time is too long, and the risk of system deadlock increases.
A dynamic scheduling model based on job line simulation is adopted, and parallel test scheduling is performed in combination with genetic algorithms. Mathematical model construction and chromosome encoding are used to optimize the starting moment and resource allocation of the test task to avoid resource competition and deadlock.
It effectively improves the execution efficiency of the test system, reduces the waiting time of instrument resources, avoids system deadlocks, and improves the throughput rate of large aircraft cable test systems.
Smart Images

Figure CN119514914A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a parallel scheduling method for a cable test system of a large aircraft, and in particular to a tester resource allocation method and a scheduling sequence for a cable network with a complex topology structure on a large aircraft. Background Art
[0002] Large aircraft have many cable points to be tested. Currently, the number of cable detection points of domestic large aircraft represented by C919 exceeds 30,000 points and the cable layout is scattered. Existing test systems often use a test method in which multiple terminals cooperate with each other. Traditional test systems use a serial scheduling method, and test tasks need to be executed sequentially, resulting in crowded test tasks, serious idleness of cable testers, and increased test time costs. Parallel testing technology is an important technical indicator of the new generation of test systems. It improves the throughput of the test system by increasing the number of tasks to be tested during the unit test process.
[0003] The parallel test sequence scheduling method for large aircraft cable test system mainly includes the problem of constructing a mathematical model based on test task timing constraints, resource constraints and other conditions, and the problem of searching for the optimal sequence based on the constructed mathematical model. It can be described as y test instrument resources executing x tasks to be tested, and some test tasks must satisfy a serial order relationship due to resource competition, which is a typical NP-hard problem. Specifically for large aircraft cable test tasks, each test task needs to be completed by two cable testers in a master-slave cooperation mode. The complex cable network on board often leads to the situation that one test instrument is used in several aircraft compartments. In the parallel test sequence scheduling process, test tasks using the same test instrument are mutually exclusive. If test resources are preempted during the test, the system will be deadlocked.
[0004] At present, the parallel test scheduling sequence in the distributed test system often adopts the static scheduling model established based on the graph coloring model. This type of model has achieved certain optimization effects in solving NP-Hard problems, but it is not suitable for the task scheduling optimization of the test system with complex competition relationship between test tasks and large time gap between test tasks. There are still problems caused by a considerable number of instrument resources waiting. The present invention reconstructs a dynamic scheduling model for the large aircraft cable test system based on the assembly line model of flexible manufacturing, and provides a parallel test scheduling method for the large aircraft cable test system based on the line simulation, which solves the problem of long waiting time of test instruments in the existing test system scheduling model, and adopts genetic algorithm to solve the mathematical model constructed under the resource constraint relationship, and solves the common problem of computing power waste in heuristic algorithms by crossover, inheritance and mutation operations under the instrument resource constraint conditions, thereby further improving the execution efficiency of the test system. Summary of the invention
[0005] The present invention aims to solve the problem of testing complex topology cable networks under limited instrument resources, and provides a parallel test scheduling method for large aircraft cable test systems based on operation line simulation. This scheduling method can be applied to cable network testing occasions of domestic large aircraft headed by C919, etc., where test tasks are completed by multiple test terminals in pairs, and is particularly suitable for situations where there is no sequence constraint between test tasks, that is, all cable test tasks can be executed in sequence in any non-resource preemption order.
[0006] The schematic diagram of the multiple test terminals working in pairs to complete the cable test task is as follows: Figure 1 As shown, test task I1 uses test terminal 1 and test terminal 4. Different test tasks have different test times. The specific test time of a test task is determined by the number of cable cores actually measured inside the cable. Although test tasks I1 and I2 need to occupy the same test terminal, they are only in a resource competition relationship, and there is no necessary test sequence requirement. There is no instrument resource competition problem between test tasks I1 and I4. Different threads can be used in the host computer for parallel execution to shorten the total test process time.
[0007] The traditional serial test sequence scheduling is to schedule the test tasks in sequence under the condition of satisfying the tight preceding and tight following constraint relationship, which can avoid the deadlock phenomenon of the test system, but the test time used is too long, resulting in the overall process delay; the parallel test scheduling sequence constructed based on static models such as graph coloring has the defect of waiting for test instruments under different threads at the same time, that is, the instrument resources released after a certain test task is executed must wait for all thread tasks at the same time to be executed before they can be used to execute the next task. Starting from the assembly line model of flexible manufacturing, the present invention combines the example of the cable test system of large aircraft, proposes four constraint relationships, and constructs a mathematical model based on the conditions of test task timing constraints, resource constraints, etc., and in the genetic algorithm optimization model, the chromosome is encoded at the time when the test task starts to execute, and the LU matrix is updated in real time with four queues such as onLine, aWait, Judge and Finish, and the fitness function is used to evaluate the quality of the parallel test scheduling sequence corresponding to each chromosome in the population, and the optimal solution in the model solution space is sought by simulating the survival of the fittest process of biological organisms in nature in the form of crossover, inheritance and mutation, effectively solving the parallel sequence scheduling problem of the complex topology cable network test system on large aircraft. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 Simple diagram of the test cable using two machines for multiple terminals
[0009] Figure 2 Update diagrams for LU matrices and LUT matrix sets
[0010] Figure 3Adjacency matrix of test resources occupied by test tasks
[0011] Figure 4 To test the complex topological connection relationship of the instrument in the implementation example
[0012] Figure 5 Gantt chart of parallel test scheduling sequence for implementation examples DETAILED DESCRIPTION
[0013] The test tasks and instrument resources in the parallel test scheduling model of large aircraft cable test system based on operation line simulation are described as follows: n}, the test time consumption set U = {u0, u1, ..., u n ,u n+1}, where u0 and u n+1 Mark the start and end time of the overall test task. In the operation line scheduling model, the value is 0 and no instrument resources are used. The test task start time set D = {d1, d2, ..., d n}, marking the start execution sequence of each test task, the tester set used in the cable test task is I = {i1, i2, ..., i m}; Combine the test task occupation test resource relationship to construct the adjacency matrix M n×n , the values of the elements in the matrix are as follows:
[0014]
[0015] Based on the above symmetric matrix, construct the task-resource consumption matrix LU matrix. If the test task l i Occupies instrument resources j and i k , then the elements of the i-th row, j-th column, and k-th column of the LU matrix can be set to u i , construct a matrix state update set LUT based on the LU matrix = {LU1, LU2, ..., LU q}, if task i is being executed at time p, then LU i+1 The element u at row i, column j, column k i =u i -1, LU matrix and LUT matrix set are represented as follows Figure 2 shown.
[0016] In order to simulate the actual large aircraft cable test system, the parallel test sequence scheduling of test tasks needs to meet the following test task timing constraints, resource constraints and other conditions:
[0017] (1) Test instrument resource competition constraints. The test tasks in the test task set L have no primary or secondary distinction, that is, they have the same priority. The instrument resources of the task being executed cannot be preempted to avoid system deadlock.
[0018] (2) The test task occupies the time constraint of the test instrument resources. In view of the test characteristics of the large aircraft cable tester, the test task does not have the interruption characteristic, that is, the test task is i Get test equipment resources at any time j , in d i +u i The instrument resources are released after the task is executed, and the test task cannot be interrupted during this period.
[0019] (3) There are no constraints on the test tasks, that is, all tasks in the test set can be executed in any non-resource conflict mode.
[0020] (4) The test task occupies a certain number of test instrument resources. According to the description of the large aircraft cable test task, the test task l i Two test instrument resources are used. To avoid illegal test sequences in the subsequent heuristic algorithm search process, all test tasks can only use the corresponding allocated test instrument resources and are not replaceable.
[0021] Based on the above constraints, the dynamic scheduling mathematical model of the production line constructed by the present invention is as follows:
[0022] Min(d n +u n )(1)
[0023]
[0024] Formula (1) is the objective function of the subsequent heuristic algorithm. The present invention takes minimizing the total test time as the model optimization task;
[0025] Formula (2) is the current task status signal, which is a binary value indicating whether the current task is in the execution or waiting state.
[0026] Formula (3) represents the intrinsic connection between the duration of the test task and the task status semaphore; Formula (4) is the recursive expression of the time constraint of the test task occupying the test instrument resources. If the test task j starts to occupy the instrument resources at time p, then until the task is completed, the other tasks cannot preempt the occupied instrument; Formula (5) is the constraint that the test task cannot be interrupted. The test task does not have the interruption feature from the beginning until it is completely executed.
[0027] Based on the mathematical model constructed above, the present invention adopts a genetic algorithm as the optimal sequence search algorithm for parallel testing. Through multiple crossover mutations and fusions within the population, the shortest test time parallel scheduling sequence that meets the constraint conditions is searched in the test task scheduling sequence solution space domain. Combining relevant theories, resource constraints and model assumptions, the genetic algorithm process is as follows:
[0028] a) Chromosome encoding: According to the model constraints, the equipment occupied by the known cable test tasks and the time consumed by the tasks, if the starting time set of the test tasks is determined, the total time of the parallel test under the test sequence scheduling model can be solved. Therefore, the genetic algorithm in the present invention uses the starting time of each test task as the basis for chromosome encoding within the genetic algorithm population. For the test task set L = {l1, l2, ..., l n}, the starting time set of the serial test tasks S is the chromosome code for serial testing.
[0029] b) Initialize the population, set the population size N, the genetic generation number P, and generate N test task start time sets that meet the above resource constraints as chromosomes in the population according to step a.
[0030] c) Calculate the individual adaptability value. In order to prevent the unreasonable distribution of fitness values or difficulty in reflecting individual characteristics during the population fitness calculation process, and to avoid premature individuals appearing in the genetic algorithm and weakening the global search ability, the present invention designs the fitness function as follows: Where (d n +u n ) j It represents the total execution time of the parallel test sequence corresponding to chromosome j, which is calculated according to the following steps in the present invention:
[0031] i) Set the executing queue onLine, the waiting queue aWait, the waiting queue Judge, and the completed queue Finish. At the initial moment, all test tasks are added to the waiting queue aWait, and the test tasks are queued in the order of execution, and the LU matrix is initialized.
[0032] ii) Obtain tasks with the same execution start time from the head of the aWait queue and add them to the queue to be judged, Judge. If there is no resource competition between the tasks in the Judge queue and the tasks being executed in the onLine queue, add the task to the onLine queue. Otherwise, it means that the test sequence violates the resource constraint relationship in the constructed model, outputs a fitness of 0, and terminates the task.
[0033] iii) Update the matrix LU in real time. If the value of a non-zero element returns to 0, monitor the onLine queue, add the corresponding task to the Finish queue, release the occupied instrument resources, and then jump to step ii to determine whether there is an executable task.
[0034] iv) If the onLine queue, aWait queue, and Judge queue are all empty, the current time value is output as the total execution time of the parallel test sequence corresponding to chromosome j (d n +u n ) j .
[0035] d) Chromosome crossover, set the chromosome crossover probability p within the population c The crossover probability is positively correlated with the adaptive value of the two chromosomes to be crossed, and chromosome fragments with one-third the length of the parent are randomly exchanged according to the two-point crossover method.
[0036] e) Individual selection: After completing the crossover operation, offspring individuals are generated. The individual adaptive value is calculated according to step c. Low-quality chromosomes and chromosomes that do not meet the model resource constraints are eliminated through individual selection, and a hall of fame is set up to retain the best individual chromosomes of the current generation and enter the next generation population.
[0037] f) Chromosome mutation: To expand the genetic diversity of the population, some chromosomes with a degree of adaptability of 0 in step c are randomly selected to perform mutations under resource constraints, that is, the start time of the conflicting task execution is set to Rejoin the population.
[0038] Example
[0039] Select as Figure 3 The cable connection network shown is used as the test experimental data, wherein the test task set L = {l1, l2, ..., l8}; the time set corresponding to the 8 test tasks U = {4, 3, 10, 4, 12, 3, 12, 6}; the test instrument resource set I = {i1, i2, ..., i8}; according to the model of the present invention and the genetic search algorithm, the test task relationship adjacency matrix M can be obtained as follows Figure 4 As shown, according to the test task scheduling, the optimal test time is 22 and the test sequence Gantt chart is as follows Figure 5 shown.
[0040] The experimental results show that in a cable network with complex topology, the parallel test sequence scheduling method for large aircraft cable testers based on operation line simulation can schedule test tasks in a multi-threaded manner, and after each test task is completed, the instrument resources are immediately released to execute the next task, effectively avoiding the instrument waiting problem.
Claims
1. A method for scheduling parallel test sequences of large aircraft cable testers based on operation line simulation, characterized in that: The parallel scheduling mathematical model of the large aircraft cable test system based on the operation line simulation constructs time constraints and resource constraints for the test tasks and instrument resources, and establishes a dynamic scheduling mathematical model based on the constraints to solve the instrument waiting problem in the original static scheduling model; the optimal sequence search algorithm written based on the dynamic model adopts a genetic algorithm, the algorithm encodes the chromosome at the start time of the test task, and updates the LU matrix in real time with four queues including onLine, aWait, Judge and Finish, and evaluates the quality of the parallel test scheduling sequence corresponding to each chromosome in the population with an adaptability function, and simulates the survival of the fittest process of organisms in nature in the form of crossover, inheritance and mutation to seek the optimal solution in the model solution space.
2. According to claim 1, the parallel scheduling mathematical model of the large aircraft cable test system based on the operation line simulation is characterized by satisfying the following test task timing constraints, resource constraints and other conditions: (1) Test equipment resource competition constraints; (2) The test task occupies the time constraint of the test instrument resources; (3) The test task has no tight before and after constraints; (4) Constraints on the number of test instrument resources occupied by test tasks; Based on the above constraints, the dynamic scheduling mathematical model of the production line constructed by the present invention is as follows: Min(d n +u n )(1) Formula (1) is the objective function of the subsequent heuristic algorithm. The present invention takes minimizing the total test time as the model optimization task; Formula (2) is the test task status semaphore at the current moment, which indicates in binary form whether the current task is in the execution or waiting state; Formula (3) represents the intrinsic connection between the test task duration and the task status semaphore; Formula (4) is the recursive expression of the time constraint of the test task occupying the test instrument resources. If the test task j starts to occupy the instrument resources at time p, then until the task is completed, the other tasks cannot preempt the occupied instrument; Formula (5) is the non-interruptible constraint of the test task. The test task starts to execute without interruption characteristics until it is completely executed.
3. According to claim 2, the optimal sequence search algorithm written based on the dynamic model is characterized by: using a genetic algorithm to search for the shortest test time parallel scheduling sequence that meets the constraint conditions in the test task scheduling sequence solution space domain through multiple crossover mutation fusion within the population, combined with relevant theories, resource constraints and model assumptions, the genetic algorithm process is as follows: a) Chromosome encoding: According to the model constraints, the equipment occupied by the known cable test tasks and the time consumed by the tasks, if the starting time set of the test tasks is determined, the total time of the parallel test under the test sequence scheduling model can be solved. Therefore, the genetic algorithm in the present invention uses the starting time of each test task as the basis for chromosome encoding within the genetic algorithm population. For the test task set L = {l1, l2, ..., l n }, the starting time set of the serial test tasks S is the chromosome code for serial testing. b) Initialize the population, set the population size N, the genetic generation number P, and generate N test task start time sets that meet the above resource constraints as chromosomes in the population according to step a. c) Calculate the individual adaptability value. In order to prevent the unreasonable distribution of fitness values or difficulty in reflecting individual characteristics during the population fitness calculation process, and to avoid premature individuals appearing in the genetic algorithm and weakening the global search ability, the present invention designs the fitness function as follows: Where (d n +u n ) j It represents the total execution time of the parallel test sequence corresponding to chromosome j, which is calculated according to the following steps in the present invention: i) Set the executing queue onLine, the waiting queue aWait, the waiting queue Judge, and the completed queue Finish. At the initial moment, all test tasks are added to the waiting queue aWait, and the test tasks are queued in the order of execution, and the LU matrix is initialized. ii) Obtain tasks with the same execution start time from the head of the aWait queue and add them to the queue to be judged, Judge. If there is no resource competition between the tasks in the Judge queue and the tasks being executed in the onLine queue, add the task to the onLine queue. Otherwise, it means that the test sequence violates the resource constraint relationship in the constructed model, outputs a fitness of 0, and terminates the task. iii) Update the matrix LU in real time. If the value of a non-zero element returns to 0, monitor the onLine queue, add the corresponding task to the Finish queue, release the occupied instrument resources, and then jump to step ii to determine whether there is an executable task. iv) If the onLine queue, aWait queue, and Judge queue are all empty, the current time value is output as the total execution time of the parallel test sequence corresponding to chromosome j (d n +u n ) j . d) Chromosome crossover, set the chromosome crossover probability p within the population c The crossover probability is positively correlated with the adaptive value of the two chromosomes to be crossed, and chromosome fragments with one-third the length of the parent are randomly exchanged according to the two-point crossover method. e) Individual selection: After completing the crossover operation, offspring individuals are generated. The individual adaptive value is calculated according to step c. Low-quality chromosomes and chromosomes that do not meet the model resource constraints are eliminated through individual selection, and a hall of fame is set up to retain the best individual chromosomes of the current generation and enter the next generation population. f) Chromosome mutation: To expand the genetic diversity of the population, some chromosomes with a degree of adaptability of 0 in step c are randomly selected to perform mutations under resource constraints, that is, the start time of the conflicting task execution is set to Rejoin the population.
Citation Information
Cited By
Parallel test task scheduling method for distributed test system of multi-target equipment
CN120336197A