Test resource planning methods, electronic devices and computer-readable storage media
By optimizing vehicle test resource planning using genetic algorithms and objective functions, the problem of low resource planning efficiency in existing technologies is solved, achieving automated and intelligent resource utilization and improving the planning efficiency of vehicle test resources.
Patent Information
- Application Number
- CN202611297582.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-17
AI Technical Summary
Existing vehicle testing resource scheduling technologies rely on manual experience or traditional static optimization models, resulting in frequent resource conflicts, low planning efficiency, and low resource utilization.
By employing genetic algorithms and objective functions, an initial population is generated, and target individuals are determined through genetic evolution to optimize resource utilization and achieve automated and intelligent resource planning.
It improves the efficiency of test resource planning, avoids the subjectivity and local optima trap of manual planning, and significantly reduces time and manpower costs.
Smart Images

Figure CN123117637A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of resource planning technology, and more specifically, to a test resource planning method, electronic device, and computer-readable storage medium. Background Technology
[0002] Scheduling vehicle resources for whole vehicle testing is a crucial aspect of whole vehicle testing scheme design, involving the complex coordination of hundreds or thousands of test vehicles, multiple test sites, and a large number of test tasks.
[0003] Existing vehicle testing resource scheduling technologies primarily rely on manual experience to integrate and prioritize vehicle resources, or on traditional static optimization models for planning. However, due to the numerous constraints involved in vehicle testing, manual scheduling often struggles to accommodate all constraints, easily falling into local optima. This leads to frequent resource conflicts and suboptimal scheduling schemes, resulting in low planning efficiency and low resource utilization.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This invention provides a test resource planning method, an electronic device, and a computer-readable storage medium to at least solve the technical problem of low planning efficiency when planning test resources for multiple vehicle test tasks in related technologies.
[0006] According to one aspect of the present invention, a test resource planning method is provided, comprising: acquiring multiple vehicle test tasks, resource information, and constraints, wherein the resource information is used to describe the available resources for executing the multiple vehicle test tasks, and the constraints are used to characterize the constraint relationship between the multiple vehicle test tasks and the available resources; generating an initial population based on the multiple vehicle test tasks, resource information, and constraints, wherein the initial population includes multiple individuals, and any individual is used to characterize a candidate planning scheme for the available resources to complete the multiple vehicle test tasks; constructing an objective function with the resource utilization rate of the candidate planning scheme as the optimization objective; performing genetic evolution processing on the initial population using a genetic algorithm and the objective function to determine a target individual; and determining a target planning scheme based on the target individual.
[0007] Optionally, the resource information shall include at least: vehicle resource information, site resource information, and personnel resource information, and the constraints shall include at least: vehicle availability constraints, test cycle constraints, site scheduling constraints, and personnel qualification constraints.
[0008] Optionally, an initial population is generated based on multiple vehicle test tasks, resource information, and constraints, including: traversing multiple vehicle test tasks; for the current test task in the traversal: determining the current available resources corresponding to the current test task from the available resources based on the constraints and resource information; constructing a set of current available resources based on the current available resources; initializing multiple individuals based on multiple sets of current available resources to obtain the initial population, wherein each individual includes multiple gene fragments, and the multiple gene fragments correspond one-to-one with multiple vehicle test tasks.
[0009] Optionally, a genetic algorithm and an objective function are used to perform genetic evolution processing on the initial population to determine the target individuals, including: performing genetic evolution processing on the initial population for a preset number of rounds to obtain the target population; using the objective function to calculate the fitness of multiple evolved individuals in the target population, wherein the fitness is used to characterize the resource utilization rate of the candidate planning scheme; and determining the target individuals from the target population based on the fitness.
[0010] Optionally, the initial population is subjected to a preset number of genetic evolutionary processes to obtain the target population, including: cyclically executing the preset number of genetic evolutionary processes on the initial population, wherein each round of genetic evolutionary processes includes: calculating the initial fitness of multiple individuals using an objective function; performing a selection operation on the multiple individuals based on the initial fitness to determine the parent population; sequentially performing crossover and mutation operations on the parent population to obtain the offspring population, wherein the offspring population includes multiple individuals after genetic evolution; and using the offspring population obtained by cyclically executing the preset number of genetic evolutionary processes as the target population.
[0011] Optionally, the initial fitness of multiple individuals is calculated using the objective function, including: traversing multiple individuals, and for the current individual in the traversal: determining the first duration and the second duration corresponding to the current individual, wherein the first duration is used to characterize the effective usage duration of available resources, and the second duration is used to characterize the available duration of available resources; and using the objective function, the first duration, and the second duration, determining the initial fitness of the current individual.
[0012] Optionally, the test resource planning method further includes: performing constraint condition judgments on multiple evolutionary individuals to obtain judgment results; and updating the fitness of each of the multiple evolutionary individuals based on the judgment results.
[0013] Optionally, the test resource planning method further includes updating the initial population in response to a target event, wherein the target event includes at least one of the following: a change in the vehicle test task or a change in available resources.
[0014] According to one aspect of the present invention, a test resource planning system is also provided, comprising: an acquisition module, configured to acquire multiple vehicle test tasks, resource information, and constraints, wherein the resource information describes the available resources for executing the multiple vehicle test tasks, and the constraints characterize the constraint relationship between the multiple vehicle test tasks and the available resources; a generation module, configured to generate an initial population based on the multiple vehicle test tasks, resource information, and constraints, wherein the initial population includes multiple individuals, and any individual characterizes a candidate planning scheme for the available resources to complete the multiple vehicle test tasks; a construction module, configured to construct an objective function using the resource utilization rate of the candidate planning scheme as the optimization objective; a processing module, configured to perform genetic evolution processing on the initial population using a genetic algorithm and the objective function to determine a target individual; and a determination module, configured to determine a target planning scheme based on the target individual.
[0015] According to another aspect of the present invention, an electronic device is also provided, comprising: a memory storing an executable program; and a processor for running the executable program, wherein the executable program executes the test resource planning method described in any of the above embodiments.
[0016] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the test resource planning method described in any of the above.
[0017] This invention provides a test resource planning method, comprising: acquiring multiple vehicle test tasks, resource information, and constraints, wherein the resource information describes the available resources for executing the multiple vehicle test tasks, and the constraints characterize the constraint relationship between the multiple vehicle test tasks and the available resources; generating an initial population based on the multiple vehicle test tasks, resource information, and constraints, wherein the initial population includes multiple individuals, and any individual is used to characterize a candidate planning scheme for the available resources to complete the multiple vehicle test tasks; constructing an objective function using the resource utilization rate of the candidate planning scheme as the optimization objective; performing genetic evolution processing on the initial population using a genetic algorithm and the objective function to determine the target individual; and determining the target planning scheme based on the target individual. This invention, by acquiring multiple vehicle test tasks, resource information, and constraints, comprehensively understands the resource status and task limitations in the test scenario, providing an accurate data foundation for subsequent planning. Then, based on the multiple vehicle test tasks, resource information, and constraints, an initial population containing multiple candidate planning schemes is generated. A genetic algorithm is used to perform evolutionary processing with resource utilization as the optimization objective. This automatically searches and determines the globally optimal target individual in a vast solution space, thus avoiding the subjectivity and local optimum traps of manual planning. Finally, the target planning scheme is determined based on the target individual, achieving automation and intelligence in the test resource planning process, significantly reducing the time and manpower costs required for manual scheduling. In summary, this invention achieves the technical effect of improving the efficiency of test resource planning, thereby solving the technical problem of low planning efficiency when planning test resources for multiple vehicle test tasks in related technologies. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0019] Figure 1 This is a flowchart of a test resource planning method according to one embodiment of the present invention;
[0020] Figure 2 This is a flowchart illustrating a test resource planning method according to one embodiment of the present invention;
[0021] Figure 3 This is a structural block diagram of a test resource planning system according to one embodiment of the present invention. Detailed Implementation
[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0024] According to an embodiment of the present invention, an embodiment of a test resource planning method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0025] This invention provides a test resource planning method. Figure 1 This is a flowchart of a test resource planning method according to one embodiment of the present invention, such as... Figure 1 As shown, the test resource planning method includes the following steps:
[0026] Step S101: Obtain multiple vehicle test tasks, resource information, and constraints. The resource information describes the available resources for executing multiple vehicle test tasks, and the constraints characterize the constraint relationship between the multiple vehicle test tasks and the available resources.
[0027] Step S102: Based on multiple vehicle test tasks, resource information and constraints, an initial population is generated, wherein the initial population includes multiple individuals, and any individual is used to represent a candidate planning scheme of available resources to complete multiple vehicle test tasks.
[0028] Step S103: Construct an objective function with the resource utilization rate of the candidate planning scheme as the optimization objective;
[0029] Step S104: Using a genetic algorithm and objective function, perform genetic evolution processing on the initial population to determine the target individual;
[0030] Step S105: Determine the target planning scheme based on the target individual.
[0031] The aforementioned vehicle testing tasks refer to the specific tasks to be performed to verify the various performance indicators of the entire vehicle.
[0032] In one alternative embodiment, vehicle testing tasks include endurance driving tests, emissions compliance tests, noise, vibration and ride comfort tests, and battery charge-discharge cycle tests.
[0033] Optionally, each vehicle testing task includes multi-dimensional attribute information, such as task ID, task type, estimated time, latest completion time window, required test site type (e.g., high-speed ring track, chassis dynamometer, anechoic chamber), required test vehicle configuration (e.g., prototype vehicle number, vehicle condition requirements), and the qualification level of personnel required to perform the task (e.g., senior test engineer, data analyst). Multiple vehicle testing tasks constitute the input set of the scheduling problem, and their complexity and diversity directly determine the difficulty of the scheduling scheme.
[0034] The above resource information describes the various available resources required to perform multiple vehicle testing tasks.
[0035] Optionally, the resource information includes not only static resource attributes (such as vehicle VIN code, site area, and personnel skill tags), but also dynamic resource status (such as the current location of the vehicle, estimated availability time, fault repair status, battery status, current site occupancy and scheduled maintenance schedule, and current workload and leave status of personnel).
[0036] In one optional embodiment, resource information is synchronized in real time through a vehicle testing management system to form a digital resource profile. For example, for test vehicles, the resource information includes not only the vehicle ID but also a time-series matrix of its "available time windows," identifying whether the vehicle is in "idle," "testing," "under maintenance," or "transportation" status within each time period. For test sites, the resource information includes their physical attributes and temporal availability, such as whether a site is only open during the day or requires cleaning and maintenance during specific time periods. By accurately describing resource information, it is possible to accurately identify which resources are truly available for scheduling at a specific time, thereby avoiding conflicts caused by assigning tasks to unavailable resources.
[0037] The above constraints refer to the logical rules that must be met between multiple vehicle testing tasks and available resources, and their essence is the boundary definition of scheduling feasibility.
[0038] Optionally, constraints are divided into hard constraints and soft constraints. Hard constraints are conditions that must be strictly satisfied, such as "tasks must be assigned to vehicles in the 'available' state," "personnel must possess the qualifications for the corresponding task," "only one task can be executed at the same time and in the same location," and "the start time of a task cannot be earlier than the end time of its predecessor task (if there is a dependency)." Soft constraints are objectives that are desired to be optimized as much as possible, such as "minimizing the number of vehicle switching," "balancing the workload of each engineer," and "prioritizing the use of vehicles with high utilization rates." These constraints together constitute a multi-dimensional heterogeneous constraint space, within which the scheduling algorithm must search to ensure that the generated solution is feasible both theoretically and practically.
[0039] The initial population mentioned above refers to the initial solution set generated, which contains multiple candidate planning schemes (i.e., candidate scheduling schemes). Essentially, it represents the initial distribution of the algorithm's search space. Each individual represents a candidate planning scheme for available resources.
[0040] In one alternative embodiment, the initial population is not generated completely randomly, but rather using a hybrid strategy aided by heuristic rules to improve the average quality of the initial solutions. For example, when generating the first individual, tasks are assigned to the earliest available vehicle and site based on the "earliest available time first" principle; when generating subsequent individuals, random perturbations are introduced, such as randomly shuffling the task execution order, randomly selecting a backup vehicle, or randomly shifting the start time.
[0041] Optionally, population size (i.e., the number of individuals in the population) is a key parameter that needs to be set based on the number of tasks and resources, typically between 50 and 300, to balance search diversity and computational efficiency. Each individual employs a specific encoding structure (such as chromosome encoding) to encode information such as task sequences, resource allocation, and time schedules into a gene sequence, enabling the genetic algorithm to perform subsequent operations.
[0042] The aforementioned resource utilization rate refers to the percentage of time within a specified time period during which available resources (such as test vehicles and test sites) are effectively used to perform test tasks. In essence, it is a core economic indicator for measuring the efficiency of resource input and output.
[0043] In one optional embodiment, the quotient of the effective usage time of available resources to the available time of available resources is defined as resource utilization rate. An objective function is constructed with resource utilization rate as the optimization objective, aiming to guide the genetic algorithm during the evolutionary process to favor individuals that can more efficiently schedule tasks and reduce resource idle time and waiting time. Optionally, the fitness of each individual is calculated using the objective function.
[0044] In another alternative embodiment, the objective function can be a weighted combination of multiple objectives, which, in addition to maximizing resource utilization, may also include minimizing total task delay time, minimizing resource switching costs, etc. By converting these objectives into fitness values, the genetic algorithm can quantify the merits of different scheduling schemes, thereby guiding the evolutionary direction.
[0045] The genetic algorithm described above is a search heuristic algorithm that simulates the mechanisms of natural selection and inheritance. Its core operations include selection, crossover, and mutation. Its essence is to gradually approach the optimal solution through iterative evolution.
[0046] In one optional embodiment, a genetic algorithm is used to iterate through multiple generations of the initial population. The selection operation employs tournament selection or roulette wheel selection, prioritizing the retention of individuals with higher fitness (calculated through the objective function) as parents. The crossover operation uses two-point crossover or task-group-based crossover, exchanging gene segments between parent individuals to combine desirable traits. The mutation operation randomly alters certain genes in individuals with low probability (e.g., randomly changing vehicles or adjusting time) to maintain population diversity and escape local optima. By repeatedly executing these three steps, the overall fitness of the population gradually increases, eventually converging to one or a set of high-quality solutions. This process simulates the principle of "survival of the fittest" in biological evolution, enabling efficient exploration of the global optimum within complex constraint spaces, rather than getting trapped in local optima.
[0047] The aforementioned target individual refers to the individual with the highest fitness (i.e., optimal resource utilization and satisfaction of all constraints) in the final population after multiple generations of genetic evolution.
[0048] In one alternative embodiment, the target individual includes optimal resource allocation information (vehicles, venues, personnel) and precise time arrangements for each vehicle testing task.
[0049] The aforementioned target planning scheme refers to a detailed experimental scheduling plan generated after decoding the coding structure of the target individual, which can be understood and directly executed by humans.
[0050] In one alternative embodiment, the target planning scheme is presented in the form of a Gantt chart or a detailed table, which visually displays information such as the start and end time, execution vehicle, execution site, and execution personnel for each test task.
[0051] This invention provides a test resource planning method, comprising: acquiring multiple vehicle test tasks, resource information, and constraints, wherein the resource information describes the available resources for executing the multiple vehicle test tasks, and the constraints characterize the constraint relationship between the multiple vehicle test tasks and the available resources; generating an initial population based on the multiple vehicle test tasks, resource information, and constraints, wherein the initial population includes multiple individuals, and any individual is used to characterize a candidate planning scheme for the available resources to complete the multiple vehicle test tasks; constructing an objective function using the resource utilization rate of the candidate planning scheme as the optimization objective; performing genetic evolution processing on the initial population using a genetic algorithm and the objective function to determine the target individual; and determining the target planning scheme based on the target individual. This invention, by acquiring multiple vehicle test tasks, resource information, and constraints, comprehensively understands the resource status and task limitations in the test scenario, providing an accurate data foundation for subsequent planning. Then, based on the multiple vehicle test tasks, resource information, and constraints, an initial population containing multiple candidate planning schemes is generated. A genetic algorithm is used to perform evolutionary processing with resource utilization as the optimization objective. This automatically searches and determines the globally optimal target individual in a vast solution space, thus avoiding the subjectivity and local optimum traps of manual planning. Finally, the target planning scheme is determined based on the target individual, achieving automation and intelligence in the test resource planning process, significantly reducing the time and manpower costs required for manual scheduling. In summary, this invention achieves the technical effect of improving the efficiency of test resource planning, thereby solving the technical problem of low planning efficiency when planning test resources for multiple vehicle test tasks in related technologies.
[0052] The test resource planning method in the embodiments of this application will be further described below.
[0053] Optionally, the resource information shall include at least: vehicle resource information, site resource information, and personnel resource information, and the constraints shall include at least: vehicle availability constraints, test cycle constraints, site scheduling constraints, and personnel qualification constraints.
[0054] The aforementioned vehicle resource information includes the unique identifier of each test vehicle (such as internal asset number), vehicle configuration attributes, current physical status (such as available, under maintenance, in transport, charging), future preset status timeline (such as maintenance starting at a certain time on a certain day and the expected duration), and vehicle technical parameters (such as maximum range, load limit, etc.).
[0055] In one optional embodiment, vehicle resource information is obtained through a test management system. The system periodically polls vehicle status or receives real-time heartbeat data reported by vehicles to update their status tags. For example, when a vehicle enters a repair shop, its status changes from "available" to "under repair," along with the estimated time it will be ready for use again. This time information directly serves as a hard constraint in subsequent scheduling. For different types of test tasks (such as durability tests and emissions tests), the vehicle resource information also needs to include compatibility tags, such as "compliant with China VI emission standards," to ensure physical compatibility between the task and the vehicle.
[0056] The aforementioned site resource information includes the site's unique identifier, type attributes (such as high-speed ring road, dynamic plaza, high and low temperature wind tunnel, noise laboratory), space capacity limitations, equipment configuration list, available time slots, and special usage rules (such as no-entry at night, and entry limited to specific vehicle types). This site resource information is used to define the physical space constraints for executing the testing tasks.
[0057] In one alternative embodiment, site resource information includes not only static attribute data but also a dynamic occupancy status matrix. For example, a site occupancy table is maintained to record whether each site is occupied by other projects or maintenance tasks within a future time period. When scheduling, this matrix is queried to determine whether the target site is available during a specified time period. Furthermore, site resource information also includes environmental parameter constraints, such as the requirement for a constant site temperature of 20±2℃ for certain precision electrical tests. This information serves as a soft or hard constraint in fitness calculations; if a site is assigned to a site that does not meet environmental requirements, a fitness penalty is incurred.
[0058] The aforementioned personnel resource information includes the unique identifier, name, department, skill qualification level (e.g., junior, intermediate, senior, expert), list of operable test types (e.g., "qualified for high-voltage electrical operation," "experienced in emission regulation testing"), and personnel availability time windows (e.g., working hours, vacation schedule, meeting arrangements) of each person participating in the test. This personnel resource information aims to address the "human-machine matching" problem, ensuring that personnel performing the tests possess the corresponding technical capabilities and legal qualifications.
[0059] In one optional embodiment, personnel resource information is stored using a multi-tag structure. For example, personnel E1's tags are {Qualification: Senior, Expertise: Powertrain, Available Time: 9:00-17:00}. Personnel master data and attendance data are synchronized through the human resources system. During scheduling, it is necessary to verify whether the qualification level required for the task is less than or equal to the qualification level of the assigned personnel, and whether the task time period is within the personnel's available time window. If the task requires teamwork, the personnel resource information must also include team grouping information to ensure that the assigned group of personnel can collaboratively complete complex experimental projects requiring multi-person cooperation.
[0060] The aforementioned vehicle availability state constraint refers to the state restrictions when assigning test tasks to vehicles, stipulating that only vehicles meeting specific state conditions can be assigned to execute test tasks. The core logic of this constraint is "state consistency," meaning that the vehicle must be in an "available" state during task execution.
[0061] In one alternative embodiment, the vehicle availability state constraint is modeled as a Boolean check function. If a vehicle is marked as "unavailable" at any time during the execution period of task A (including maintenance, repair, accident, external rental, etc.), then the allocation scheme violates the vehicle availability state constraint and is determined to be an invalid solution.
[0062] The aforementioned test cycle constraints refer to the limitations on the time window and duration of test tasks, including the earliest start time, latest completion time, estimated duration, and dependencies between tasks. These constraints aim to ensure that the test plan meets the requirements of development milestones and physical time consumption logic.
[0063] The aforementioned site scheduling constraints refer to the spatiotemporal restrictions on the use of site resources by test tasks. They stipulate that only one test task can be executed at the same site within the same time period, and the site must remain idle during the task execution. Site scheduling constraints are essentially mutual exclusion constraints on spatial resources.
[0064] In one alternative embodiment, the site scheduling constraint is validated by constructing a two-dimensional "site-time" matrix. Any two tasks assigned to the same site violate this constraint.
[0065] The aforementioned personnel qualification constraints refer to the qualification matching restrictions when assigning testing tasks to testers, stipulating that personnel performing specific types of tests must possess the corresponding qualification certifications and skill levels. These personnel qualification constraints aim to ensure the compliance, security, and data validity of the testing process.
[0066] In one alternative embodiment, personnel qualification constraints are defined as set inclusion relationships or level comparison relationships. For example, if the qualification set of a test task must include the label "high voltage operation" and the task requires "advanced expert level" guidance, then the qualification level value of the assigned personnel must be greater than or equal to the level threshold required by the task.
[0067] Optionally, an initial population is generated based on multiple vehicle test tasks, resource information, and constraints, including:
[0068] Step S1021: Traverse multiple vehicle test tasks. For the current test task in the traversal: Based on the constraints and resource information, determine the current available resources corresponding to the current test task from the available resources; Based on the current available resources, construct the current available resource set.
[0069] Step S1022: Based on multiple currently available resource sets, initialize multiple individuals to obtain an initial population, wherein each individual includes multiple gene fragments, and the multiple gene fragments correspond one-to-one with multiple vehicle test tasks.
[0070] The aforementioned current test task refers to a specific test unit selected during the traversal process and awaiting resource allocation. Its essence is the entity object corresponding to a gene locus in the chromosome of the genetic algorithm.
[0071] Optionally, the current test task includes a task ID, task type, estimated time, time window requirements, and required resource attributes (such as vehicle type, venue type, and personnel qualifications). In the genetic algorithm's encoding structure, each test task corresponds to a fixed segment on a chromosome, which stores the specific resource allocation scheme for that task.
[0072] In one alternative embodiment, the traversal process can be performed in a random order or in an order based on task priority (such as urgency or dependency topological order). For example, if task A is a prerequisite task for task B, task A is processed first, ensuring that the resource usage of task A is determined when task B is assigned, thereby simplifying subsequent constraint checks. This traversal mechanism guarantees that all tasks to be scheduled can be included in the initial population construction process, laying the foundation for generating a complete scheduling scheme.
[0073] The currently available resources mentioned above refer to the subset of resources that meet all hard resource constraints within the time window of the current test task after being filtered by application constraints.
[0074] In one optional embodiment, determining currently available resources is a multi-dimensional filtering process. First, for vehicle resources, the system queries the vehicle status timeline, removing vehicles in the "under maintenance," "transportation," or "occupied" status, and retaining only vehicles with a status of "available" and whose time window covers the task execution period. Second, for site resources, the system checks the site scheduling matrix, removing sites already occupied by other tasks during the task's time period. Finally, for personnel resources, the system verifies the match between personnel qualification tags and task requirements, and whether the personnel's workload exceeds limits during the time period.
[0075] The aforementioned currently available resource set refers to the set containing all legal candidate resources determined for the current test task. For N test tasks, N currently available resource sets will be generated.
[0076] The aforementioned individual refers to a potential solution in the genetic algorithm population, representing a complete resource allocation plan for all vehicle testing tasks.
[0077] In one optional embodiment, an individual is composed of multiple gene segments, each corresponding to a resource allocation decision for a test task. For example, if there are 100 test tasks, an individual contains 100 gene segments. Each gene segment is further subdivided into sub-genes, encoding vehicle ID, site ID, personnel ID, and start time sequence number, respectively. Optionally, during initialization, a resource ID is randomly selected from the currently available resource set for each task and filled into the corresponding gene position. This random sampling strategy ensures the diversity of the initial population, avoiding search stagnation caused by all individuals having the same initial state. Simultaneously, since the sampling range is limited to the currently available resource set, the vast majority of initial individuals are feasible solutions, significantly improving the evolutionary efficiency of the algorithm in the early stages.
[0078] The aforementioned gene segment refers to the smallest logical unit that constitutes an individual (i.e., a chromosome), used to encode the specific resource attributes allocated to a single test task. Essentially, it is a gene locus on a chromosome. There is a one-to-one correspondence between gene segments and test tasks; this mapping is crucial in the decoding phase.
[0079] The aforementioned initial population refers to a set of multiple individuals that together constitute the starting point for the genetic algorithm search. Essentially, it is the initial sampling distribution of the solution space.
[0080] In one alternative embodiment, the size of the initial population (i.e., the number of individuals) is a preset parameter, typically set according to the problem size, such as 50-300 individuals.
[0081] Optionally, the process of generating the initial population is an iterative loop. For each new individual, all test tasks are traversed, and gene fragments are randomly sampled from the corresponding currently available resource set in turn to construct gene fragments. All gene fragments are then spliced together to form a complete individual until a preset number of individuals are generated.
[0082] Optionally, a genetic algorithm and objective function are used to perform genetic evolution processing on the initial population to determine the target individuals, including:
[0083] Step S1041: Perform a preset number of genetic evolutionary processes on the initial population to obtain the target population;
[0084] Step S1042: Using the objective function, calculate the fitness of multiple evolutionary individuals in the target population, where fitness is used to characterize the resource utilization rate of the candidate planning scheme.
[0085] Step S1043: Identify target individuals from the target population based on fitness.
[0086] The aforementioned genetic evolutionary treatment of the initial population in preset rounds refers to the computational process of iterative optimization of the initial population based on the theory of biological evolution. Its essence is an algorithmic process that gradually improves the overall fitness of the population by simulating natural selection, gene recombination and mutation.
[0087] Optionally, genetic evolution processing includes three core operations: selection, crossover, and mutation. The selection operation prioritizes retaining superior parent individuals based on their fitness values; the crossover operation generates offspring individuals that contain the superior traits of both parents by exchanging gene segments between two parent individuals; and the mutation operation randomly alters certain gene loci with a small probability to maintain population diversity and prevent premature convergence.
[0088] In one optional embodiment, the preset number of rounds is a fixed number of iterations (e.g., 500 generations). A loop counter is set, and the counter is incremented by 1 after each complete selection, crossover, and mutation operation. The evolutionary process terminates when the counter reaches the preset maximum number of rounds. For example, if the maximum number of rounds is set to 1000 generations, 1000 iterations will be strictly executed to ensure that the algorithm has sufficient time to fully search the solution space and avoid low solution quality due to insufficient iterations.
[0089] The aforementioned target population refers to a set of multiple evolved individuals that have undergone multiple generations of optimization, obtained after completing a preset round of genetic evolution processing.
[0090] In one alternative embodiment, the target population is the result of multiple rounds of "survival of the fittest" evolution. Each new generation of the population consists of offspring individuals produced by selection, crossover, and mutation operations from the previous generation. Typically, an "elite preservation strategy" is adopted, which involves directly copying the most fit individuals from the previous generation into the new generation to ensure that the optimal solution is not lost.
[0091] The aforementioned objective function refers to a mathematical model used to quantitatively evaluate the merits of candidate planning schemes. Its core is to transform the abstract concept of "resource utilization rate" into a specific numerical indicator. In one optional implementation, the objective function is defined as resource utilization rate, or it can be defined as a combination of resource utilization rate and other penalty terms.
[0092] For individuals that violate hard constraints (such as resource conflicts or incompatibility), the objective function assigns an extremely low fitness value (such as negative infinity or a very small constant), thus eliminating them in subsequent selection operations. In another embodiment, the objective function can also introduce weighted terms for soft constraints, such as minimizing the total task delay time or minimizing the number of resource switching. Through this refined mathematical modeling, the objective function can comprehensively characterize the economy and feasibility of a scheduling scheme, guiding the genetic algorithm to evolve towards high utilization and low conflict.
[0093] The fitness mentioned above refers to a numerical index that characterizes the quality of an individual based on the objective function. In essence, it is a quantitative mapping of the resource utilization rate of candidate planning schemes.
[0094] In one alternative embodiment, a higher fitness value indicates that the idle time of resources such as vehicles and sites in the candidate planning schemes corresponding to that individual is less, and the utilization efficiency is higher.
[0095] Optionally, the fitness calculation process includes two steps: First, the individual is decoded to reconstruct its gene sequence into a specific task-resource allocation table; second, it is checked whether the allocation table satisfies all hard constraints. If it does, the resource utilization rate is calculated and substituted into the objective function to obtain the fitness value; if the hard constraints are violated, a low score is directly assigned. For example, if individual A has a resource utilization rate of 85% and individual B has a resource utilization rate of 90%, and neither of them violates any constraints, then individual B has a higher fitness than individual A.
[0096] The aforementioned target individual refers to the individual with the highest fitness (i.e., the best resource utilization) selected from the target population. In essence, it is the globally optimal or near-optimal resource planning scheme obtained by the genetic algorithm search.
[0097] In one alternative embodiment, all individuals in the target population are traversed, their fitness values are compared, and the individual with the highest fitness value is selected as the target individual.
[0098] Optionally, the initial population undergoes a preset number of rounds of genetic evolution processing to obtain the target population, including:
[0099] Step S10411: For the initial population, perform a preset number of genetic evolution processes in a loop. Each round of genetic evolution processes includes: using an objective function to calculate the initial fitness of multiple individuals; performing a screening operation on the multiple individuals based on the initial fitness to determine the parent population; and performing crossover and mutation operations on the parent population in sequence to obtain the offspring population, wherein the offspring population includes multiple individuals after genetic evolution.
[0100] Step S10412: The offspring population obtained by cyclically performing a preset number of rounds of genetic evolution processing is taken as the target population.
[0101] The initial fitness mentioned above refers to the numerical index calculated based on the objective function, which characterizes the quality of each individual in the current population.
[0102] In one alternative embodiment, the process of calculating the initial fitness includes decoding each individual in the population, constraint checking, and evaluating the objective function. First, the individual's gene sequence is decoded into a specific experimental task—a resource allocation scheme. Second, the scheme is checked to see if it violates hard constraints (such as resource conflicts or mismatches), and if it does, a low score is assigned. Finally, the resource utilization rate of individuals that satisfy the constraints is calculated and substituted into the objective function to obtain the fitness value.
[0103] The above-mentioned screening operation refers to the process of selecting superior individuals from the current population as parents based on the initial fitness value. Its essence is to simulate the "survival of the fittest" selection mechanism in nature.
[0104] In one alternative embodiment, the selection operation can employ various selection algorithms, such as roulette wheel selection, tournament selection, or ranking selection. Taking tournament selection as an example, K individuals are randomly selected from the population, their fitness values are compared, and the individual with the highest fitness is retained as the parent. This process is repeated until a sufficient number of parent individuals are generated. In another embodiment, to maintain population diversity and prevent premature convergence, an elite retention strategy can be adopted, where the top N individuals with the highest fitness in the current population are directly copied to the parent population without participating in random selection.
[0105] The aforementioned crossover operation refers to the process of exchanging and recombining gene segments from two or more parent individuals to produce new offspring individuals. Its essence is to simulate gene recombination in the sexual reproduction of organisms, aiming to combine the superior characteristics of the parent generation and explore new solution spaces.
[0106] In one alternative embodiment, two intersection points are randomly selected, and all gene segments (including vehicle, site, and personnel allocation information) of the two parent individuals between these two points are exchanged.
[0107] The aforementioned mutation operation refers to the process of randomly changing the values of certain gene loci in offspring individuals with a small probability in order to introduce new genes and maintain population diversity. Its essence is to simulate gene mutation in biological heredity, aiming to escape the trap of local optima.
[0108] In one alternative embodiment, the mutation operation randomly perturbs specific gene loci within an individual. For example, for the vehicle allocation gene locus, a task is randomly selected, and its assigned vehicle ID is changed to another available vehicle ID that meets the constraints; for the time gene locus, the start time offset of the task is randomly adjusted. Optionally, the mutation operation must strictly adhere to hard constraints; for example, when mutating vehicle allocation, it must be ensured that the newly allocated vehicle is "available" and free from resource conflicts within that time period, otherwise resampling is required. The mutation probability is typically set low (e.g., 0.01-0.1) to avoid disrupting established optimal gene combinations while providing the necessary diversity to support global search.
[0109] The aforementioned offspring population refers to the set of candidate individuals for the next generation generated from the parent population through crossover and mutation operations. In an optional embodiment, the size of the offspring population is typically consistent with the initial population to maintain the stability of the algorithm's computational resources. By cyclically performing selection, crossover, and mutation operations, the previous generation population is continuously replaced by the offspring population. For example, if the parent population size is 50, after crossover and mutation, the system generates 50 offspring individuals, forming a new offspring population.
[0110] The target population refers to the set of individuals obtained after all genetic evolutionary processes in a preset number of rounds, containing the final optimization results. In an optional embodiment, the target population is the offspring population generated in the last iteration. Due to the multiple rounds of selection, crossover, and mutation, individuals in the target population typically have higher fitness values, i.e., higher resource utilization and fewer constraint violations.
[0111] Optionally, the initial fitness of multiple individuals is calculated using the objective function, including: traversing multiple individuals, and for the current individual in the traversal: determining the first duration and the second duration corresponding to the current individual, wherein the first duration is used to characterize the effective usage duration of available resources, and the second duration is used to characterize the available duration of available resources; and using the objective function, the first duration, and the second duration, determining the initial fitness of the current individual.
[0112] The aforementioned first duration refers to the total time during which all allocated available resources (such as test vehicles and test sites) are actually used to execute effective test tasks within a specified time planning period. In an optional embodiment, the first duration is calculated by summing the effective working time of all occupied resources within an individual. Specifically, all tasks within an individual are traversed, the execution duration of each task (end time minus start time) is extracted, and these durations are summed. It should be noted that the first duration only counts the time periods that are actually in the "execution" state, excluding the waiting, idle, or preparation time of resources between tasks.
[0113] The aforementioned second duration refers to the total theoretically usable duration of all available resources participating in the scheduling within the specified time planning period. In an optional embodiment, the available duration of the subset of resources actually selected for use by an individual is calculated.
[0114] In one alternative embodiment, the objective function = resource utilization = first duration / second duration. The closer this ratio is to 1, the more fully the resources are utilized, and the better the solution. In another embodiment, the objective function includes a penalty term to handle violations of soft or hard constraints.
[0115] Optionally, after determining the first duration and the second duration corresponding to the current individual, the first duration and the second duration are substituted into the objective function to obtain the initial fitness corresponding to the current individual.
[0116] Optionally, the test resource planning method also includes:
[0117] Step S1044: Perform constraint condition judgment on multiple evolutionary individuals and obtain the judgment result;
[0118] Step S1045: Based on the judgment results, update the fitness of each of the multiple evolutionary individuals.
[0119] The above-mentioned constraint judgment refers to the process of verifying the legitimacy of multiple evolved individuals produced during the genetic evolution process.
[0120] Optionally, constraints include hard constraints (conditions that must be met, such as vehicle availability, personnel qualifications, and time windows) and soft constraints (conditions that are desired but not mandatory, such as resource load balancing). In one optional embodiment, each evolved individual in the target population is traversed, decoded into a specific task-resource allocation table, and checked one by one for violations of any hard constraints. For example, it checks whether a task has been assigned to a vehicle that is "under maintenance," or whether the same location has been assigned to two different tasks within the same time period. If any hard constraint violation is found, the individual is marked as an "illegal solution"; if all hard constraints are met, it is marked as a "legal solution."
[0121] The aforementioned judgment result refers to the status identifier representing the legitimacy of each evolved individual after constraint condition judgment. In an optional implementation, the judgment result can be a Boolean value or structured data containing the violation type and severity.
[0122] The aforementioned fitness update refers to the calculation process of adjusting the fitness value of evolved individuals based on the judgment results. Its essence is to guide the genetic algorithm to evolve towards a feasible and high-quality solution space through a penalty mechanism or a reward mechanism.
[0123] In one alternative embodiment, for individuals that violate hard constraints, the fitness update strategy typically employs a "large penalty method," which sets their fitness value to a very small negative number or zero, making them almost impossible to select in subsequent selection operations, thereby quickly eliminating ineffective solutions from the population. For individuals that violate soft constraints but satisfy hard constraints, the fitness update strategy employs a "small penalty method," which subtracts the corresponding penalty value from the initial fitness (e.g., resource utilization). For example, if individual A has a resource utilization rate of 0.8, but is judged to have violated a soft constraint due to frequent site switching, with a penalty value of 0.05, then the updated fitness is 0.75.
[0124] Optionally, the test resource planning method further includes updating the initial population in response to a target event, wherein the target event includes at least one of the following: a change in the vehicle test task or a change in available resources.
[0125] The aforementioned target event refers to a specific signal or condition change that triggers the re-execution of test resource planning; its essence is a "trigger" of the dynamic rescheduling mechanism.
[0126] Optionally, the target events include, but are not limited to: changes in vehicle testing tasks, such as the addition of emergency testing tasks, postponement or cancellation of existing tasks, and adjustment of task priorities; changes in available resources, such as sudden failure of test vehicles, temporary occupation of key sites, and leave or resignation of core testing personnel.
[0127] In one alternative embodiment, the target event is captured by listening to an external event bus or periodically polling a resource status database.
[0128] Optionally, Figure 2 This is a flowchart illustrating a test resource planning method according to one embodiment of the present invention, such as... Figure 2 As shown, the test resource planning method can be implemented in the following steps.
[0129] Specifically, the process involves inputting the experimental task, vehicle resources, and constraints; performing problem modeling and chromosome encoding; initializing the genetic algorithm population; calculating individual fitness (based on resource utilization as the core); determining if the termination condition is met; if not, executing genetic operations (selection, crossover, mutation); if the termination condition is met, outputting the optimal scheduling scheme; determining if dynamic adjustment is triggered; if not, executing the scheduling scheme; and if dynamic adjustment is triggered, updating the input based on the current state.
[0130] Optionally, problem modeling and chromosome encoding aim to transform the actual vehicle test scheduling problem into an optimization problem model that can be handled by genetic algorithms. First, the input elements of the problem need to be defined: a series of test tasks to be scheduled (each task includes attributes such as required resource type, estimated time, and latest completion time), a vehicle resource pool (each vehicle includes its unique identifier, current and future status such as available, under maintenance, or in transport), a test site resource pool (including site identifier and available time slots), a pool of qualified personnel, and various constraints, including but not limited to: vehicle availability constraint (tasks must be assigned to vehicles with an "available" status), test cycle constraint (tasks must be completed within their time windows), site scheduling constraint (the site required for a task must be available during the task execution time), and personnel qualification constraint (personnel assigned to a task must possess the qualifications required for that test type). Next, a chromosome encoding scheme is designed to represent a potential solution to the problem. This invention employs a composite encoding method, where a chromosome consists of multiple gene segments, each corresponding to a test task. Each gene segment contains multiple gene positions, which encode the vehicle resource identifier assigned to the task, the start time (or sequence number), the assigned site identifier, and the assigned personnel identifier, respectively. Through this encoding, a complete chromosome defines a complete scheduling scheme, specifying which vehicle, when, where, and by whom each task will be performed. The specific form of encoding can be real number encoding, integer encoding, or sequence-based encoding, and it must be ensured that the decoding program can unambiguously map back to the specific scheduling plan.
[0131] Optionally, after defining the chromosome encoding method, an initial candidate solution population needs to be generated, i.e., the initial population. Population size is a key parameter, and an appropriate value should be set based on the problem scale (number of tasks, number of resources). The initialization process involves randomly generating a certain number of chromosome individuals (equal to the population size). However, random generation may produce a large number of invalid solutions that violate hard constraints (such as assigning tasks to unavailable vehicles), affecting the initial search efficiency of the algorithm. Therefore, heuristic rules can be used to assist in generation. For example, when assigning vehicles to tasks, only vehicles currently in the "available" state within the task time window can be randomly selected. When allocating the start time, the existing occupancy of the vehicle and the site should be considered to avoid obvious conflicts. This way, the generated initial population has both randomness to ensure diversity and a certain degree of feasibility.
[0132] Furthermore, the fitness of individuals is calculated. The fitness function (i.e., the objective function) is used to evaluate the merits of a scheduling scheme (i.e., an individual chromosome) and guide the genetic algorithm to evolve towards a better solution. The core of this invention is to construct the fitness function based on resource utilization. First, the chromosome needs to be decoded, converted into a specific scheduling timetable, and checked to see if it satisfies all hard constraints (such as resource conflicts, qualification mismatches, etc.). For individuals that violate hard constraints, a very low fitness value or penalty term can be given. For feasible solutions that satisfy hard constraints, their fitness is calculated. Resource utilization is the core indicator, which can be defined as the ratio of the sum of the effective usage time of all occupied key resources (such as test vehicles, test sites) to the sum of the total available time of these resources within the scheduling period. Effective usage time refers to the time when resources actually perform tasks, excluding idle waiting time. The fitness function should be designed so that the higher the resource utilization, the higher the fitness value of the individual. Furthermore, the fitness function can also take into account other optimization objectives, such as minimizing the total task completion time (maximum completion time) and minimizing task delay, transforming multi-objective fitness into a single-objective fitness through weighted summation. Ultimately, each individual will be assigned a fitness score.
[0133] Optionally, genetic operations simulate the biological evolution process to generate a new generation from the current population. The main operations include selection, crossover, and mutation. Specifically, based on fitness values, methods such as roulette wheel selection and tournament selection are used to select individuals with high fitness from the current population as parents for reproduction. Individuals with higher fitness have a greater probability of being selected. Then, the selected parents are randomly paired, and their chromosomes are exchanged with a certain crossover probability to generate new offspring. Crossover is the main means of generating new solutions and combining the superior characteristics of the parents. For the composite coding of this invention, a suitable crossover operator needs to be designed, for example, two-point crossover: two crossover points are randomly selected, and all task gene segments (including their assigned vehicle, time, location, and person information) of the two parents are exchanged between these two points. Further, with a small mutation probability, the values of one or more gene positions on the chromosomes of the offspring are randomly changed. For example, a task is randomly selected, and its assigned vehicle is changed to another available vehicle, or its start time is randomly shifted within a feasible range. The mutation operation introduces new genes, which helps maintain population diversity and prevents the algorithm from converging prematurely to a local optimum. After selection, crossover, and mutation operations, a new generation of the population is obtained, replacing the old population and completing one iteration.
[0134] Optionally, the termination condition for the genetic algorithm can be set to reaching the maximum number of iterations, or the optimal fitness no longer significantly improving over multiple generations. When the termination condition is met, the algorithm stops and outputs the individual with the highest fitness (i.e., the optimal scheduling scheme) from the final population. The output needs to be decoded into a human-readable scheduling Gantt chart or table, detailing the vehicles, start time, end time, occupied space, and assigned personnel for each task.
[0135] Furthermore, during the execution of the plan, the scheduling status is monitored. When a predefined trigger event occurs, such as a prototype vehicle becoming "unavailable" due to a malfunction, a test task needing to be postponed, or an emergency task being added, dynamic adjustment is triggered. At this time, the input is updated based on the current actual state. Specifically, completed tasks are marked as completed and removed from the list of tasks to be scheduled. The current state and future availability of all resources (vehicles, sites, personnel) are updated. Affected tasks that have not yet started (such as tasks originally assigned to malfunctioning vehicles) and newly added tasks are added to the list of tasks to be scheduled. Then, the genetic algorithm optimization process is restarted with the updated task list and resource status as new input. Since the rescheduling is based on the current state, and the population can partially inherit the previous optimization results (for example, using the currently executing reasonable scheduling segment as part of the initial population), a new optimized scheduling plan starting from the current moment can be quickly generated, achieving dynamic adjustment.
[0136] For example, in the testing and verification phase of a vehicle R&D project, the testing management department needs to develop a detailed schedule for testing tasks over the next two weeks. The scenario involves three test prototypes (V1, V2, V3), two dedicated testing grounds (S1, S2), a team of five testing engineers (E1-E5), and ten pending testing tasks (T1-T10). Each task has attributes: required test type (e.g., durability, emissions, electrical), estimated time (e.g., 8 hours, 3 days), latest completion date, required vehicle type, required ground type (e.g., S1 is only for emissions testing), and required personnel qualification level (e.g., senior, intermediate). Vehicle status changes dynamically; for example, V2 is initially in "transportation" and becomes "available" two days later; the grounds have scheduled maintenance periods; and personnel E3 takes leave on the third day. The specific steps for implementing this invention are as follows: First, data preparation and input: The system administrator creates a resource pool in the system, enters the identifiers and status timelines of V1, V2, and V3; enters the available slots for S1 and S2; and enters the qualification information for E1-E5. Subsequently, experimental tasks T1-T10 are created, and the above attributes are set for each task. The system uses all information as input to the optimization model. Second, standard scheduling is executed: The user activates the intelligent scheduling function, which automatically constructs a constraint model based on the input. An integer encoding scheme is adopted, with one chromosome containing 10 gene segments (corresponding to T1-T10). Each gene segment contains 4 gene positions, represented by integers: the assigned vehicle ID (e.g., 1, 2, 3), the assigned site ID (e.g., 1, 2), the assigned personnel ID (e.g., 1-5), and a sequence number representing the relative start time. Then, the system generates an initial population containing 50 individuals. Heuristic rules are applied during initialization: for example, when assigning a vehicle to time T1, it is randomly selected only from the set of vehicles in the "available" state within the T1 time window. The assigned time sequence number must ensure that the vehicle and site are not occupied by other scheduled tasks during that time period. When calculating fitness, a specific schedule is generated for each individual, and it is checked for violations of hard constraints (such as assigning a task to a vehicle in transit or assigning an emissions test to the wrong site). Individuals that violate hard constraints are assigned extremely low fitness values. For feasible individuals, the core metric "resource utilization" is calculated: the total available time of all vehicles and sites within the two-week planning period is calculated (for example, if a vehicle works 8 hours a day for 14 days, the total available time is 8...). (14 = 112 hours), then calculate the total time these resources actually spend executing tasks in the scheduling plan (effective usage time). The fitness value is set as the ratio of "effective usage time to total available time," with higher values being better. Simultaneously, a penalty is applied to task delays; the fitness function is: Fitness = Resource Utilization Rate - Delay Penalty Weight Total delay days. In genetic operations, tournament selection is used to select parents, two-point crossover is used for crossover (randomly selecting two crossover points and exchanging all information of the corresponding task gene segments between parents), and single-point mutation is used (randomly changing the vehicle, personnel, or time sequence number on a certain task gene locus, with the new value randomly selected from the feasible set that meets the constraints). The crossover probability is set to 0.8, and the mutation probability is set to 0.1. The algorithm iterates for 200 generations. After the iteration, the system outputs the scheduling scheme with the highest fitness, displayed in the form of a Gantt chart, clearly listing that T1 is executed by V1 on the first day in S1 by E1, T2 is executed by V3 on the second day in S2 by E2, etc. The test management department issues tasks according to this scheme. On the third day of the plan, V1 suddenly fails and its status changes to "under maintenance," expected to last for 2 days. The system monitors this status change and automatically triggers dynamic rescheduling. The system updates the input, removing the T1 (completed) marker; updating the V1 status to unavailable for the next two days; and releasing the unstarted tasks originally assigned to V1 (let's say T4 and T7) back to the scheduling pool. Starting from the current time, and using the remaining 9 tasks (T4, T7, T5, T6, T8, T9, T10, T2, T3) and the updated resource status as input, the genetic algorithm is rerun. The algorithm can partially inherit the currently effective schedule (e.g., T2 and T3 are executing as originally planned, their gene segments are fixed and included in the initial population), quickly generating a new optimized scheduling scheme starting from the third day, thus achieving rapid response to unexpected events.
[0137] In another example, a large automotive proving ground needs to manage a more extensive and complex monthly test plan. This scenario involves 15 test vehicles (with different model configurations), 5 different types of test tracks (such as high-speed loops, dynamic plazas, and rough roads), 20 test personnel, and over 100 test tasks. Complex dependencies exist between tasks (e.g., task B can only begin after task A is completed), and resource constraints are more diverse (e.g., some tasks require vehicles with specific configurations, and some tracks are unavailable at night). The specific steps for implementing this invention are as follows: In problem modeling and chromosome encoding, an additional mechanism is introduced to address task dependencies. Besides encoding the resource allocation (vehicle, location, personnel, time) for each task, dependency constraint checks are added during decoding and fitness calculation. For example, when decoding to generate the scheduling timetable, the system checks whether the start time of each task is later than the end time of all its predecessor tasks. If a violation occurs, the individual is marked as violating a hard constraint and assigned a low fitness, demonstrating the scalability of constraint handling. During population initialization, for large-scale problems, the population size is set to 200 to maintain sufficient diversity. More complex heuristic rules are used during initialization to improve the quality of initial solutions. For example, for task chains with dependencies, the system will prioritize assigning them to the same vehicle to reduce vehicle switching and waiting time. This is a concrete manifestation of "dedicated genetic operator design for whole-vehicle test scheduling." In calculating individual fitness, the fitness function further integrates multiple objectives based on the core resource utilization rate. Several sub-objectives are defined: F1 (vehicle and site utilization rate), F2 (total task completion time, i.e., maximum completion time), F3 (average task delay), and F4 (resource load balancing). Linear weighted sum or sorting-based methods (such as NSGA-II's fast non-dominated sorting) are used to handle these objectives. For example, a simple weighted fitness function can be designed as: Fitness = w1F1 + w2(1 / F2) + w3 (1 / (1+F3))+w4 F4, where w1-w4 are weight coefficients, needs to be set according to management preferences. In genetic operations, specific crossover and mutation operators are designed to improve efficiency for large-scale problems. The crossover operation uses "task-group-based crossover," randomly selecting a group of tasks that are related in time or resources (e.g., all tasks using the same vehicle), and exchanging the complete scheduling information of this group of tasks among parent individuals. This helps to preserve good local scheduling fragments. The mutation operation includes "resource replacement mutation" (randomly selecting a task and replacing its vehicle or personnel with another suitable resource) and "time offset mutation" (randomly advancing or postponing the start time of a task by one unit, provided that dependencies and resource availability are satisfied). These specialized operators enhance the algorithm's search capability in complex solution spaces.
[0138] Optionally, for typical vehicle testing scheduling problems (with tens to hundreds of tasks), after experimental debugging, it is recommended to set the population size between 50 and 300 to ensure a balance between search space coverage and computational efficiency. The crossover probability is typically set between 0.7 and 0.9 to promote optimal gene combinations. The mutation probability is typically set between 0.01 and 0.1 to maintain population diversity and avoid premature convergence. The termination condition can be set to the maximum number of iterations (e.g., 500-2000 times), or stopping when the optimal fitness value improves less than a certain minimum threshold within N consecutive generations (e.g., 50-100 generations). These parameters need to be adjusted according to the specific problem size and complexity.
[0139] Furthermore, in fitness function design, it is necessary to distinguish between hard constraints and soft constraints. Hard constraints are conditions that must be met, such as "tasks must be assigned to available vehicles" or "personnel qualifications must match." For individuals that violate hard constraints, either a "penalty function method" or a "rejection method" is used. The penalty function method applies a very large penalty value to significantly reduce its fitness, causing it to be eliminated in the evolutionary process. The rejection method directly determines it as an infeasible solution during the decoding phase, preventing it from proceeding to the next selection. Soft constraints are requirements that are desired to be met as much as possible but are not mandatory, such as "minimizing the total project duration" or "avoiding excessive resource utilization." Soft constraints are usually optimized by incorporating them into the multi-objective part of the fitness function after weighting. This hierarchical processing strategy ensures that the final solution pursues optimality while satisfying all necessary conditions.
[0140] Furthermore, the intelligent scheduling method (i.e., test resource planning method) in this invention can be deployed as a standalone software module or service. In a real enterprise IT environment, it can be integrated with existing test management systems, product lifecycle management software, or enterprise resource planning systems. Integration can be achieved by automatically obtaining test task lists, resource status data, and constraints from these systems via application programming interfaces (APIs). After scheduling optimization, the generated scheduling plan is written back to these systems to drive task execution and resource reservation. This integration seamlessly combines intelligent algorithms with existing enterprise workflows, improving the overall level of management automation.
[0141] Furthermore, considering the cost differences in resource usage (the testing costs vary for different vehicle models), cost metrics can be incorporated into the fitness function. Alternatively, considering probabilistic models with uncertainty (such as task duration being a probability distribution rather than a fixed value), robust optimization or scenario-based optimization methods can be employed. In addition, at the algorithmic level, hybrid approaches with other metaheuristic algorithms (such as particle swarm optimization and simulated annealing) can be explored to further improve optimization performance.
[0142] For example, other metaheuristic algorithms, such as particle swarm optimization, simulated annealing, and ant colony optimization, can be used to replace genetic algorithms to solve the same scheduling optimization model. These algorithms also find the optimal solution through iterative search, but their iteration mechanisms and individual representations (such as particle position, current solution, and pheromone path) differ from those of genetic algorithms. As long as their fitness function (or evaluation function) still focuses on resource utilization and handles the same multidimensional constraints, similar inventive objectives can be achieved.
[0143] In summary, addressing the shortcomings of existing technologies in terms of adaptability and comprehensive constraint handling, this invention solves the core challenges of frequent resource conflicts and difficulty in optimizing manual scheduling in actual vehicle test scheduling due to incomplete constraint models. This invention constructs a unified optimization model that can simultaneously integrate multi-dimensional heterogeneous constraints and solves it using a genetic algorithm, directly addressing the problems of "frequent resource conflicts and suboptimal manual scheduling," aiming to reduce conflicts arising from constraint omissions or simplifications at their root. Secondly, addressing the insufficient dynamic adjustment and uncertainty handling capabilities of existing technologies, this invention solves the pain point of the system's inability to quickly respond and generate new optimization schemes after test plans are disrupted by unforeseen circumstances (such as prototype vehicle failure or task delays), i.e., the problem of "inability to dynamically adjust." This invention's intelligent scheduling framework based on genetic algorithms, through the design of a re-optimization mechanism adapted to dynamic triggering, can quickly iterate and generate new feasible scheduling schemes when plans change, thereby overcoming the problems of rigid plans and low efficiency due to reliance on manual intervention. Finally, addressing the issue of insufficient comprehensiveness in the optimization objectives of existing technologies, this invention solves the problem that scheduling schemes often focus on a single objective (such as time or cost) and fail to effectively optimize key economic indicators (such as resource utilization). This invention explicitly constructs a fitness function with resource utilization as the core, focusing the optimization objective of the scheduling scheme on improving the overall utilization efficiency of expensive test vehicles, sites, and other resources while satisfying various complex constraints. This more comprehensively meets the need for a balanced approach to efficiency and cost in practical management.
[0144] It's easy to understand that in terms of efficiency improvement, the use of chromosome encoding to uniformly represent test task sequences and vehicle resource allocation, combined with optimization based on a fitness function centered on resource utilization, enables the automatic and rapid search and generation of optimal scheduling schemes. This significantly reduces the substantial time and manpower required for traditional scheduling based on human experience, thereby improving the efficiency of the scheduling process itself. Simultaneously, by comprehensively considering multiple constraints such as prototype vehicle status, test cycle, site, and personnel, the generated schemes effectively reduce resource conflicts, thereby reducing coordination and waiting time caused by conflicts and improving the overall execution efficiency and test throughput of test tasks. Regarding resource utilization and cost savings, using resource utilization as the core optimization objective drives the genetic algorithm to find scheduling schemes that make fuller use of key resources such as vehicles and sites. This directly leads to an increase in useful performance, meaning that the number of test tasks that can be completed per unit time may increase, or the resource idle time required to complete a given task may decrease. High resource utilization means completing the same experimental task with fewer resources or in less time, thus helping to reduce the overall time cost and resource idle cost of the experiment, achieving savings in raw materials (such as vehicle wear and tear) and processes (such as waiting and switching). Regarding ease of operation and control, the scheduling process is automated and intelligent. Users only need to input task requirements and resource constraints, and the system can automatically output an optimized scheduling plan, greatly simplifying the processing (i.e., scheduling) and operation. Furthermore, for dynamic adjustment needs, the technical solution of this invention can quickly respond to and re-optimize according to plan changes, which enhances the convenience and controllability of the system, enabling experiment managers to easily cope with uncertainty, maintain the feasibility and excellence of the plan, and reduce the tedious work of frequent manual intervention and adjustments. In terms of accuracy, the iterative optimization process based on genetic algorithms can perform a global search in a complex solution space, avoiding getting trapped in local optima, thereby obtaining a higher quality and more reasonable scheduling plan. Comprehensive and accurate constraint modeling ensures that the plan meets all actual key constraints, improving the feasibility and execution accuracy of the scheduling plan, and reducing the risk of rework or plan interruption due to plan defects.
[0145] This invention also provides a test resource planning system for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.
[0146] According to one aspect of the present invention, a test resource planning system is also provided. Figure 3 This is a structural block diagram of a test resource planning system according to one embodiment of the present invention, such as... Figure 3 As shown, the test resource planning system 300 includes: an acquisition module 301, used to acquire multiple vehicle test tasks, resource information, and constraints, wherein the resource information describes the available resources for executing multiple vehicle test tasks, and the constraints characterize the constraint relationship between the multiple vehicle test tasks and the available resources; a generation module 302, used to generate an initial population based on the multiple vehicle test tasks, resource information, and constraints, wherein the initial population includes multiple individuals, and any individual is used to characterize a candidate planning scheme for the available resources to complete the multiple vehicle test tasks; a construction module 303, used to construct an objective function with the resource utilization rate of the candidate planning scheme as the optimization objective; a processing module 304, used to perform genetic evolution processing on the initial population using a genetic algorithm and the objective function to determine the target individual; and a determination module 305, used to determine the target planning scheme based on the target individual.
[0147] Optionally, the resource information shall include at least: vehicle resource information, site resource information, and personnel resource information, and the constraints shall include at least: vehicle availability constraints, test cycle constraints, site scheduling constraints, and personnel qualification constraints.
[0148] Optionally, the generation module 302 is further configured to: traverse multiple vehicle test tasks, and for the current test task in the traversal: determine the current available resources corresponding to the current test task from the available resources according to the constraints and resource information; construct a set of current available resources according to the current available resources; initialize multiple individuals according to multiple sets of current available resources to obtain an initial population, wherein each individual includes multiple gene fragments, and the multiple gene fragments correspond one-to-one with multiple vehicle test tasks.
[0149] Optionally, the processing module 304 is further configured to: perform a preset number of genetic evolutionary processes on the initial population to obtain a target population; calculate the fitness of multiple evolved individuals in the target population using an objective function, wherein the fitness is used to characterize the resource utilization rate of the candidate planning scheme; and determine the target individuals from the target population based on the fitness.
[0150] Optionally, the processing module 304 is further configured to: perform a preset number of genetic evolution processes on the initial population, wherein each round of genetic evolution processes includes: calculating the initial fitness of multiple individuals using an objective function; performing a screening operation on the multiple individuals based on the initial fitness to determine the parent population; performing crossover and mutation operations on the parent population in sequence to obtain the offspring population, wherein the offspring population includes multiple individuals after genetic evolution; and using the offspring population obtained by performing the preset number of genetic evolution processes on the initial population as the target population.
[0151] Optionally, the processing module 304 is further configured to: traverse multiple individuals, and for the current individual in the traversal: determine the first duration and the second duration corresponding to the current individual, wherein the first duration is used to characterize the effective usage duration of available resources, and the second duration is used to characterize the available duration of available resources; and determine the initial fitness corresponding to the current individual using the objective function, the first duration, and the second duration.
[0152] Optionally, the processing module 304 is further configured to: perform constraint condition judgment on multiple evolutionary individuals and obtain judgment results; and update the fitness of each of the multiple evolutionary individuals according to the judgment results.
[0153] Optionally, the generation module 302 is further configured to: update the initial population in response to a target event, wherein the target event includes at least one of the following: a change in the vehicle testing task or a change in available resources.
[0154] According to another aspect of the present invention, an electronic device is also provided, comprising: a memory storing an executable program; and a processor for running the executable program, wherein the executable program executes the test resource planning method described in any of the above embodiments.
[0155] Optionally, in this embodiment, the executable program performs the following steps when it runs:
[0156] Step S101: Obtain multiple vehicle test tasks, resource information, and constraints. The resource information describes the available resources for executing multiple vehicle test tasks, and the constraints characterize the constraint relationship between the multiple vehicle test tasks and the available resources.
[0157] Step S102: Based on multiple vehicle test tasks, resource information and constraints, an initial population is generated, wherein the initial population includes multiple individuals, and any individual is used to represent a candidate planning scheme of available resources to complete multiple vehicle test tasks.
[0158] Step S103: Construct an objective function with the resource utilization rate of the candidate planning scheme as the optimization objective;
[0159] Step S104: Using a genetic algorithm and objective function, perform genetic evolution processing on the initial population to determine the target individual;
[0160] Step S105: Determine the target planning scheme based on the target individual.
[0161] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the test resource planning method described in any of the above.
[0162] Optionally, in this embodiment, the executable program can be configured to store an executable program for performing the following steps:
[0163] Step S101: Obtain multiple vehicle test tasks, resource information, and constraints. The resource information describes the available resources for executing multiple vehicle test tasks, and the constraints characterize the constraint relationship between the multiple vehicle test tasks and the available resources.
[0164] Step S102: Based on multiple vehicle test tasks, resource information and constraints, an initial population is generated, wherein the initial population includes multiple individuals, and any individual is used to represent a candidate planning scheme of available resources to complete multiple vehicle test tasks.
[0165] Step S103: Construct an objective function with the resource utilization rate of the candidate planning scheme as the optimization objective;
[0166] Step S104: Using a genetic algorithm and objective function, perform genetic evolution processing on the initial population to determine the target individual;
[0167] Step S105: Determine the target planning scheme based on the target individual.
[0168] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0169] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0170] In the embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The system embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.
[0171] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0172] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0173] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0174] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A test resource planning method, characterized in that, include: Multiple vehicle test tasks, resource information, and constraints are obtained, wherein the resource information is used to describe the available resources for executing the multiple vehicle test tasks, and the constraints are used to characterize the constraint relationship between the multiple vehicle test tasks and the available resources. Based on the multiple vehicle test tasks, the resource information, and the constraints, an initial population is generated, wherein the initial population includes multiple individuals, and any individual is used to represent a candidate planning scheme for the available resources to complete the multiple vehicle test tasks. Using the resource utilization rate of the candidate planning scheme as the optimization objective, an objective function is constructed; Using a genetic algorithm and the objective function, the initial population is subjected to genetic evolution processing to determine the target individual; Based on the target individuals, a target planning scheme is determined.
2. The test resource planning method according to claim 1, characterized in that, The resource information includes at least: vehicle resource information, site resource information, and personnel resource information, and the constraints include at least: vehicle availability constraints, testing cycle constraints, site scheduling constraints, and personnel qualification constraints.
3. The test resource planning method according to claim 1, characterized in that, Based on the multiple vehicle test tasks, the resource information, and the constraints, the initial population is generated, including: Traverse the multiple vehicle test tasks, and for the current test task in the traversal: determine the current available resources corresponding to the current test task from the available resources according to the constraints and the resource information; construct the current available resource set according to the current available resources; The multiple individuals are initialized based on multiple currently available resource sets to obtain the initial population, wherein each individual includes multiple gene fragments, and the multiple gene fragments correspond one-to-one with the multiple vehicle test tasks.
4. The test resource planning method according to claim 1, characterized in that, Using the genetic algorithm and the objective function, the initial population is subjected to genetic evolutionary processing to determine the target individual, including: The initial population is subjected to a preset number of genetic evolutionary processes to obtain the target population; Using the objective function, the fitness of multiple evolutionary individuals in the target population is calculated, wherein the fitness is used to characterize the resource utilization rate of the candidate planning scheme; The target individual is determined from the target population based on the fitness.
5. The test resource planning method according to claim 4, characterized in that, The initial population is subjected to the preset number of genetic evolutionary processes to obtain the target population, including: For the initial population, the genetic evolution process is performed cyclically for the preset number of rounds. Each round of genetic evolution process includes: using the objective function to calculate the initial fitness of each of the multiple individuals; performing a screening operation on the multiple individuals based on the initial fitness to determine the parent population; and performing crossover and mutation operations on the parent population in sequence to obtain the offspring population, wherein the offspring population includes multiple individuals after genetic evolution. The offspring population obtained by cyclically performing the preset rounds of genetic evolution processing is taken as the target population.
6. The test resource planning method according to claim 5, characterized in that, Using the objective function, the initial fitness of each of the multiple individuals is calculated, including: Traverse the multiple individuals, and for the current individual in the traversal: determine the first duration and the second duration corresponding to the current individual, wherein the first duration is used to characterize the effective usage duration of the available resources, and the second duration is used to characterize the available duration of the available resources; use the objective function, the first duration and the second duration to determine the initial fitness corresponding to the current individual.
7. The test resource planning method according to claim 4, characterized in that, The test resource planning method also includes: Constraint conditions are assessed on the multiple evolutionary individuals to obtain the assessment results; Based on the judgment result, the fitness of each of the multiple evolutionary individuals is updated.
8. The test resource planning method according to claim 1, characterized in that, The test resource planning method also includes: In response to a target event, the initial population is updated, wherein the target event includes at least one of the following: a change in the vehicle testing task or a change in available resources.
9. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the executable program, wherein the executable program, when running, performs the test resource planning method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the test resource planning method according to any one of claims 1 to 8.
