inet.simulation.task.SimulationTask

class inet.simulation.task.SimulationTask(simulation_config=None, run_number=0, inifile_entries=[], itervars=None, mode='release', debug=None, remove_launch=True, break_at_event_number=None, break_at_matching_event=None, user_interface='Cmdenv', result_folder='results', sim_time_limit=None, cpu_time_limit=None, record_eventlog=None, record_pcap=None, stdout_file_path=None, eventlog_file_path=None, scalar_file_path=None, vector_file_path=None, wait=True, name='simulation', task_result_class=SimulationTaskResult, **kwargs)

Bases: Task

Represents a simulation task that can be run as a separate process or in the process where Python is running.

Please note that undocumented features are not supposed to be called by the user.

Parameters:
simulation_config=None

The simulation config that is used to run this simulation task.

run_number : number

The number uniquely identifying the simulation run.

inifile_entries : list

A list of additional inifile entries.

itervars : string

The list of iteration variables.

mode : string

The build mode that is used to run this simulation task. Valid values are “release”, “debug”, and “sanitize”.

debug : bool

Specifies that the IDE debugger should be attached to the running simulation.

remove_launch : bool

Specifies if the IDE should remove the launch after the simulation terminates.

break_at_event_number : int

Specifies an event number at which a breakpoint is to be set.

break_at_matching_event : string

Specifies a C++ expression at which a breakpoint is to be set.

user_interface : string

The user interface that is used to run this simulation task. Valid values are “Cmdenv”, and “Qtenv”.

result_folder : string

The result folder where the output files are generated.

sim_time_limit : string

The simulation time limit as quantity with unit (e.g. “1s”).

cpu_time_limit : string

The CPU time limit as quantity with unit (e.g. “1s”).

record_eventlog : bool

Specifies whether the eventlog file should be recorded or not.

record_pcap : bool

Specifies whether PCAP files should be recorded or not.

stdout_file_path : string

Overrides the relative file path of the STDOUT file, not set by default.

eventlog_file_path : string

Overrides the relative file path of the eventlog file, not set by default.

scalar_file_path : string

Overrides the relative file path of the scalar file, not set by default.

vector_file_path : string

Overrides the relative file path of the vector file, not set by default.

wait : bool

Determines if running the task waits the simulation to complete or not.

task_result_class : type

The Python class that is used to return the result.

kwargs : dict

Additional parameters are inherited from the Task constructor.

run(**kwargs)

Runs a simulation task by running the simulation as a child process or in the same process where Python is running.

Parameters:
append_args : list

Additional command line arguments for the simulation executable.

simulation_runner : string

Determines if the simulation is run as a separate process or in the same process where Python is running. Valid values are “subprocess” and “inprocess”.

simulation_runner_class : type

The simulation runner class that is used to run the simulation. If not specified, then this is determined by the simulation_runner parameter.

Returns (SimulationTaskResult):

a simulation task result that contains the several simulation specific information and also the subprocess result if applicable.