Start a parameter study
cm_study_startRuns one test run repeatedly in the background with different Key, workspace, and driver parameter values, returning a study ID to wait on. Finds which values actually change results.
Instructions
Run one test run several times with different parameter values, one after another, in the background. Returns a study id at once; wait with cm_study_wait. Nothing is written to project files. The answer names values that will change nothing: keys_not_found, workspace_not_found and workspace_overruled (use scope=); Driver.* keys that a driver template overrides are refused (use 'driver'). Rows give valid and wall_s, the clock time of the run. A study stops at the first run that finds no CarMaker licence.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "cm_study_start"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid | No | Every combination of value lists, added to variations: {'driver': {'Driver.Acc.ayMax': [12, 14]}, 'driver_scale': {'Driver.Acc.GGExp': [1, 2, 4]}, 'keys': {...}, 'workspace': {...}}. driver_scale multiplies the driver's own value (a table: all but its first column). At most 100 runs | |
| keys | No | Keys for every run, e.g. {'Vehicle': 'Car_B'}; a variation's own keys win | |
| mode | No | cm4sl: the MATLAB-connected session. standalone: CarMaker without MATLAB (no 'workspace' values). auto: cm4sl if MATLAB is connected | auto |
| gates | No | 'markers': each row gets 'sectors', the times CarMaker's lap timing takes at the test run's trigger point markers, each from the last reference marker (a lap on a skid pad). Or road positions in m: 'splits', the times between them | |
| movie | No | mode standalone: show the runs in IPGMovie | |
| rerun | No | Runs of an earlier study again: {'study': id, 'labels': ['best']}, e.g. with movie and keep_open to show the best run; an IPGMovie window kept open is reused | |
| scope | No | 'base' for the MATLAB base workspace, or the name of a loaded Simulink model for that model's workspace | base |
| speed | No | x real time; omit for CarMaker's maximum. Slower only if the user asks | |
| testrun | No | Test run relative to Data/TestRun (with rerun: default its study's) | |
| keep_open | No | With movie: leave the last run in IPGMovie (close it with cm_standalone_close) | |
| max_run_s | No | A run is stopped after this wall time in s | |
| save_logs | No | After every run, save what Simulink logged and the workspaces as that run used them to a MAT file next to its result file (mode cm4sl; logs_file per row) | |
| close_open | No | standalone: first close the CarMaker programs this server left open (each holds a licence) | |
| quantities | No | Quantities to summarise per run (default: Time, Car.v). Standalone they are also all its result file stores, besides what timing needs: list every quantity to plot later | |
| variations | No | One entry per run: {'label': 'heavy', 'keys': {'Body.mass': 320}, 'workspace': {'Kp_yaw': 1.5}, 'driver': {'Driver.Acc.ayMax': 14, 'Driver.Acc.GGExp': '10 1.5 1.5\n90 5 5'}}. 'keys': infofile keys in memory for that run; 'workspace': MATLAB variables in 'scope', restored after the run; 'driver': driver template values, in a copy deleted after the run. All optional |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||