This article has participated in the activity of “New person creation Ceremony”, and started the road of digging gold creation together.

The experiment is introduced

  • Since it is an experiment, there must be a comparative analysis, and it will take a lot of time to manually change parameters again and again after running, but I have prepared a thoughtful automatic test function for everyone, set up an experiment environment, prepare different parameters for each experiment, can automatically conduct experiments, and record experimental data.
  • Writing papers, especially for science and engineering papers, beautiful graphics are essential. We can use Simulink to generate charts, but automatically generated charts are no better than Simulink
  • This experiment will measure and compare the actual speeds of different expected speeds of automobiles.
  • Environment: Windows 10, Windows 10.2

The experimental results

The experimental process

Build a new straight runway and plan the route

Select a test vehicle

Create a driving policy

The IPGDrive model is used to drive for 30 seconds and the speed is $speed=10, indicating that an NValue variable is defined and the value of the variable is 10

Speed is defined as a variable for later modification. The nature of the NValue variable can be seen in appendix 1 at the end.

Save the current project

Project name: testManagerExperience

The TestManager page is displayed

Add a new TestRun and set up the test scenario

Add two variations and set the value of speed

If the Speed of IPGDriver is correctly configured, the value of Speed under Name can be obtained from the drop-down list

A new Diagram shows the speed change clearly

  • Display data in a table for easy comparison

  • Let’s name the X-axis and the Y-axis

CarMake r currently does not support Chinese, do not write Chinese

  • The default value of x axis is Time, and the value of Y axis is Car. V, indicating the speed

Start the test

  • We can see vehicles in the IPGMoive interface running under different parameters

Viewing test Report

  • The first page records information such as the time of the test

  • The second page records the basics of the test results

  • The third page is the data icon

  • The next two pages document the parameters of the test

Appendix 1: Introduction to the four variable types in TestManager

NValue

  • Full name: Named Value
  • What it does: NValue is a named variable that can be placed in any editable parameter field of L. To introduce named values, enter the dollar sign $directly into the selected parameter field or input file, followed by the name you want the variable to have. You can also provide a default value for this variable.
  • Example: Set the speed of IPGDriver to the value of speed, starting with 10
    • In the Speed box of the IPGDriver interface, enter $Speed =10 to define a named variable Speed. The initial value is 10
    • Here is:

  • The NValue that defines success can be found in the Parameter name column of TestManager

KValue

  • Full name: Key Value
  • Function: KValue is a keyword variable and belongs to the Infofile keyword. It is mainly applicable to Settings where there is no editable parameter field in CarMakerGUI. For example, perform the same test run with different tires, or how to swap vehicle data sets.
  • Some parameters are as follows:

TS

  • Full name: TestSpace Variables
  • Function: TestSpace variables are called global test variables and are only auxiliary variables in the test system. Its function can be similar to that of a blackboard. Test space variables can store and calculate values.
  • Create method:
    • Open ScriptControl interface

  • Enter the command set TS::oneValue 100 and press Enter to create a TS variable named oneValue and assign the value to 100

  • An overview of all existing TS variables can be retrieved from the View->TestSpace menu in the Test Manager:

  • $TS::oneValue

CM

ScriptFile

  • Function: Script file class variables exist only in the test manager. They allow access to script control extensions in the test manager. Therefore, script files written in the Tcl/Tk programming language can be loaded into the test space so that user-defined functions and procedures can be invoked when the test series is executed.
  • For example, see Examples > BasicFunctions > TestAutomation > TestManager > VariationsAndSkipping. Ts example

ResultFName

  • Effect: This is a special command that affects the storage path and name of the result files created in this test series. In the field of a variable of type CM, simply enter the new storage path as an absolute path or relative to the PAST project folder.
  • Example: Examples > BasicFunctions > TestAutomation > ScriptControl > Straight_trailerswingdva

Popup Timeout

Effect: Avoid the pop-up message that is pop-up timeout when the insert runs. After a timeout defined in seconds, the pop-up message closes automatically. If the pop-up window has a selection, the default answer is given.

Appendix 2: Other testing features commonly used in TestManager

Test Group

  • We can conduct multiple unrelated tests through the Group, and the tests within each Group are not affected by each other.

Vehicle

  • Different vehicles can be specified for different test groups

Characteristic values

  • When testing, it is often useful to calculate some eigenvalues to help evaluate the final simulation results. These eigenvalues need to be defined and their calculation rules specified in the eigenvalue item. For each eigenvalue, you must define a unique identifier that can later be used as a reference name in a standard or graph. In CONSIST, there are basically two different methods for calculating eigenvalues, namely real-time calculation and off-line calculation.

Real-time (Online Calculation)

  • By applying user-defined real-time expressions. This applies to eigenvalues whose calculations depend only on the previous time step.
  • To evaluate eigenvalues in real time, select RTExpr as the calculation type and specify the real time expression (in the specified input field. The real-time expression must define a new quantity with the same name as the identifier of the eigenvalue specified earlier.
  • Example: Calculate the braking distance
    • Identifier: BrakeDist
    • Type: RTExpr
    • Value :(first()? Qu::BrakeDist=0); DM.ManNo>0 ? BrakeDist = Delta2Ev (Car) Road) sRoad, change (DM) Brake), Car, v < = 0.01)

  • Set the chart Mode to Characteristic vs Variation

  • Set the Y-axis to BrakeDist

  • Set the vehicle running policy
    • Description: Accelerating
    • The End Condition: Car. Road. SRoad > = 50
    • Duration (time/dist) : 10.0
    • Longitudinal Dynamics: IPGDriver

  • Train to train
  • The End Condition: Car. V < = 0.001
  • Duration (time/dist) : 30.0
  • Longitudinal Dynamics: Manual, Pedals, Gear)
  • Cluth Value: 1
  • Brake Value: $Brake=0.6

  • Remember, save

  • The test environment for TestRun is set to the scenario you just saved

  • Running the test, looking at the diagram in the Rport, it was found that the braking distance was successfully calculated to be about 23.36

Offline Calculation

  • This value is calculated after the simulation is completed by analyzing the stored result data. And that’s pretty much true of all the eigenvalues. To compute the eigenvalues off-line, the user must specify a TCL script that provides functions to compute the desired values. The path to this script file must be defined in the Settings test before defining eigenvalues. In addition, the user must specify the name of the function that performs the actual calculation.

Criterion

  • To evaluate a completed simulation, it is often necessary to define one or more criteria that compare the simulation results with a given reference value. This can be done by adding one or more standard items to the test series. The evaluation of this criterion can be good, warning, or bad. To distinguish these results, different constraints can be specified in the detailed view of the standard item.
  • Then we add two conditions: braking distance less than 20, pass, warning between 20 and 30, 30 and above, danger.
    • Criterion parameter setting
      • Good: [get BrakeDist] < 20.0
      • Warn: [Get BrakeDist] >= 20.0&& [Get BrakeDist] < 30.0
      • Bad: [get BrakeDist] >= 30.0

  • Create three variables and modify Brake to be 0.3, 0.6, and 0.9 respectively

  • Run the test and see the results. Different Brake will produce different BrakeDistances

Test Configuration

  • Test Configuration is designed to address the approach of the Test Configurator wizard, which can be used to create large Test families based on predefined Test directories, known as Test software packages.

Settings

  • Settings allows users to configure not just one test, but larger tests. For example, parameter variables can be set, which are valid for more than one variable, but a group of tests run. Therefore, it is important to place Settings in the test series because they apply to all Settings at the same or lower level.

The end of the

  • TestManager is not difficult, but the difficulty may be the use of variables, which requires some time to study. I also mainly learned the use of NValue, KValue and TS, and did not spend much time to understand other variables.
  • This experiment can be downloaded from CSDN resources (including the previous experiment, not the appendix experiment) : mp.csdn.net/mp_download…

Note: Open testManagerExperience with Test and testManagerExperience. Ts in TestManager interface to test vehicles automatically at different speeds.

supplement

  • By default, the Execution mode of the test is Sequential. Parallel can be changed to a Parallel test for faster test speeds.