    

 ## On this page

  

 

 # 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:

### <a class="anchor" id="autotoc_md1"></a>Running Simulation Framework using the CLI executable

usage:

 &lt;executable&gt; options

 

where options are:

 -?, -h, --help Display usage information

 -v, --version Prints application version information

 -s, --scenario &lt;scenario&gt; Mandatory argument to specify the scenario to execute

 -o, --output &lt;output_folder&gt; Mandatory argument to specify the output folder path for evaluation, where all resulting files will be put.

 -d, --scheduling &lt;scheduling_configuration_file&gt; Mandatory argument to specify orchestration of simulation activities

 -r, --runtime-job-config &lt;runtime_job_config&gt; 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 &lt;CLI_controller_server_IP_address&gt; Optional argument to specify the CLI server IP address

 -p, --cli-client &lt;CLI_controller_client_IP_address&gt; Optional argument to specify the CLI client IP address

 -j, --job-id &lt;job_id_for_this_simulation&gt; Optional argument to tag the simulation execution by a given job_id in string

 -u, --user-settings-file &lt;user_settings_file&gt; Optional argument to use the given config file instead of the default UserSettings.ini

 -x, --driver-input-file &lt;driver_input_file&gt; Optional driver input file to be used by driver module

 --fmu-sensor &lt;fmu_sensor_path&gt; Optional argument to specify an OSMP FMU that processes SensorView and returns SensorData

 -t, --timeout &lt;timeout_for_scheduling_events_as_integer&gt; Optional integer argument to set the scheduling event timeout in milliseconds

 -f, --[time](namespacetime.xhtml)-scaling-factor &lt;time_scaling_factor&gt; Optional float argument to set the speed at which the simulation runs relative to real-[time](namespacetime.xhtml).



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

### <a class="anchor" id="autotoc_md2"></a>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 &lt;with options above&gt;



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



### <a class="anchor" id="autotoc_md3"></a>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.

### <a class="anchor" id="autotoc_md4"></a>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 &lt;user command&gt;



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](namespacetime.xhtml) default for 1 [time](namespacetime.xhtml)

[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



### <a class="anchor" id="autotoc_md5"></a>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`**.