https://nl.mathworks.com/help/driving/ref/sim3d.scenario.actorbehavior.onsimulationstart.html
sim3d.scenario.ActorBehavior.onSimulationStart - Specify code to run at start of simulation - MATLAB
This MATLAB function specifies code to run at the start of simulation.