vssBlockInitializeFlag

Flag used in custom blocks called at the start of a simulation to perform actions upon the initialization of the simulation, such as allocating memory, opening a file or a channel.

Syntax

flagout = vssBlockInitializeFlag

Outputs

flagout
Output of flag.
Type: logical
Dimension: Boolean

Example

Flag used in an OML Custom Block to read a CSV file upon the simulation initialization.

function OmlBlockFunction(block,flag)
	...
    if flag == vssBlockInitializeFlag
	   csvdata = csvread('inputfile.csv');
    elseif flag == vssBlockReinitializeFlag
	   ...
    elseif flag == vssBlockTerminateFlag
	   ...
    elseif flag == vssBlockOutputUpdateFlag
	   ...
    end
end