Finalization Script

A finalization script provides a means for you to define OML commands that are to be executed at the end of a simulation.

The finalization script lets you define OML commands that are to be automatically executed when a simulation ends, such as plotting results or saving your data to a specified location.

Note that the Finalization Script is executed when the simulation ends (reaches the final time), or is stopped. It is not executed if the simulation is paused.

Define the Finalization Script

Enter the OML commands that you want to be automatically executed at the end of a simulation.

  1. From the ribbon, select the Model Initialization and Properties tool:


    The Model dialog opens.
  2. Select the Finalization tab.
  3. In the OML editor, enter the required OML commands.


    Alternatively, if you have an existing .oml script that you want to load, select and navigate to the file.