-
OpenScenarioMod.m
: Creates multiple .xosc files when a [x,y,z] (x is the first value of the array, z the end, y the step value.) object is detected. Then creates multiple .xosc files based on this array. Inputs: name_experiment (name of the original .xosc file). Outputs: listOfNames (array with the names of the created .xosc files).
-
API_main.m:
Main function which calls the other function to create the OpenSCENARIO dynamics. Inputs: name_ego (the name of the ego vehicle in Prescan), name_experiment (name of the Prescan experiment) and name_experiment_template (name .xosc file). Outputs: -.
-
xml2struct.m:
Function which creates a structure from a XML type file. Inputs: XML file. Outputs: structure array.
-
struct2xml.m:
Function which creates a XML type file from a structure array. Inputs: structure array. Outputs: XML file.
-
slblocks.m:
Function to make a library visible in the Simulink Library Browser. Inputs: -. Outputs: -.
-
delete_files.m:
Function which deletes old files which do not have the OpenSCENARIO changes in them. Inputs: folder_name (the name of newly created folder), name_experiment (name of the Prescan experiment). Outputs: -.
-
initialize_actors.m:
Function which calls parameter_sweep_initalPositions.m based on the object type. Inputs: models (structure made from .pb file of the Prescan experiment), Struct_OpenSCENARIO (structure made from .xosc file), Struct_pex (structure made from .pex file of the Prescan experiment). Outputs: Struct_OpenSCENARIO, Struct_pex , models.
-
parameter_sweep_initalPositions.m:
Function which changed the initial positions of the actors in the .pex file. Inputs: Struct_OpenSCENARIO (structure made from .xosc file), Struct_pex (structure made from .pex file of the Prescan experiment), k (value dependent on the object type in Prescan), i (for loop index) . Outputs: Struct_pex (structure made from .pex file of the Prescan experiment).
-
parameter_sweep_vehicle.m:
Function which changes vehicle parameters (not used).
-
parameter_sweep_pedestrian.m:
Function which changes pedestrian parameters (not used).
-
parameter_sweep_bicycle.m:
Function which changes bicycle parameters (not used).
-
weather_conditions.m:
Function which changes the the weather conditions of the Prescan experiment. Inputs: models (structure made from .pb file of the Prescan experiment), Struct_OpenSCENARIO (structure made from .xosc file), Struct_pex (structure made from .pex file of the Prescan experiment). Outputs: Struct_pex , models.
-
trajectory_declaring.m:
Function which creates a variable which contains all the trajectory information. Inputs: models (structure made from .pb file of the Prescan experiment), Struct_OpenSCENARIO (structure made from .xosc file). Outputs: trajectory_variable (variable containing trajectory information).
-
initial_velocity_declaring.m:
Function which creates a variable which contains all the initial velocity information. Inputs: models (structure made from .pb file of the Prescan experiment), Struct_OpenSCENARIO (structure made from .xosc file). Outputs: Velocity_variable (variable containing initial velocity information).
-
trajectory_counter.m:
Function which creates two variable which contain the number of lateral and longitudinal trajectories. Inputs: models (structure made from .pb file of the Prescan experiment), Struct_OpenSCENARIO (structure made from .xosc file), trajectory_variable (variable containing trajectory information). Outputs: Lateral_events (number of lateral trajectories), Longitudinal_event (number of longitudinal trajectories).
-
simulink_ego.m:
Function which adds the main ROS blocks to the ego vehicle in Simulink from the ROS_lib library, it also adjusts the constant R (rainfall rate, see Prescan manual p. 497). Inputs: name_simulink (the name of the Simulink file in of the Prescan experiment), models (structure made from .pb file of the Prescan experiment), name_ego (the name of the ego vehicle in Prescan), Struct_pex (structure made from .pex file of the Prescan experiment). Outputs: -.
-
trajectory_labels.m:
Function which adds labels to SELF_Demux in Simulink per declared actor in the .xosc file. Inputs: Velocity_variable (variable containing initial velocity information), models (structure made from .pb file of the Prescan experiment), name_simulink (the name of the Simulink file in of the Prescan experiment). Outputs: -.
-
initial_velocity_dynamics.m:
Function which adds a constant velocity block in Dynamics_Empty in Simulink per declared actor in the .xosc file. Inputs: name_simulink (the name of the Simulink file in of the Prescan experiment), models (structure made from .pb file of the Prescan experiment), Struct_OpenSCENARIO (structure made from .xosc file), Velocity_variable (variable containing initial velocity information). Outputs: -.
-
trajectory_dynamics.m:
Function which adds trajectories in Dynamics_Empty in Simulink per declared actor in the .xosc file. Inputs: name_simulink (the name of the Simulink file in of the Prescan experiment), models (structure made from .pb file of the Prescan experiment), Struct_OpenSCENARIO (structure made from .xosc file), trajectory_variable (variable containing trajectory information), Lateral_events (number of lateral trajectories), Longitudinal_event (number of longitudinal trajectories),name_ego (the name of the ego vehicle in Prescan). Outputs: -.