Main Content

onSimulationStart

Class: sim3d.scenario.ActorBehavior
Namespace: sim3d.scenario

Specify code to run at start of simulation

Since R2023b

Syntax

onSimulationStart(self, actorSimulation)

Description

onSimulationStart(self, actorSimulation) specifies code to run at the start of simulation. Use this method in a subclass to define simulation startup behavior.

Input Arguments

expand all

Actor behavior object, specified as a sim3d.scenario.ActorBehavior object. For more information, see sim3d.scenario.ActorBehavior.

RoadRunner actor information, specified as a Simulink.ActorSimulation object. For more information, see ActorSimulation.

Attributes

AccessProtected

To learn about attributes of methods, see Method Attributes.

Examples

expand all

Use this code to define the onSimulationStart method in your sim3d.scenario.ActorBehavior subclass.

methods(Access = protected)
  function onSimulationStart(self, actorSimulation)
    % Insert startup tasks
  end  
end

Version History

Introduced in R2023b