Skip to main content

AVxcelerate Simulation Framework 2024 R2 SP02

Simulation Configuration

Last update: 16.07.2025

The Simulation Framework command line interface (CLI) is the main user entry point for the execution of a simulation loop using the Simulation Framework. The reference simulation loop is configured with the following default components:

• A Traffic Participant Model (TPM), • A Key Performance Indicator (KPI) evaluator and • A Key Performance Indicator (KPI) logger.

After the simulation is executed, a detailed trace of the scenario execution and the KPI values will be available. Different arguments can be passed as options to configure the simulation:

Running Simulation Framework using the CLI executable

usage:
<executable> options
where options are:
-?, -h, --help Display usage information
-v, --version Prints application version information
-s, --scenario <scenario> Mandatory argument to specify the scenario to execute
-o, --output <output_folder> Mandatory argument to specify the output folder path for evaluation, where all resulting files will be put.
-d, --scheduling <scheduling_configuration_file> Mandatory argument to specify orchestration of simulation activities
-r, --runtime-job-config <runtime_job_config> Optional argument to specify the runtime config from external system for cluster usecase
-c, --cli-enable Optional argument to specify if the cli client should be enabled
-w, --cli-server <CLI_controller_server_IP_address> Optional argument to specify the CLI server IP address
-p, --cli-client <CLI_controller_client_IP_address> Optional argument to specify the CLI client IP address
-j, --job-id <job_id_for_this_simulation> Optional argument to tag the simulation execution by a given job_id in string
-u, --user-settings-file <user_settings_file> Optional argument to use the given config file instead of the default UserSettings.ini
-x, --driver-input-file <driver_input_file> Optional driver input file to be used by driver module
--fmu-sensor <fmu_sensor_path> Optional argument to specify an OSMP FMU that processes SensorView and returns SensorData
-t, --timeout <timeout_for_scheduling_events_as_integer> Optional integer argument to set the scheduling event timeout in milliseconds
-f, --time-scaling-factor <time_scaling_factor> Optional float argument to set the speed at which the simulation runs relative to real-time.

where -s <scenario.xosc> , -d, --scheduling <sim_config.json> and -o, --output <output_folder> are mandatory arguments.

Batch Mode Usage

If you want to execute the scenario and simply have the output, simfwk_cli can be executed using the command below:

./simfwk_cli <with options above>

If you want to control the execution of the simulation you should trigger the cli controller mode with the following option -c true,

./simfwk_cli -s your_scenario.xosc -o your_output_path -d your_sim_config.json

Interactive Usage

Additionally, you can trigger the cli controller mode by option -c true

./simfwk_cli -s your_scenario.xosc -o your_output_path -d your_sim_config.json -c true

this enables the user control of simulation framework, instead of just running through of your scenario. With the cli controller , the user can send commands like run , pause , resume , restart , step or kill , to interact with simulation.

Interact with simulation using the cli_controller

When the -c true is applied, a server will be created for listening to the user command. To control the simulation, following command are available:

./cli_controller <user command>

Supported commands:

[run] : trigger the execution the simulation, it will continue running til simulation is done
[step] : step the simulation for given count. e.g. "step 5" for stepping simulation for 5 time default for 1 time
[pause] : pause the simulation and waiting for user command
[resume] : resume the simulation
[kill] : kill the program
[restart] : restart simulation from initial state and wait for user command
[help] : display usage information

Example

  • First start your simulation and enable user control:
./simfwk_cli -s your_scenario.xosc -o your_output_path -d your_sim_config.json -c true
  • Then you will see following message in the console, if the default controller port is not changed:
[LogDebug][Cli] simulation with cli controller is enabled! Trying to start simulation with setup and connect with simfwk core server at IP address0.0.0.0:50051 with client at IP addresslocalhost:50051
SimfwkCliServer started: listening on IP 0.0.0.0:50051
  • Open a new terminal, and try trigger the simulation:
./cli_controller run
  • After a successful execution, the console shows Cli Controller Executation Status OK! . Then you can see the simulation started.
[LogDebug][CliCommandProcessor] received action from cli controller
[LogInfo][SimRunner] Starting simulation.

Note: In this control mode, the simulation process simfwk_cli will not terminate unless you send kill from the cli_controller or manually send ctrl+c.

Connect with Ansys