Write-in-file monitors

Write-in-file monitors are used to update files during simulations.

To create a write-in-file monitor, apply the Create write-in-file monitor tool to the appropriate subnet.

After the tool has been applied, a new monitor will be added to the index, and Monitor template code will be generated for some of the Write-in-file monitoring functions.

Write-in-file monitor in index

A default name is suggested, but the name can be changed.

Unfold the Type index entry to see the options for the write-in-file monitor. To change the file extension, edit the text of the option.

Write-in-file monitor in index

The ML name of the monitor and the file extension specified in the monitor option will be used to create the name of the file that is created by the monitor. For more information about ML names, see Naming policy. The file will be saved in a simulation output directory.

File in simulation output directory

To obtain the desired behavior for the monitor, the Monitor template code for the accessible Write-in-file monitoring functions must be modified.

A write-in-file monitor will not be deleted if any of the associated nodes are deleted. However, if an associated node is deleted, it is likely that there will be errors in the monitor.

An example of a write-in-file monitor can be found is the Queue system example.

Related pages