CN112486600B - Script file execution ordering method based on vehicle simulation calculation - Google Patents
Script file execution ordering method based on vehicle simulation calculation Download PDFInfo
- Publication number
- CN112486600B CN112486600B CN202011367485.XA CN202011367485A CN112486600B CN 112486600 B CN112486600 B CN 112486600B CN 202011367485 A CN202011367485 A CN 202011367485A CN 112486600 B CN112486600 B CN 112486600B
- Authority
- CN
- China
- Prior art keywords
- script file
- row
- target script
- execution
- parameters
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000004088 simulation Methods 0.000 title claims abstract description 44
- 238000004364 calculation method Methods 0.000 title claims abstract description 39
- 238000000034 method Methods 0.000 title claims abstract description 33
- 238000012545 processing Methods 0.000 abstract description 8
- 238000012163 sequencing technique Methods 0.000 abstract description 4
- 238000013461 design Methods 0.000 abstract description 3
- 238000005516 engineering process Methods 0.000 description 2
- 239000013598 vector Substances 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4482—Procedural
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4494—Execution paradigms, e.g. implementations of programming paradigms data driven
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a script file execution ordering method based on vehicle simulation calculation, which comprises the following steps: s1: counting input parameters and output parameters to form a list; s2: establishing a file execution sequence; s3: extracting input parameters as output parameters; s5: extracting the i-th line input parameter and comparing the j=1-th line parameter; s6: the input parameters of the ith row are inserted into the (j+1) th row; s7: clearing the record i value; s8: judging whether the j+1st row execution sequence is less than or equal to the total row number of the execution sequence; s9: and judging whether the input parameters exist or not. The script file execution sequencing method based on the vehicle simulation calculation determines the execution sequence of the files by comparing the dependency relationship of the input and output parameters of the script files in the vehicle simulation calculation process, designs a set of program operation method applied to the batch execution of the script files in the vehicle simulation calculation, provides reference for rapid calculation in batch processing, and improves the code quality and maintainability of batch processing programs.
Description
Technical Field
The invention belongs to the field of programming, and particularly relates to a script file execution ordering method based on vehicle simulation calculation.
Background
With the advent of the big data age, the batch processing technology of information has become an important ring in programming, and has important roles in accelerating the running speed and improving the running efficiency. The application of the vehicle simulation technology has important significance in the aspects of innovative research and development, virtual test, test evaluation and the like of automobiles. In the simulation calculation process, the problems of low loading speed and low sequential execution efficiency of batch script files exist, so that efficient program algorithm design is always a continuously pursued goal, but the current script file execution ordering technical scheme capable of meeting diversified vehicle simulation calculation is not visible, so that the script file execution ordering method based on the vehicle simulation calculation is necessary to overcome the existing defects.
Disclosure of Invention
In view of the above, the present invention aims to provide a script file execution ordering method based on vehicle simulation calculation, so as to solve the problems of slow file batch execution speed, low sequential loading efficiency, and low program calculation efficiency and code readability in the prior art.
In order to achieve the above purpose, the technical scheme of the invention is realized as follows:
a script file execution ordering method based on vehicle simulation calculation comprises the following steps:
s1: counting input parameters and output parameters of a target script file to be loaded in the vehicle simulation calculation process to form a target script file list;
s2: establishing a file execution sequence, and counting the existing parameters in a variable space before the operation of the target script file;
s3: extracting output parameters corresponding to the target script files with the input parameters being empty in the target script file list;
s4: storing the existing parameters counted in step S2 and the output parameters extracted in step S3 in a first line and a second line of the execution sequence, respectively;
s5: extracting an input parameter of an ith row in the target script file list, comparing the input parameter with a parameter of a jth=1 row in an execution sequence, comparing the former parameter with the execution sequence parameter of the jth=j+1 row when the former parameter contains all the latter parameters, otherwise, inserting the input parameter in the ith row target script file list into the jth+1 row of the execution sequence, and recording the current i value;
s6: after the input parameters in the ith row of the target script file list in the step S5 are inserted into the j+1th row of the execution sequence, deleting the recorded ith row in the target script file list;
s7: deleting the ith row in the target script file list, and then clearing the recorded i value;
s8: judging whether the execution sequence of the j+1th row in the step S5 is smaller than or equal to the total number of the execution sequences, when the execution sequence of the j+1th row in the step S5 is smaller than or equal to the total number of the execution sequences, repeating the step S5, otherwise, executing the step S9;
s9: judging whether the input parameters exist in the target script file list, extracting the input parameters of the (i+1) th row in the target script file list when the input parameters exist in the target script file list, executing the step S5, and otherwise, outputting an execution sequence.
Further, the target script file in step S1 is a vehicle simulation script file.
Further, each line in the target script file list in step S1 includes a target script file name, a target script file input parameter, and a target script file output parameter.
Further, the variable space in step S2 is a storage space, and the storage space is loaded with parameters.
Further, the execution sequence in step S4 is the order of executing the files.
Further, the object file parameter list in step S5 starts from line i=1.
Compared with the prior art, the script file execution ordering method based on vehicle simulation calculation has the following advantages:
(1) The script file execution sequencing method based on the vehicle simulation calculation determines the execution sequence of the files by comparing the dependency relationship of the input and output parameters of the script files in the vehicle simulation calculation process, designs a set of program running method applied to the batch execution of the script files in the vehicle simulation calculation, provides reference for rapid calculation in batch processing, improves the code quality and maintainability of batch processing programs, and improves the program calculation efficiency and the code readability in addition, and saves a large amount of time cost for batch processing of the data files.
(2) The script file execution sequencing method based on the vehicle simulation calculation provides a program design method for the problems of batch execution and sequential loading of files in the vehicle simulation calculation process, so that the simulation calculation efficiency and the code readability are improved, and the script file execution sequencing method based on the vehicle simulation calculation has important significance for writing batch processing programs and is easy to popularize.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention. In the drawings:
fig. 1 is a logic schematic diagram of a script file execution ordering method based on vehicle simulation calculation according to an embodiment of the present invention.
Detailed Description
It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other.
In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first", "a second", etc. may explicitly or implicitly include one or more such feature. In the description of the present invention, unless otherwise indicated, the meaning of "a plurality" is two or more.
In the description of the present invention, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art in a specific case.
The invention will be described in detail below with reference to the drawings in connection with embodiments.
As shown in fig. 1, a script file execution ordering method based on vehicle simulation calculation includes the following steps:
s1: counting input parameters and output parameters of target script files to be loaded in the vehicle simulation calculation process to form a target script file list, and counting the input parameters and output parameters of the target script files to be loaded by a worker in the vehicle simulation calculation process during actual simulation to output the file name, the input parameters and the output parameters of each target script file in a row vector form, wherein each script file forms the target script file list;
s2: establishing a file execution sequence, and counting the existing parameters in a variable space before the operation of the target script file;
s3: extracting output parameters corresponding to the target script files with the input parameters being empty in the target script file list;
s4: storing the existing parameters counted in step S2 and the output parameters extracted in step S3 in a first line and a second line of the execution sequence, respectively;
s5: extracting an input parameter of an ith row in the target script file list, comparing the input parameter with a parameter of a jth=1 row in an execution sequence, comparing the former parameter with the execution sequence parameter of the jth=j+1 row when the former parameter contains all the latter parameters, otherwise, inserting the input parameter in the ith row target script file list into the jth+1 row of the execution sequence, and recording the current i value;
s6: after the input parameters in the ith row of the target script file list in the step S5 are inserted into the j+1th row of the execution sequence, deleting the recorded ith row in the target script file list;
s7: deleting the ith row in the target script file list, and then clearing the recorded i value;
s8: judging whether the execution sequence of the j+1th row in the step S5 is smaller than or equal to the total number of the execution sequences, when the execution sequence of the j+1th row in the step S5 is smaller than or equal to the total number of the execution sequences, repeating the step S5, otherwise, executing the step S9;
s9: judging whether input parameters exist in a target script file list, extracting the input parameters of the (i+1) th row in the target script file list when the input parameters exist in the target script file list, and executing step S5, otherwise, outputting an execution sequence.
The target script file in the step S1 is a vehicle simulation script file; in actual execution, the target script file refers to a script file that needs to be sequentially executed when the vehicle is simulated and calculated.
Each row in the target script file list in step S1 includes a target script file name, a target script file input parameter, and a target script file output parameter, so as to facilitate a subsequent vehicle simulation operation.
The variable space in the step S2 is a storage space, the storage space is loaded with parameters, and the variable space refers to the storage space loaded with parameters when participating in the vehicle simulation calculation process in the actual execution, so that the variable space has the advantages of being convenient for quickly acquiring the parameters from the storage space when running a program, saving time cost and improving running efficiency.
The execution sequence in step S4 is the order of executing the files.
The object file parameter list in step S5, starting from line i=1, is convenient for establishing a file execution sequence in the simulation system, and further improves the program calculation efficiency and the code readability, thereby saving a lot of time cost for batch processing of data files.
Examples
A script file execution ordering method based on vehicle simulation calculation comprises the following specific implementation steps:
a1, counting input parameters [ I1, I2, I3, …, in ] and output parameters [ O1, O2, O3, …, on ] of a target script file to be loaded In the vehicle simulation calculation process.
A2, outputting Ti (Ni, ii, oi) in the form of row vectors by using the file name Ni, the input parameter Ii and the output parameter Oi of each target script file Ti, wherein each script file forms a target script file list [ T1; t2; t3; …; tn ]. The target script file refers to a script file which needs to be sequentially executed when the vehicle is simulated and calculated.
And A3, counting parameters loaded into a variable space before the target script file is operated in the automobile simulation calculation process, and storing the parameters in a first row [ Z1] of an execution sequence Z.
A4, extracting a target script file list [ T1; t2; t3; …; the output parameters Ti (Oi) corresponding to the target script file with the input parameters being empty in Tn are stored in a second row [ Z1] of the execution sequence; z2], at which time z2=ti (Oi). The variable space is a storage space loaded with parameters when participating in the vehicle simulation calculation process.
A5, starting from the i=1 th row, extracting an input parameter Ti (Ii) of the i th row in the target script file list, comparing the input parameter Ti (Ii) with a parameter Zj of the j=1 th row in the execution sequence, and comparing the input parameter Ti (Ii) with an execution sequence parameter Zj+1 of the j=j+1 th row when the former parameter contains all the latter parameters.
A6, when the execution sequence of the j+1th row is smaller than or equal to the total number of the execution sequence, re-executing the fifth step.
A7, when the execution sequence of the j+1th row is larger than the total number of the execution sequence, detecting a target script file list [ T1; t2; t3; …; and if the Tn is the input parameter, extracting the input parameter Ti+1 (Ii+1) of the i+1th line in the target script file list, re-executing the step A5, and otherwise, outputting an execution sequence.
A8, when the input parameters Ti (Ii) of the ith row in the target script file list do not all contain the latter parameters, inserting the input parameters Ti (Ii) of the ith row in the target script file list into the j+1 th row of the execution sequence, and deleting the ith row in the target script file list.
A9, when the input parameter Ii exists in the target script file list, extracting the input parameter Ti+1 (Ii+1) of the (i+1) th row in the target script file list, executing the step A5, and otherwise, outputting an execution sequence [ Z1; z2; z3; …; zn ].
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.
Claims (6)
1. A script file execution ordering method based on vehicle simulation calculation is characterized in that: the method comprises the following steps:
s1: counting input parameters and output parameters of a target script file to be loaded in the vehicle simulation calculation process to form a target script file list;
s2: establishing a file execution sequence, and counting the existing parameters in a variable space before the operation of the target script file;
s3: extracting output parameters corresponding to the target script files with the input parameters being empty in the target script file list;
s4: storing the existing parameters counted in step S2 and the output parameters extracted in step S3 in a first line and a second line of the execution sequence, respectively;
s5: extracting an input parameter of an ith row in the target script file list, comparing the input parameter with a parameter of a jth=1 row in an execution sequence, comparing the former parameter with the execution sequence parameter of the jth=j+1 row when the former parameter contains all the latter parameters, otherwise, inserting the input parameter in the ith row target script file list into the jth+1 row of the execution sequence, and recording the current i value;
s6: after the input parameters in the ith row of the target script file list in the step S5 are inserted into the j+1th row of the execution sequence, deleting the recorded ith row in the target script file list;
s7: deleting the ith row in the target script file list, and then clearing the recorded i value;
s8: judging whether the execution sequence of the j+1th row in the step S5 is smaller than or equal to the total number of the execution sequences, when the execution sequence of the j+1th row in the step S5 is smaller than or equal to the total number of the execution sequences, repeating the step S5, otherwise, executing the step S9;
s9: judging whether the input parameters exist in the target script file list, extracting the input parameters of the (i+1) th row in the target script file list when the input parameters exist in the target script file list, executing the step S5, and otherwise, outputting an execution sequence.
2. The method for ordering script file execution based on vehicle simulation calculation according to claim 1, wherein: the target script file in step S1 is a vehicle simulation script file.
3. The method for ordering script file execution based on vehicle simulation calculation according to claim 1, wherein: each row in the target script file list in step S1 includes a target script file name, a target script file input parameter, and a target script file output parameter.
4. The method for ordering script file execution based on vehicle simulation calculation according to claim 1, wherein: the variable space in step S2 is a storage space, and the storage space is loaded with parameters.
5. The method for ordering script file execution based on vehicle simulation calculation according to claim 1, wherein: the execution sequence in step S4 is the order of executing the files.
6. The method for ordering script file execution based on vehicle simulation calculation according to claim 1, wherein: the target script file list in step S5 starts from the i=1st line.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011367485.XA CN112486600B (en) | 2020-11-27 | 2020-11-27 | Script file execution ordering method based on vehicle simulation calculation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011367485.XA CN112486600B (en) | 2020-11-27 | 2020-11-27 | Script file execution ordering method based on vehicle simulation calculation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112486600A CN112486600A (en) | 2021-03-12 |
CN112486600B true CN112486600B (en) | 2024-03-15 |
Family
ID=74936965
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011367485.XA Active CN112486600B (en) | 2020-11-27 | 2020-11-27 | Script file execution ordering method based on vehicle simulation calculation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112486600B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113128049A (en) * | 2021-04-19 | 2021-07-16 | 广东工业大学 | Batch simulation method for working conditions of multiple paths of vehicles |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8862555B1 (en) * | 2011-05-16 | 2014-10-14 | Trend Micro Incorporated | Methods and apparatus for generating difference files |
CN108304670A (en) * | 2018-02-12 | 2018-07-20 | 北京汽车研究总院有限公司 | A kind of parts Parameters design and system |
CN110119573A (en) * | 2019-05-14 | 2019-08-13 | 威马智慧出行科技(上海)有限公司 | The extracting method and device of vehicle suspension dead load |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8429619B2 (en) * | 2007-07-03 | 2013-04-23 | International Business Machines Corporation | Executable high-level trace file generation system |
-
2020
- 2020-11-27 CN CN202011367485.XA patent/CN112486600B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8862555B1 (en) * | 2011-05-16 | 2014-10-14 | Trend Micro Incorporated | Methods and apparatus for generating difference files |
CN108304670A (en) * | 2018-02-12 | 2018-07-20 | 北京汽车研究总院有限公司 | A kind of parts Parameters design and system |
CN110119573A (en) * | 2019-05-14 | 2019-08-13 | 威马智慧出行科技(上海)有限公司 | The extracting method and device of vehicle suspension dead load |
Also Published As
Publication number | Publication date |
---|---|
CN112486600A (en) | 2021-03-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112486600B (en) | Script file execution ordering method based on vehicle simulation calculation | |
CN110525823A (en) | A kind of method, apparatus and system that monitoring rubbish is put on by classification | |
CN111071094B (en) | Charging method and device | |
CN105263128B (en) | A kind of method and apparatus of Batch sending short message | |
CN107719142A (en) | A kind of method and device of battery altering fixed station to the automatic replacing battery of electric car | |
CN109840799A (en) | Expense setting server, expense setting method and the expense of Car sharing expense set system | |
CN110287104A (en) | Method for generating test case, device, terminal and computer readable storage medium | |
CN109976936A (en) | Bootstrap technique and system are analyzed and repaired to the intelligent diagnostics of automobile four-wheel positioning failure | |
US11688215B2 (en) | Vehicle performance evaluation method, device and terminal | |
CN106276766B (en) | A kind of the filling information collecting method and device of urea for vehicle solution | |
CN112116723B (en) | License plate recognition-based non-inductive charging method and device | |
CN110473585B (en) | Replacement method, device and equipment for erasing failed storage unit and storage medium | |
CN104199779B (en) | A kind of method and system of flush bonding module combined test | |
CN115376245A (en) | Charging method and system for improving charging service efficiency of electric vehicle | |
CN112525556A (en) | Diagnostic method, apparatus, device and storage medium for automatically identifying vehicle brand | |
CN112508547A (en) | Cash withdrawal execution method, system, computer device and storage medium | |
CN112328471A (en) | Method for selecting regression testing mode | |
CN106027778A (en) | Display method and display system of booting interface of mobile terminal | |
CN113822445B (en) | Model integrated prediction method, system, electronic equipment and storage medium | |
CN116893357B (en) | Key battery screening method, system and storage medium | |
US20240051422A1 (en) | Vehicle charging control system and method therefor | |
CN113219355B (en) | Battery type selection method, device, equipment and storage medium | |
CN108389617A (en) | Portfolio management/firmware upgrading method/system, medium and electronic equipment of firmware | |
CN111929452B (en) | Sample detection device, reagent replacement method thereof and computer storage medium | |
CN112636894A (en) | ECU communication module test method, test equipment and storage medium based on time parameters |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |